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]
Message-ID: <B5657A6538887040AD3A81F1008BEC63B3174D@avmb3.qlogic.org>
Date:	Wed, 3 Sep 2014 16:25:50 +0000
From:	Yuval Mintz <Yuval.Mintz@...gic.com>
To:	David Miller <davem@...emloft.net>,
	"ivecera@...hat.com" <ivecera@...hat.com>
CC:	netdev <netdev@...r.kernel.org>,
	"prashant@...adcom.com" <prashant@...adcom.com>,
	"mchan@...adcom.com" <mchan@...adcom.com>
Subject: RE: [PATCH net v2] tg3: prevent ifup/ifdown during PCI error
 recovery

> > The patch fixes race conditions between PCI error recovery callbacks
> > and potential ifup/ifdown.
> >
> > First, if ifup (tg3_open) is called between tg3_io_error_detected()
> > and
> > tg3_io_resume() then tp->timer is armed twice before expiry. Once
> > during
> > tg3_open() and again during tg3_io_resume(). This results in BUG at
> > kernel/time/timer.c:945.
> >
> > Second, if ifdown (tg3_close) is called between
> > tg3_io_error_detected() and tg3_io_resume() then tg3_napi_disable() is
> > called twice without a tg3_napi_enable between. Once during
> > tg3_io_error_detected() and again during tg3_close(). The tg3_io_resume()
> then hangs on rtnl_lock().

Hi, sorry for the late response but just seen this patch.
This sounds like a general problem, i.e., one that could affect multiple drivers
[Not exactly the same issue, but a similar one].

PCI error recovery flows are bad enough without the netdevice transitioning
its state in-between the PCI callbacks.
Perhaps we should consider some general solution, e.g., preventing state
transitions during such a flow [i.e., until the PCI error recovery fully completes]?

> >
> > v2: Added logging messages per Prashant's request
> >
> > Cc: Prashant Sreedharan <prashant@...adcom.com>
> > Cc: Michael Chan <mchan@...adcom.com>
> >
> > Signed-off-by: Ivan Vecera <ivecera@...hat.com>
> 
> 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

Powered by Openwall GNU/*/Linux Powered by OpenVZ