]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kmod: prevent kmod_loop_msg overflow in __request_module()
authorJiri Kosina <jkosina@suse.cz>
Tue, 1 Nov 2011 00:15:19 +0000 (11:15 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 1 Nov 2011 00:15:19 +0000 (11:15 +1100)
commit314108a3ab4f9243b93a824869a2a62bfd22e5e2
tree797b033d045379530f2563a444f9b9e7a78fa49e
parenta84a79e4d369a73c0130b5858199e949432da4c6
kmod: prevent kmod_loop_msg overflow in __request_module()

Due to post-increment in condition of kmod_loop_msg in __request_module(),
the system log can be spammed by much more than 5 instances of the 'runaway
loop' message if the number of events triggering it makes the kmod_loop_msg
to overflow.

Fix that by making sure we never increment it past the threshold.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
CC: stable@kernel.org
kernel/kmod.c