[lkml]   [2019]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [BUG] Use of probe_kernel_address() in task_rcu_dereference() without checking return value
On Mon, Sep 2, 2019 at 10:04 AM Eric W. Biederman <> wrote:
> I like using the storage we will later use for the rcu_head.
> Is the intention your new variable xxx start as 0, and the only
> on the second write it becomes 1 and we take action?
> That should work but it is a funny way to encode a decrement. I think
> it would be more straight forward to use refcount_dec_and_test.
> So something like this:

I like how this patch looks. It makes more sense to me than some of
the ad-hoc cases, and I wonder if this might be a pattern in general.

We have a very different "some users don't need RCU" in the dentry
code, and recently in the credential handling code. So I wonder if
this is a larger pattern, but I think your patch looks good
independently on its own.

But this is all based on "that patch _feels_ conceptually right",
rather than any deep thinking or (God forbid) any actual testing.


 \ /
  Last update: 2019-09-02 19:35    [W:0.161 / U:1.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site