Search Linux Wireless

Re: [RFC PATCH] iwlwifi: iwl-dbg: Use del_timer_sync() before freeing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
> > Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
> > Cc: Shahar S Matityahu <shahar.s.matityahu@xxxxxxxxx>
> > Cc: Johannes Berg <johannes.berg@xxxxxxxxx>
> > Fixes: 60e8abd9d3e91 ("iwlwifi: dbg_ini: add periodic trigger new API support")
> > Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
> > ---
> > 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.




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux