From: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
To: Saeed Mahameed <saeed@kernel.org>
Cc: netdev@vger.kernel.org, Dany Madden <drt@linux.ibm.com>,
Lijun Pan <ljp@linux.ibm.com>,
Rick Lindsley <ricklind@linux.ibm.com>
Subject: Re: [PATCH net-next v2 5/7] ibmvnic: serialize access to work queue
Date: Tue, 12 Jan 2021 16:40:49 -0800 [thread overview]
Message-ID: <20210113004049.GA216185@us.ibm.com> (raw)
In-Reply-To: <47e7f34d0c8a14eefba6aac00b08fc39cab61679.camel@kernel.org>
Saeed Mahameed [saeed@kernel.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
next prev parent reply other threads:[~2021-01-13 0:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-12 18:14 [PATCH net-next v2 0/7] ibmvnic: Use more consistent locking Sukadev Bhattiprolu
2021-01-12 18:14 ` [PATCH net-next v2 1/7] ibmvnic: restore state in change-param reset Sukadev Bhattiprolu
2021-01-12 18:35 ` Dany Madden
2021-01-12 18:14 ` [PATCH net-next v2 2/7] ibmvnic: update reset function prototypes Sukadev Bhattiprolu
2021-01-12 18:14 ` [PATCH net-next v2 3/7] ibmvnic: avoid allocating rwi entries Sukadev Bhattiprolu
2021-01-12 19:48 ` Saeed Mahameed
2021-01-13 1:15 ` Sukadev Bhattiprolu
2021-01-12 18:14 ` [PATCH net-next v2 4/7] ibmvnic: switch order of checks in ibmvnic_reset Sukadev Bhattiprolu
2021-01-12 18:14 ` [PATCH net-next v2 5/7] ibmvnic: serialize access to work queue Sukadev Bhattiprolu
2021-01-12 19:56 ` Saeed Mahameed
2021-01-13 0:40 ` Sukadev Bhattiprolu [this message]
2021-01-13 1:56 ` Jakub Kicinski
2021-01-12 18:14 ` [PATCH net-next v2 6/7] ibmvnic: check adapter->state under state_lock Sukadev Bhattiprolu
2021-01-12 18:14 ` [PATCH net-next v2 7/7] ibmvnic: add comments about state_lock Sukadev Bhattiprolu
2021-01-12 20:00 ` [PATCH net-next v2 0/7] ibmvnic: Use more consistent locking Saeed Mahameed
2021-01-13 2:00 ` Jakub Kicinski
2021-01-13 4:42 ` Sukadev Bhattiprolu
2021-01-13 18:57 ` Jakub Kicinski
2021-01-13 19:55 ` Sukadev Bhattiprolu
2021-01-14 2:35 ` Sukadev Bhattiprolu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210113004049.GA216185@us.ibm.com \
--to=sukadev@linux.ibm.com \
--cc=drt@linux.ibm.com \
--cc=ljp@linux.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=ricklind@linux.ibm.com \
--cc=saeed@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.