Description of problem: Kernel panic when doing modprobe ip_conntrack hashsize=32768 when /etc/modprobe.conf already contains a different (lower?) value: options ip_conntrack hashsize=16384 Version-Release number of selected component (if applicable): kernel-2.6.18-194.32.1.el5 How reproducible: Every time. Steps to Reproduce: /etc/modprobe.conf contains an option for ip_conntrack: options ip_conntrack hashsize=16384 Boot the kernel (2.6.9-194.32.1.el5) and have various options turned off so that the ip_conntrack kernel module is not loaded. Confirm this with: grep ip_conntrack /proc/modules and don't see ip_conntrack. Also confirm that /etc/modules.conf is set up: modprobe -nv ip_conntrack should show you the "hashsize=16384". Then attempt to manually load the ip_conntrack module specifying a different hashsize than is specified in /etc/modprobe.conf: modprobe ip_conntrack hashsize=32768 Panic! I haven't been able to capture the printk output, but a summary of the stack dump on the console: alternatives_smp_module_add + 0xf2 parse_args + 0x113 load_module + 0x15fc With a RHEL4 kernel (2.6.9-89.33.1.EL), the manual modprobe ip_conntrack hashsize=32768 ignores the attempt to override hashsize, and ip_conntrack only sees the value in /etc/modprobe.conf. With both RHEL4 and RHEL5 kernels, if /etc/modprobe.conf contains no mention of ip_conntrack, then the manual modprobe uses the specified hashsize= arg value.
I've managed to reproduce this. I have a feeling this is a stack overrun. I'll do some digging and post results soon
Found the problem. Turns out the set method for the hashtable size in the conntrack modules has some broken logic in it, and on the second set we try to deference the ip_conntrack_hash array before we've allocated it. I'll have a patch together shortly
Created attachment 474359 [details] patch to preent null derefeneces in set_hashsize module option parsing Here, this patch fixes it. Looks like a variant needs to go upstream as well. I'll look into that shortly, and post this asap.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
in kernel-2.6.18-243.el5 You can download this test kernel (or newer) from http://people.redhat.com/jwilson/el5 Detailed testing feedback is always welcomed.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-1065.html