All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	stable@vger.kernel.org, Tarun K Singh <tarun.k.singh@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-net 2/2] idpf: fix idpf_vc_core_init error path
Date: Thu, 24 Oct 2024 15:39:39 +0100	[thread overview]
Message-ID: <20241024143939.GQ1202098@kernel.org> (raw)
In-Reply-To: <20241022173527.87972-3-pavan.kumar.linga@intel.com>

On Tue, Oct 22, 2024 at 10:35:27AM -0700, Pavan Kumar Linga wrote:
> In an event where the platform running the device control plane
> is rebooted, reset is detected on the driver. It releases
> all the resources and waits for the reset to complete. Once the
> reset is done, it tries to build the resources back. At this
> time if the device control plane is not yet started, then
> the driver timeouts on the virtchnl message and retries to
> establish the mailbox again.
> 
> In the retry flow, mailbox is deinitialized but the mailbox
> workqueue is still alive and polling for the mailbox message.
> This results in accessing the released control queue leading to
> null-ptr-deref. Fix it by unrolling the work queue cancellation
> and mailbox deinitialization in the order which they got
> initialized.
> 
> Also remove the redundant scheduling of the mailbox task in
> idpf_vc_core_init.

I think it might be better to move this last change into a separate patch
targeted at iwl rather than iwl-net. It isn't a fix, right?

> 
> Fixes: 4930fbf419a7 ("idpf: add core init and interrupt request")
> Fixes: 34c21fa894a1 ("idpf: implement virtchnl transaction manager")
> Cc: stable@vger.kernel.org # 6.9+
> Reviewed-by: Tarun K Singh <tarun.k.singh@intel.com>
> Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>

...

WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	stable@vger.kernel.org, Tarun K Singh <tarun.k.singh@intel.com>
Subject: Re: [PATCH iwl-net 2/2] idpf: fix idpf_vc_core_init error path
Date: Thu, 24 Oct 2024 15:39:39 +0100	[thread overview]
Message-ID: <20241024143939.GQ1202098@kernel.org> (raw)
In-Reply-To: <20241022173527.87972-3-pavan.kumar.linga@intel.com>

On Tue, Oct 22, 2024 at 10:35:27AM -0700, Pavan Kumar Linga wrote:
> In an event where the platform running the device control plane
> is rebooted, reset is detected on the driver. It releases
> all the resources and waits for the reset to complete. Once the
> reset is done, it tries to build the resources back. At this
> time if the device control plane is not yet started, then
> the driver timeouts on the virtchnl message and retries to
> establish the mailbox again.
> 
> In the retry flow, mailbox is deinitialized but the mailbox
> workqueue is still alive and polling for the mailbox message.
> This results in accessing the released control queue leading to
> null-ptr-deref. Fix it by unrolling the work queue cancellation
> and mailbox deinitialization in the order which they got
> initialized.
> 
> Also remove the redundant scheduling of the mailbox task in
> idpf_vc_core_init.

I think it might be better to move this last change into a separate patch
targeted at iwl rather than iwl-net. It isn't a fix, right?

> 
> Fixes: 4930fbf419a7 ("idpf: add core init and interrupt request")
> Fixes: 34c21fa894a1 ("idpf: implement virtchnl transaction manager")
> Cc: stable@vger.kernel.org # 6.9+
> Reviewed-by: Tarun K Singh <tarun.k.singh@intel.com>
> Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>

...

  reply	other threads:[~2024-10-24 14:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22 17:35 [Intel-wired-lan] [PATCH iwl-net 0/2] fix reset issues Pavan Kumar Linga
2024-10-22 17:35 ` Pavan Kumar Linga
2024-10-22 17:35 ` [Intel-wired-lan] [PATCH iwl-net 1/2] idpf: avoid vport access in idpf_get_link_ksettings Pavan Kumar Linga
2024-10-22 17:35   ` Pavan Kumar Linga
2024-10-22 17:35 ` [Intel-wired-lan] [PATCH iwl-net 2/2] idpf: fix idpf_vc_core_init error path Pavan Kumar Linga
2024-10-22 17:35   ` Pavan Kumar Linga
2024-10-24 14:39   ` Simon Horman [this message]
2024-10-24 14:39     ` Simon Horman
2024-10-25 17:11     ` [Intel-wired-lan] " Linga, Pavan Kumar
2024-10-25 17:11       ` Linga, Pavan Kumar

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=20241024143939.GQ1202098@kernel.org \
    --to=horms@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=netdev@vger.kernel.org \
    --cc=pavan.kumar.linga@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=tarun.k.singh@intel.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 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.