Re: [PATCH v2] rcu/nocb: Add Safe checks for access offloaded rdp

From: Joel Fernandes
Date: Fri May 09 2025 - 14:56:54 EST




On 5/9/2025 9:33 AM, Frederic Weisbecker wrote:
> Le Thu, May 08, 2025 at 02:43:11PM +0800, Z qiang a écrit :
>> On Thu, May 8, 2025 at 12:25 AM Frederic Weisbecker <frederic@xxxxxxxxxx> wrote:
>>> On a second thought, isn't "rdp == this_cpu_ptr(&rcu_data)" enough?
>>
>> If the CONFIG_DEBUG_PREEMPT=y, the following code will cause
>> a warning in rcuop kthreads:
>>
>> WARN_ON_ONCE(!rcu_rdp_is_offloaded(rdp))
>
> I keep forgetting that, indeed!
>
> Looks good then, thanks.
>
> Reviewed-by: Frederic Weisbecker <frederic@xxxxxxxxxx>
>

Applying for v6.16 with the tag.

thanks,

- Joel