summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorMian Yousaf Kaukab <yousaf.kaukab@suse.com>2016-11-08 17:45:50 +0100
committerLucas De Marchi <lucas.demarchi@intel.com>2016-11-08 22:38:34 -0200
commit6b77f188969d72254f6bda291f4f2d9fd42f5ecc (patch)
treee0791bc21c4b8d930af1da3e27d0f544ce3ca685 /testsuite
parent965886b55ab2f80fc242c1bc7e92423c87424718 (diff)
downloadkmod-6b77f188969d72254f6bda291f4f2d9fd42f5ecc.tar.gz
kmod-6b77f188969d72254f6bda291f4f2d9fd42f5ecc.tar.bz2
kmod-6b77f188969d72254f6bda291f4f2d9fd42f5ecc.zip
depmod: ignore related modules in depmod_report_cycles
Only print actual cyclic dependencies. Print count of all the modules in cyclic dependency at the end of the function so that dependent modules which are not in cyclic chain can be ignored. Printing dependent modules which are not in cyclic chain causes buffer overflow as m->modnamesz is not included in buffer size calculations (loop == m is never true). This buffer overflow causes kmod to crash. Update depmod test to reflect the change as well. Reported-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@suse.com>
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/rootfs-pristine/test-depmod/detect-loop/correct.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuite/rootfs-pristine/test-depmod/detect-loop/correct.txt b/testsuite/rootfs-pristine/test-depmod/detect-loop/correct.txt
index 4eb26df..01ecb89 100644
--- a/testsuite/rootfs-pristine/test-depmod/detect-loop/correct.txt
+++ b/testsuite/rootfs-pristine/test-depmod/detect-loop/correct.txt
@@ -1,3 +1,3 @@
-depmod: ERROR: Found 5 modules in dependency cycles!
depmod: ERROR: Cycle detected: mod_loop_d -> mod_loop_e -> mod_loop_d
depmod: ERROR: Cycle detected: mod_loop_b -> mod_loop_c -> mod_loop_a -> mod_loop_b
+depmod: ERROR: Found 5 modules in dependency cycles!