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]
Message-ID: <1405621030.10255.84.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Thu, 17 Jul 2014 20:17:10 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Cong Wang <xiyou.wangcong@...il.com>
Cc:	Jamal Hadi Salim <jhs@...atatu.com>,
	Linux Kernel Network Developers <netdev@...r.kernel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Cong Wang <cwang@...pensource.com>
Subject: Re: [Patch net-next] net_sched: hold tcf_lock in netdevice notifier

On Thu, 2014-07-17 at 09:45 -0700, Cong Wang wrote:
> On Thu, Jul 17, 2014 at 5:49 AM, Jamal Hadi Salim <jhs@...atatu.com> wrote:
> > On 07/16/14 17:25, Cong Wang wrote:
> >>
> >> From: Cong Wang <cwang@...pensource.com>
> >>
> >> We modify mirred action (m->tcfm_dev) in netdev event, we need to
> >> prevent on-going mirred actions from reading freed m->tcfm_dev.
> >> So we need to acquire this spin lock.
> >>
> >
> > Cong,
> >
> > What setup prompted this? We have no problems dealing with deleted
> > devices in the data path. It seems harmless otherwise.
> >
> 
> 
> I found this during code review, don't see any real crash. This
> is why I sent it for net-next not net. :)
> 
> The reason why it doesn't trigger a crash is I think dev_put()
> doesn't immediately release dev when refcount hits zero,
> instead it defers that to rtnl_unlock().

There is no way this dev_put() could make refcnt reaching 0, unless
there is a serious bug elsewhere.

Anyway, tcfm_dev should probably be RCU protected.



--
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