[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210113004049.GA216185@us.ibm.com>
Date: Tue, 12 Jan 2021 16:40:49 -0800
From: Sukadev Bhattiprolu <sukadev@...ux.ibm.com>
To: Saeed Mahameed <saeed@...nel.org>
Cc: netdev@...r.kernel.org, Dany Madden <drt@...ux.ibm.com>,
Lijun Pan <ljp@...ux.ibm.com>,
Rick Lindsley <ricklind@...ux.ibm.com>
Subject: Re: [PATCH net-next v2 5/7] ibmvnic: serialize access to work queue
Saeed Mahameed [saeed@...nel.org] wrote:
> On Tue, 2021-01-12 at 10:14 -0800, Sukadev Bhattiprolu wrote:
<snip>
> > @@ -5467,7 +5472,15 @@ static int ibmvnic_remove(struct vio_dev *dev)
> > return -EBUSY;
> > }
> >
> > + /* If ibmvnic_reset() is scheduling a reset, wait for it to
> > + * finish. Then prevent it from scheduling any more resets
> > + * and have the reset functions ignore any resets that have
> > + * already been scheduled.
> > + */
> > + spin_lock_irqsave(&adapter->remove_lock, flags);
> > adapter->state = VNIC_REMOVING;
> > + spin_unlock_irqrestore(&adapter->remove_lock, flags);
> > +
>
> Why irqsave/restore variants ? are you expecting this spinlock to be
> held in interruptcontext ?
>
> > spin_unlock_irqrestore(&adapter->state_lock, flags);
Good question.
One of the callers of ibmvnic_reset() is the ->ndo_tx_timeout()
method which gets called from the watchdog timer.
Thanks for the review.
Sukadev
Powered by blists - more mailing lists