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  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:	Mon, 14 Sep 2009 17:07:04 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	johannes@...solutions.net
Cc:	netdev@...r.kernel.org, linux-wireless@...r.kernel.org
Subject: Re: [PATCH v2] genetlink: fix netns vs. netlink table locking

From: Johannes Berg <johannes@...solutions.net>
Date: Sat, 12 Sep 2009 07:03:15 -0600

> Since my commits introducing netns awareness into
> genetlink we can get this problem:
> 
> BUG: scheduling while atomic: modprobe/1178/0x00000002
> 2 locks held by modprobe/1178:
>  #0:  (genl_mutex){+.+.+.}, at: [<ffffffff8135ee1a>] genl_register_mc_grou
>  #1:  (rcu_read_lock){.+.+..}, at: [<ffffffff8135eeb5>] genl_register_mc_g
> Pid: 1178, comm: modprobe Not tainted 2.6.31-rc8-wl-34789-g95cb731-dirty #
> Call Trace:
>  [<ffffffff8103e285>] __schedule_bug+0x85/0x90
>  [<ffffffff81403138>] schedule+0x108/0x588
>  [<ffffffff8135b131>] netlink_table_grab+0xa1/0xf0
>  [<ffffffff8135c3a7>] netlink_change_ngroups+0x47/0x100
>  [<ffffffff8135ef0f>] genl_register_mc_group+0x12f/0x290
> 
> because I overlooked that netlink_table_grab() will
> schedule, thinking it was just the rwlock. However,
> in the contention case, that isn't actually true.
> 
> Fix this by letting the code grab the netlink table
> lock first and then the RCU for netns protection.
> 
> Signed-off-by: Johannes Berg <johannes@...solutions.net>

Applied, thanks.
--
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