]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kmod: prevent kmod_loop_msg overflow in __request_module()
authorJiri Kosina <jkosina@suse.cz>
Wed, 26 Oct 2011 02:40:39 +0000 (13:10 +1030)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Fri, 17 Aug 2012 19:35:33 +0000 (15:35 -0400)
commit76bd0e219681e554f59988d6af3eaf21202809b0
treeafad1a699a97e4a728347b9537876ce9724097b6
parentc00a5101310a35a34f9c23bd9c9cda2187005abd
kmod: prevent kmod_loop_msg overflow in __request_module()

commit 37252db6aa576c34fd794a5a54fb32d7a8b3a07a upstream.

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>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
kernel/kmod.c