netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Lendacky <thomas.lendacky@amd.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH net 1/2] amd-xgbe: Use __napi_schedule() in BH context
Date: Mon, 2 Dec 2019 11:19:00 -0600	[thread overview]
Message-ID: <9c632f8c-96a5-bb01-bac5-6aa0be58166a@amd.com> (raw)
In-Reply-To: <20191126222013.1904785-2-bigeasy@linutronix.de>

On 11/26/19 4:20 PM, Sebastian Andrzej Siewior wrote:
> The driver uses __napi_schedule_irqoff() which is fine as long as it is
> invoked with disabled interrupts by everybody. Since the commit
> mentioned below the driver may invoke xgbe_isr_task() in tasklet/softirq
> context. This may lead to list corruption if another driver uses
> __napi_schedule_irqoff() in IRQ context.
> 
> Use __napi_schedule() which safe to use from IRQ and softirq context.
> 
> Fixes: 85b85c853401d ("amd-xgbe: Re-issue interrupt if interrupt status not cleared")
> Cc: Tom Lendacky <thomas.lendacky@amd.com>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Acked-by: Tom Lendacky <thomas.lendacky@amd.com>

> ---
>  drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
> index 98f8f20331544..3bd20f7651207 100644
> --- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
> @@ -514,7 +514,7 @@ static void xgbe_isr_task(unsigned long data)
>  				xgbe_disable_rx_tx_ints(pdata);
>  
>  				/* Turn on polling */
> -				__napi_schedule_irqoff(&pdata->napi);
> +				__napi_schedule(&pdata->napi);
>  			}
>  		} else {
>  			/* Don't clear Rx/Tx status if doing per channel DMA
> 

  reply	other threads:[~2019-12-02 17:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-26 22:20 [PATCH net 0/2] __napi_schedule_irqoff() used in wrong context Sebastian Andrzej Siewior
2019-11-26 22:20 ` [PATCH net 1/2] amd-xgbe: Use __napi_schedule() in BH context Sebastian Andrzej Siewior
2019-12-02 17:19   ` Tom Lendacky [this message]
2020-04-16 13:52     ` Sebastian Andrzej Siewior
2020-04-16 15:19       ` Eric Dumazet
2019-11-26 22:20 ` [PATCH net 2/2] net: gro: Let the timeout timer expire in softirq context with `threadirqs' Sebastian Andrzej Siewior
2019-11-26 22:39   ` Eric Dumazet
2019-11-27  9:35     ` Sebastian Andrzej Siewior
     [not found]       ` <CANn89iL=q2wwjdSj1=veBE0hDATm_K=akKhz3Dyddnk28DRJhg@mail.gmail.com>
2019-11-27 17:11         ` Eric Dumazet
2019-11-27 17:37           ` Sebastian Andrzej Siewior
2020-04-16 13:59             ` Sebastian Andrzej Siewior
2021-03-17 14:10               ` Thomas Gleixner
2021-03-17 14:50                 ` Eric Dumazet
2019-11-27 17:22         ` Sebastian Andrzej Siewior

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=9c632f8c-96a5-bb01-bac5-6aa0be58166a@amd.com \
    --to=thomas.lendacky@amd.com \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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).