[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160311230957.GA16117@hmsreliant.think-freely.org>
Date: Fri, 11 Mar 2016 18:09:57 -0500
From: Neil Horman <nhorman@...driver.com>
To: Shrikrishna Khare <skhare@...are.com>
Cc: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
davem@...emloft.net, netdev@...r.kernel.org, pv-drivers@...are.com
Subject: Re: [PATCH] vmxnet3: avoid calling pskb_may_pull with interrupts
disabled
On Fri, Mar 11, 2016 at 11:41:42AM -0800, Shrikrishna Khare wrote:
>
>
> On Fri, 11 Mar 2016, Tetsuo Handa wrote:
>
> > Neil Horman wrote:
> > > On Mon, Mar 07, 2016 at 03:16:14PM -0500, David Miller wrote:
> > > > From: Neil Horman <nhorman@...driver.com>
> > > > Date: Fri, 4 Mar 2016 13:40:48 -0500
> >
> > This patch is calling spin_unlock_irqrestore() without spin_lock_irqsave().
> >
> > In file included from include/linux/seqlock.h:35:0,
> > from include/linux/time.h:5,
> > from include/linux/stat.h:18,
> > from include/linux/module.h:10,
> > from drivers/net/vmxnet3/vmxnet3_drv.c:27:
> > drivers/net/vmxnet3/vmxnet3_drv.c: In function 'vmxnet3_xmit_frame':
> > include/linux/spinlock.h:246:30: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
> > _raw_spin_unlock_irqrestore(lock, flags); \
> > ^
> > drivers/net/vmxnet3/vmxnet3_drv.c:977:16: note: 'flags' was declared here
> > unsigned long flags;
> > ^
> >
> > vmxnet3_tq_xmit(struct sk_buff *skb, struct vmxnet3_tx_queue *tq,
> > struct vmxnet3_adapter *adapter, struct net_device *netdev)
> > {
> > (...snipped...)
> > goto hdr_too_big;
> > (...snipped...)
> > spin_lock_irqsave(&tq->tx_lock, flags);
> > (...snipped...)
> > spin_unlock_irqrestore(&tq->tx_lock, flags);
> > (...snipped...)
> > return NETDEV_TX_OK;
> > (...snipped...)
> > hdr_too_big:
> > tq->stats.drop_oversized_hdr++;
> > unlock_drop_pkt:
> > spin_unlock_irqrestore(&tq->tx_lock, flags);
> > (...snipped...)
> > return NETDEV_TX_OK;
> > }
> >
> Thank you for reporting this. Will send out a fix later today.
>
Shoot, sorry about that, I'm traveling today, but the fix looks easy. If you
can send it out please Shrikrishna, I'd appreciate it.
Neil
Powered by blists - more mailing lists