netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Coelho, Luciano" <luciano.coelho@intel.com>
To: "linux@roeck-us.net" <linux@roeck-us.net>,
	"Greenman, Gregory" <gregory.greenman@intel.com>
Cc: "kvalo@kernel.org" <kvalo@kernel.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"rostedt@goodmis.org" <rostedt@goodmis.org>,
	"Berg, Johannes" <johannes.berg@intel.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [RFC PATCH] iwlwifi: iwl-dbg: Use del_timer_sync() before freeing
Date: Fri, 8 Apr 2022 05:20:18 +0000	[thread overview]
Message-ID: <f233cb842303e121338e2d881eec88762068d324.camel@intel.com> (raw)
In-Reply-To: <5b361192-6fd4-e84d-d6fc-e552a473c23e@roeck-us.net>

On Thu, 2022-04-07 at 12:50 -0700, Guenter Roeck wrote:
> Hi,
> 
> On 4/6/22 08:34, 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: Shahar S Matityahu <shahar.s.matityahu@intel.com>
> > Cc: Johannes Berg <johannes.berg@intel.com>
> > Fixes: 60e8abd9d3e91 ("iwlwifi: dbg_ini: add periodic trigger new API support")
> > Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> > ---
> > RFC:
> >      Maybe there was a reason to use del_timer() instead of del_timer_sync().
> >      Also, I am not sure if the change is sufficient since I don't see any
> >      obvious locking that would prevent timers from being added and then
> >      modified in iwl_dbg_tlv_set_periodic_trigs() while being removed in
> >      iwl_dbg_tlv_del_timers().
> > 
> 
> I prepared a new version of this patch, introducing a mutex to protect changes
> to periodic_trig_list. I'd like to get some feedback before sending it out,
> though, so I'll wait until next week before sending it.
> 
> If you have any feedback/thoughts/comments, please let me know.

Hi Guenter,

Thanks for your proposal!

I recently moved from the Intel WiFi team to the Graphics team, so I'm
adding Gregory, who has taken over my duties, to the discussion.

I don't recall any specific reasons for using del_timer() instead of
del_timer_sync() here.  So your patch does look correct to me.

--
Cheers,
Luca.

  reply	other threads:[~2022-04-08  5:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06 15:34 [RFC PATCH] iwlwifi: iwl-dbg: Use del_timer_sync() before freeing Guenter Roeck
2022-04-07 19:50 ` Guenter Roeck
2022-04-08  5:20   ` Coelho, Luciano [this message]
2022-04-08 22:30     ` Guenter Roeck

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=f233cb842303e121338e2d881eec88762068d324.camel@intel.com \
    --to=luciano.coelho@intel.com \
    --cc=gregory.greenman@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --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;
as well as URLs for NNTP newsgroup(s).