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-next>] [day] [month] [year] [list]
Date:	Tue, 12 May 2015 12:16:30 -0700
From:	Cong Wang <xiyou.wangcong@...il.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Nicolas Dichtel <nicolas.dichtel@...nd.com>,
	kernel-janitors@...r.kernel.org,
	Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: netns: use a spin_lock to protect nsid management

(Please always Cc netdev for networking bugs)

On Tue, May 12, 2015 at 10:52 AM, Dan Carpenter
<dan.carpenter@...cle.com> wrote:
> Hello Nicolas Dichtel,
>
> The patch 95f38411df05: "netns: use a spin_lock to protect nsid
> management" from May 7, 2015, leads to the following static checker
> warning:
>
>         net/core/net_namespace.c:580 rtnl_net_newid()
>         warn: inconsistent returns 'spin_lock:&nsid_lock'.
>
> net/core/net_namespace.c
>    565
>    566          spin_lock_irqsave(&nsid_lock, flags);
>    567          if (__peernet2id(net, peer) >= 0) {
>    568                  err = -EEXIST;
>    569                  goto out;
>
> I don't know if __peernet2id() unlocks on error but it can't possibly
> restore flags so this isn't right.
>

Yes it is a bug.

Also why do we have to disable IRQ when holding the spinlock?
IOW, which case takes the spin lock in IRQ context?

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ