]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kmod: prevent kmod_loop_msg overflow in __request_module()
authorJiri Kosina <jkosina@suse.cz>
Thu, 29 Sep 2011 15:50:45 +0000 (17:50 +0200)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 5 Oct 2011 01:01:18 +0000 (12:01 +1100)
commita89d78cc288deacb79423a7fd02bcad833f11490
treedc201b97c88d9ddfb5fa4c10287c090820c9ff2a
parentd942e43b58dc27b36305bcd374a74f7cc15183a3
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