lkml.org 
[lkml]   [2023]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH net,v3] net: mana: Fix accessing freed irq affinity_hint
Date


> -----Original Message-----
> From: Jakub Kicinski <kuba@kernel.org>
> Sent: Monday, February 6, 2023 9:33 PM
> To: Haiyang Zhang <haiyangz@microsoft.com>
> Cc: linux-hyperv@vger.kernel.org; netdev@vger.kernel.org; Dexuan Cui
> <decui@microsoft.com>; KY Srinivasan <kys@microsoft.com>; Paul Rosswurm
> <paulros@microsoft.com>; olaf@aepfle.de; vkuznets@redhat.com;
> davem@davemloft.net; wei.liu@kernel.org; edumazet@google.com;
> pabeni@redhat.com; leon@kernel.org; Long Li <longli@microsoft.com>;
> ssengar@linux.microsoft.com; linux-kernel@vger.kernel.org;
> stable@vger.kernel.org
> Subject: Re: [PATCH net,v3] net: mana: Fix accessing freed irq affinity_hint
>
> On Mon, 6 Feb 2023 13:28:49 -0800 Haiyang Zhang wrote:
> > After calling irq_set_affinity_and_hint(), the cpumask pointer is
> > saved in desc->affinity_hint, and will be used later when reading
> > /proc/irq/<num>/affinity_hint. So the cpumask variable needs to be
> > persistent. Otherwise, we are accessing freed memory when reading
> > the affinity_hint file.
> >
> > Also, need to clear affinity_hint before free_irq(), otherwise there
> > is a one-time warning and stack trace during module unloading:
>
> What's the difference from the previous posting? Did you just resend it?

Previously, it failed the auto-check due to some people were not CC-ed.
I resent it with more CCs.

Thanks,
- Haiyang

\
 
 \ /
  Last update: 2023-03-27 00:12    [W:0.060 / U:2.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site