From: "Greenman, Gregory" <gregory.greenman@intel.com>
To: "kvalo@kernel.org" <kvalo@kernel.org>
Cc: "linux@roeck-us.net" <linux@roeck-us.net>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"Berg, Johannes" <johannes.berg@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"Coelho, Luciano" <luciano.coelho@intel.com>
Subject: Re: [PATCH] iwlwifi: iwl-dbg: Use del_timer_sync() before freeing
Date: Wed, 13 Apr 2022 09:56:18 +0000 [thread overview]
Message-ID: <afd746404a74657a288a9272bf0c419c027dbd06.camel@intel.com> (raw)
In-Reply-To: <20220411154210.1870008-1-linux@roeck-us.net>
On Mon, 2022-04-11 at 08:42 -0700, Guenter Roeck wrote:
> In Chrome OS, a large number of crashes is observed due to corrupted
> timer
> lists. Steven Rostedt pointed out that this usually happens when a
> timer
> is freed while still active, and that the problem is often triggered
> by code calling del_timer() instead of del_timer_sync() just before
> freeing.
>
> Steven also identified the iwlwifi driver as one of the possible
> culprits
> since it does exactly that.
>
> Reported-by: Steven Rostedt <rostedt@goodmis.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Johannes Berg <johannes.berg@intel.com>
> Cc: Gregory Greenman <gregory.greenman@intel.com>
> Fixes: 60e8abd9d3e91 ("iwlwifi: dbg_ini: add periodic trigger new API
> support")
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> v1 (from RFC):
> Removed Shahar S Matityahu from Cc: and added Gregory Greenman.
> No functional change.
>
> I thought about the need to add a mutex to protect the timer list,
> but
> I convinced myself that it is not necessary because the code adding
> the timer list and the code removing it should never be never
> executed
> in parallel.
>
> drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
> b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
> index 866a33f49915..3237d4b528b5 100644
> --- a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
> +++ b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
> @@ -371,7 +371,7 @@ void iwl_dbg_tlv_del_timers(struct iwl_trans
> *trans)
> struct iwl_dbg_tlv_timer_node *node, *tmp;
>
> list_for_each_entry_safe(node, tmp, timer_list, list) {
> - del_timer(&node->timer);
> + del_timer_sync(&node->timer);
> list_del(&node->list);
> kfree(node);
> }
Hi Kalle,
Can you please pick it up to wireless-drivers for the next rc?
It is an important fix.
Luca has already assigned it to you in patchwork.
Thanks!
Acked-by: Gregory Greenman <gregory.greenman@intel.com>
next prev parent reply other threads:[~2022-04-13 9:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-11 15:42 Guenter Roeck
2022-04-13 9:56 ` Greenman, Gregory [this message]
2022-04-13 15:06 ` Sedat Dilek
2022-04-23 6:35 ` Kalle Valo
2022-04-23 6:33 ` Kalle Valo
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=afd746404a74657a288a9272bf0c419c027dbd06.camel@intel.com \
--to=gregory.greenman@intel.com \
--cc=johannes.berg@intel.com \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=luciano.coelho@intel.com \
--cc=netdev@vger.kernel.org \
--cc=rostedt@goodmis.org \
/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
all inboxes | Powered by JetHome®