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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 17 Jun 2008 14:50:19 +0200
From:	Patrick McHardy <kaber@...sh.net>
To:	Marcel Holtmann <marcel@...tmann.org>
CC:	Jarek Poplawski <jarkao2@...il.com>, netdev@...r.kernel.org,
	Ingo Molnar <mingo@...e.hu>, Thomas Graf <tgraf@...g.ch>
Subject: Re: netlink circular locking dependency

Marcel Holtmann wrote:
> Hi Patrick,
> 
>> So we have:
>>
>> genl_rcv()            : take genl_mutex
>> genl_rcv_msg()        : call netlink_dump_start() while holding genl_mutex
>> netlink_dump_start(),
>> netlink_dump()        : take nlk->cb_mutex
>> ctrl_dumpfamily()     : try to detect this case and not take genl_mutex a
>>                         second time
>>
>> netlink_rcv()         : call netlink_dump
>> netlink_dump          : take nlk->cb_mutex
>> ctrl_dumpfamily()     : take genl_mutex
>>
>> which is a real bug.
>>
>> It seems the best fix is to use genl_mutex for the netlink cb_mutex,
>> drop genl_mutex before calling netlink_dump_start and don't take it
>> in ctrl_dumpfamily, relying completely on af_netlink.c for dump
>> locking. Unfortunately this creates a race since the ops passed to
>> netlink_dump_start are also protect by the mutex, so this patch
>> is just for testing whether it fixes the warning.
> 
> I updated my test kernel to 2.6.26-rc6 and then applied your patch and
> the lockdep warning goes away.


Thanks for testing. Unfortunately the module unload races look
more complicated to fix and I'm busy with other things, so it
would great if someone else could fix this.




--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ