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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 6 Feb 2014 10:43:49 +0000 From: David Vrabel <david.vrabel@...rix.com> To: Nithin Nayak Sujir <nsujir@...adcom.com> CC: <netdev@...r.kernel.org>, Michael Chan <mchan@...adcom.com> Subject: Re: [PATCHv1 net] tg3: fix deadlock in tg3_change_mtu() On 05/02/14 22:09, Nithin Nayak Sujir wrote: > > David, > Rather than doing it this way, I think it's sufficient to move the call > to tg3_set_mtu() between tg3_netif_stop() and tg3_full_lock(). > > Before tg3 started using set_bit() for flags, tg3_set_mtu() needed to be > under a lock, but that's not the case anymore. > > Can you try this patch? That looks better. Tested-by: David Vrabel <david.vrabel@...rix.com> Thanks. David > diff --git a/drivers/net/ethernet/broadcom/tg3.c > b/drivers/net/ethernet/broadcom/tg3.c > index e2ca03e..0bb79b8 100644 > --- a/drivers/net/ethernet/broadcom/tg3.c > +++ b/drivers/net/ethernet/broadcom/tg3.c > @@ -14113,12 +14113,12 @@ static int tg3_change_mtu(struct net_device > *dev, int new_mtu) > > tg3_netif_stop(tp); > > + tg3_set_mtu(dev, tp, new_mtu); > + > tg3_full_lock(tp, 1); > > tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); > > - tg3_set_mtu(dev, tp, new_mtu); > - > /* Reset PHY, otherwise the read DMA engine will be in a mode that > * breaks all requests to 256 bytes. > */ > > Nithin. -- 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