[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOhMmr78mzJpfPBSwp9JWmE+KwLxd6JtqpwaA9tmqxU5fCjcgg@mail.gmail.com>
Date: Thu, 21 Jan 2021 13:48:25 -0600
From: Lijun Pan <lijunp213@...il.com>
To: Dany Madden <drt@...ux.ibm.com>
Cc: Lijun Pan <ljp@...ux.ibm.com>, netdev@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, sukadev@...ux.ibm.com,
mpe@...erman.id.au, julietk@...ux.vnet.ibm.com,
benh@...nel.crashing.org, paulus@...ba.org, davem@...emloft.net,
Jakub Kicinski <kuba@...nel.org>, gregkh@...uxfoundation.org,
kernel@...gutronix.de,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
Subject: Re: [PATCH net] ibmvnic: device remove has higher precedence over reset
> > diff --git a/drivers/net/ethernet/ibm/ibmvnic.c
> > b/drivers/net/ethernet/ibm/ibmvnic.c
> > index aed985e08e8a..11f28fd03057 100644
> > --- a/drivers/net/ethernet/ibm/ibmvnic.c
> > +++ b/drivers/net/ethernet/ibm/ibmvnic.c
> > @@ -2235,8 +2235,7 @@ static void __ibmvnic_reset(struct work_struct
> > *work)
> > while (rwi) {
> > spin_lock_irqsave(&adapter->state_lock, flags);
> >
> > - if (adapter->state == VNIC_REMOVING ||
> > - adapter->state == VNIC_REMOVED) {
> > + if (adapter->state == VNIC_REMOVED) {
>
> If we do get here, we would crash because ibmvnic_remove() happened. It
> frees the adapter struct already.
Not exactly. viodev is gone; netdev is gone; ibmvnic_adapter is still there.
Lijun
Powered by blists - more mailing lists