lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 23 Feb 2010 14:49:50 +0800
From:	Américo Wang <xiyou.wangcong@...il.com>
To:	Neil Horman <nhorman@...driver.com>
Cc:	Alexey Dobriyan <adobriyan@...il.com>, rusty@...tcorp.com.au,
	linux-kernel@...r.kernel.org
Subject: Re: hang in call_usermodehelper_exec()

On Mon, Feb 22, 2010 at 8:04 PM, Neil Horman <nhorman@...driver.com> wrote:
> On Mon, Feb 22, 2010 at 02:19:28PM +0800, Américo Wang wrote:
>> On Thu, Feb 18, 2010 at 4:22 AM, Alexey Dobriyan <adobriyan@...il.com> wrote:
>> > I was stress-testing netns stuff in presence of removing modules.
>> >
>> > Kernel is 2.6.33-rc8-next-20100217+:
>> >
>>
>> I don't know if this kernel has Andi's patchset, which is:
>>
>> http://lkml.org/lkml/2010/1/4/506
>>
>> If yes, then please try Neil's patch:
>>
>> http://lkml.org/lkml/2010/2/12/181
>>
>> Thanks.
> No, both Andi's and my usermodehelper changes aren't going in until .34 IIRC,
> but that shouldn't matter, they weren't meant to fix hangs (not that they dont
> :) ).
>
> Looking at this, my guess is that your hang is in userspace, and that you have
> an old version of module-utils.  I fixed this with iptables awhile back.  What
> happens is that process 3737, the modprobe is removing modules, while the setkey
> utility is requesting kernel services that require those modules, so you are in
> fact trying to load and unload the same module(s) in parallel.  While thats not
> a huge deal, it results in the setkey utility forking another copy of modprobe
> (using callusermode_helper).  The two copies of modprobe actually take file
> locks on the module they are workign with, serializing them in user space.  If
> the setkey path and the modprobe path serialize at all in kernel space (by
> taking the module_mutex for instance), you get deadlock.
>
> I fixed this by making modprobe be non-blocking in user space (which is the
> default for insmod as well), and it fixed the problem.  The gory details are
> here:
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=16fcec35e7d7c4faaa4709f6434a4a25b06d25e3
>
> My guess is that if you get the latest module-utils you can make this go away.

I see, excellent! Thank you!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ