Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Michael Chan <michael.chan@broadcom.com>
Cc: David Miller <davem@davemloft.net>,
	Netdev <netdev@vger.kernel.org>,
	Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Subject: Re: [PATCH net 2/2] bnxt_en: Fix NULL ptr dereference crash in bnxt_fw_reset_task()
Date: Mon, 7 Sep 2020 10:13:49 -0700	[thread overview]
Message-ID: <20200907101349.2c3f8c32@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <CACKFLimwdvnCWw6qG1ReCRW3XgSS1UEwNa=cuPFZKeb+VG2hZQ@mail.gmail.com>

On Sun, 6 Sep 2020 20:48:04 -0700 Michael Chan wrote:
> On Sun, Sep 6, 2020 at 8:13 PM Jakub Kicinski <kuba@kernel.org> wrote:
> >
> > On Sun, 6 Sep 2020 15:07:02 -0700 Michael Chan wrote:  
> > > On Sun, Sep 6, 2020 at 12:25 PM Jakub Kicinski <kuba@kernel.org> wrote:  
> > > >
> > > > devlink can itself scheduler a recovery via:
> > > >
> > > >   bnxt_fw_fatal_recover() -> bnxt_fw_reset()
> > > >  
> > >
> > > Yes, this is how it is initiated when we call devlink_health_report()
> > > to report the error condition.  From bnxt_fw_reset(), we use a
> > > workqueue because we have to go through many states, requiring
> > > sleeping/polling to transition through the states.
> > >  
> > > > no? Maybe don't make the devlink recovery path need to go via a
> > > > workqueue?  
> > >
> > > Current implementation is going through a work queue.  
> >
> > What I'm saying is the code looks like this after this patch:
> >
> > +       clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state);
> > +       bnxt_cancel_sp_work(bp);
> > +       bp->sp_event = 0;
> > +
> >         bnxt_dl_fw_reporters_destroy(bp, true);
> >
> > It cancels the work, _then_ destroys the reporter. But I think the
> > reported can be used to schedule a recovery from command line. So the
> > work may get re-scheduled after it has been canceled.  
> 
> bnxt_en does not support recovery from the command line.  We return
> -EOPNOTSUPP when it comes from the command line.
> 
> Recovery has to be triggered from a firmware reported error or a
> driver detected error.

I see it now, thanks.

  reply	other threads:[~2020-09-07 17:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-06  2:55 [PATCH net 0/2] bnxt_en: Two bug fixes Michael Chan
2020-09-06  2:55 ` [PATCH net 1/2] bnxt_en: Avoid sending firmware messages when AER error is detected Michael Chan
2020-09-06  2:55 ` [PATCH net 2/2] bnxt_en: Fix NULL ptr dereference crash in bnxt_fw_reset_task() Michael Chan
2020-09-06 19:25   ` Jakub Kicinski
2020-09-06 22:07     ` Michael Chan
2020-09-07  3:13       ` Jakub Kicinski
2020-09-07  3:48         ` Michael Chan
2020-09-07 17:13           ` Jakub Kicinski [this message]
2020-09-07 17:16 ` [PATCH net 0/2] bnxt_en: Two bug fixes Jakub Kicinski

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=20200907101349.2c3f8c32@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=vasundhara-v.volam@broadcom.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).