All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Jiawen Wu <jiawenwu@trustnetic.com>
Cc: davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	horms@kernel.org, andrew@lunn.ch, netdev@vger.kernel.org,
	przemyslaw.kitszel@intel.com, mengyuanlou@net-swift.com,
	duanqiangwen@net-swift.com
Subject: Re: [PATCH net v2 2/2] net/txgbe: add extra handle for MSI/INTx into thread irq handle
Date: Thu, 27 Jun 2024 16:43:45 -0700	[thread overview]
Message-ID: <20240627164345.3273b3c2@kernel.org> (raw)
In-Reply-To: <20240626060703.31652-3-jiawenwu@trustnetic.com>

On Wed, 26 Jun 2024 14:07:03 +0800 Jiawen Wu wrote:
> Moreover, do not free isb resources in .ndo_stop, to avoid reading
> memory by a null pointer.

Please provide more detail on the sequence of events leading to the
null-defer.

>  	pdev->irq = pci_irq_vector(pdev, 0);
> +	wx->num_q_vectors = 1;

this doesn't seem obviously related

>  
>  	return 0;
>  }
> @@ -2027,6 +2028,9 @@ int wx_setup_isb_resources(struct wx *wx)
>  {
>  	struct pci_dev *pdev = wx->pdev;
>  
> +	if (wx->isb_mem)
> +		return 0;
> +
>  	wx->isb_mem = dma_alloc_coherent(&pdev->dev,
>  					 sizeof(u32) * 4,
>  					 &wx->isb_dma,
> @@ -2050,6 +2054,9 @@ void wx_free_isb_resources(struct wx *wx)
>  {
>  	struct pci_dev *pdev = wx->pdev;
>  
> +	if (!wx->isb_mem)
> +		return;
> +

And neither does this. Why do you need to make these function
idempotent?
-- 
pw-bot: cr

  reply	other threads:[~2024-06-27 23:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26  6:07 [PATCH net v2 0/2] net: txgbe: fix MSI and INTx interrupts Jiawen Wu
2024-06-26  6:07 ` [PATCH net v2 1/2] net: txgbe: remove separate irq request for MSI and INTx Jiawen Wu
2024-06-27 23:41   ` Jakub Kicinski
2024-06-28  1:47     ` Jiawen Wu
2024-06-26  6:07 ` [PATCH net v2 2/2] net/txgbe: add extra handle for MSI/INTx into thread irq handle Jiawen Wu
2024-06-27 23:43   ` Jakub Kicinski [this message]
2024-06-28  2:16     ` Jiawen Wu

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=20240627164345.3273b3c2@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=duanqiangwen@net-swift.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jiawenwu@trustnetic.com \
    --cc=mengyuanlou@net-swift.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@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.