lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8db2e1cd-553e-4082-a018-ec269592b69f@molgen.mpg.de>
Date: Tue, 18 Feb 2025 21:12:38 +0100
From: Paul Menzel <pmenzel@...gen.mpg.de>
To: Frederic Weisbecker <frederic@...nel.org>,
 Francois Romieu <romieu@...zoreil.com>
Cc: LKML <linux-kernel@...r.kernel.org>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Simon Horman <horms@...nel.org>, Hayes Wang <hayeswang@...ltek.com>,
 linux-usb@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 2/2] r8152: Call napi_schedule() from proper context

Dear Frederic, dear Francois,


Thank you for the patch and review.


Am 12.02.25 um 21:58 schrieb Frederic Weisbecker:
> Le Wed, Feb 12, 2025 at 09:49:29PM +0100, Francois Romieu a écrit :
>> Frederic Weisbecker <frederic@...nel.org> :
>> [...]
>>> r8152 may call napi_schedule() on device resume time from a bare task
>>> context without disabling softirqs as the following trace shows:
>> [...]
>>> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
>>> index 468c73974046..1325460ae457 100644
>>> --- a/drivers/net/usb/r8152.c
>>> +++ b/drivers/net/usb/r8152.c
>>> @@ -8537,8 +8537,11 @@ static int rtl8152_runtime_resume(struct r8152 *tp)
>>>   		clear_bit(SELECTIVE_SUSPEND, &tp->flags);
>>>   		smp_mb__after_atomic();
>>>   
>>> -		if (!list_empty(&tp->rx_done))
>>> +		if (!list_empty(&tp->rx_done)) {
>>> +			local_bh_disable();
>>>   			napi_schedule(&tp->napi);
>>> +			local_bh_enable();
>>> +		}
>>
>> AFAIU drivers/net/usb/r8152.c::rtl_work_func_t exhibits the same
>> problem.
> 
> It's a workqueue function and softirqs don't seem to be disabled.
> Looks like a goot catch!

Tested-by: Paul Menzel <pmenzel@...gen.mpg.de>

Are you going to send a v2, so it might get into Linux 6.14, or is it 
too late anyway?


Kind regards,

Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ