All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Duoming Zhou <duoming@zju.edu.cn>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	jesse.brandeburg@intel.com, edumazet@google.com,
	anthony.l.nguyen@intel.com, intel-wired-lan@lists.osuosl.org,
	pabeni@redhat.com, davem@davemloft.net
Subject: Re: [Intel-wired-lan] [PATCH net] ethernet: ixgb: fix use after free bugs caused by circular dependency problem
Date: Thu, 20 Apr 2023 07:36:19 -0700	[thread overview]
Message-ID: <20230420073619.6001cb27@kernel.org> (raw)
In-Reply-To: <20230420140157.22416-1-duoming@zju.edu.cn>

On Thu, 20 Apr 2023 22:01:57 +0800 Duoming Zhou wrote:
> The watchdog_timer can schedule tx_timeout_task and tx_timeout_task
> can also arm watchdog_timer. The process is shown below:
> 
> ----------- timer schedules work ------------
> ixgb_watchdog() //timer handler
>   schedule_work(&adapter->tx_timeout_task)
> 
> ----------- work arms timer ------------
> ixgb_tx_timeout_task() //workqueue callback function
>   ixgb_up()
>     mod_timer(&adapter->watchdog_timer,...)
> 
> When ixgb device is detaching, the timer and workqueue
> could still be rearmed. The process is shown below:
> 
>   (cleanup routine)           |  (timer and workqueue routine)
> ixgb_remove()                 |
>                               | ixgb_tx_timeout_task() //workqueue
>                               |   ixgb_up()
>                               |     mod_timer()
>   cancel_work_sync()          |
>   free_netdev(netdev) //FREE  | ixgb_watchdog() //timer
>                               |   netif_carrier_ok(netdev) //USE
> 
> This patch adds timer_shutdown_sync() in ixgb_remove(), which
> could prevent rearming of the timer from the workqueue.
> 
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>

The driver has been removed. No point.
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

WARNING: multiple messages have this Message-ID (diff)
From: Jakub Kicinski <kuba@kernel.org>
To: Duoming Zhou <duoming@zju.edu.cn>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com,
	davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	intel-wired-lan@lists.osuosl.org
Subject: Re: [PATCH net] ethernet: ixgb: fix use after free bugs caused by circular dependency problem
Date: Thu, 20 Apr 2023 07:36:19 -0700	[thread overview]
Message-ID: <20230420073619.6001cb27@kernel.org> (raw)
In-Reply-To: <20230420140157.22416-1-duoming@zju.edu.cn>

On Thu, 20 Apr 2023 22:01:57 +0800 Duoming Zhou wrote:
> The watchdog_timer can schedule tx_timeout_task and tx_timeout_task
> can also arm watchdog_timer. The process is shown below:
> 
> ----------- timer schedules work ------------
> ixgb_watchdog() //timer handler
>   schedule_work(&adapter->tx_timeout_task)
> 
> ----------- work arms timer ------------
> ixgb_tx_timeout_task() //workqueue callback function
>   ixgb_up()
>     mod_timer(&adapter->watchdog_timer,...)
> 
> When ixgb device is detaching, the timer and workqueue
> could still be rearmed. The process is shown below:
> 
>   (cleanup routine)           |  (timer and workqueue routine)
> ixgb_remove()                 |
>                               | ixgb_tx_timeout_task() //workqueue
>                               |   ixgb_up()
>                               |     mod_timer()
>   cancel_work_sync()          |
>   free_netdev(netdev) //FREE  | ixgb_watchdog() //timer
>                               |   netif_carrier_ok(netdev) //USE
> 
> This patch adds timer_shutdown_sync() in ixgb_remove(), which
> could prevent rearming of the timer from the workqueue.
> 
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>

The driver has been removed. No point.

  reply	other threads:[~2023-04-20 14:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20 14:01 [Intel-wired-lan] [PATCH net] ethernet: ixgb: fix use after free bugs caused by circular dependency problem Duoming Zhou
2023-04-20 14:01 ` Duoming Zhou
2023-04-20 14:36 ` Jakub Kicinski [this message]
2023-04-20 14:36   ` 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=20230420073619.6001cb27@kernel.org \
    --to=kuba@kernel.org \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=duoming@zju.edu.cn \
    --cc=edumazet@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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.