Re: [patch 8/9] Documentation: Fix invalid rcu assumptions

From: Vegard Nossum
Date: Thu Dec 10 2009 - 18:55:29 EST


[trimmed Cc]

>2) remove the stale signal code snippet
...
2009/12/10 Thomas Gleixner <tglx@xxxxxxxxxxxxx>:
> Index: linux-2.6-tip/Documentation/kmemcheck.txt
> ===================================================================
> --- linux-2.6-tip.orig/Documentation/kmemcheck.txt
> +++ linux-2.6-tip/Documentation/kmemcheck.txt
> @@ -429,8 +429,7 @@ Let's take a look at it:
> Â193 Â Â Â Â /*
> Â194 Â Â Â Â Â* We won't get problems with the target's UID changing under us
> Â195 Â Â Â Â Â* because changing it requires RCU be used, and if t != current, the
> -196 Â Â Â Â Â* caller must be holding the RCU readlock (by way of a spinlock) and
> -197 Â Â Â Â Â* we use RCU protection here
> +196 Â Â Â Â Â* caller must be holding the RCU readlocke
> Â198 Â Â Â Â Â*/
> Â199 Â Â Â Â user = get_uid(__task_cred(t)->user);
> Â200 Â Â Â Â atomic_inc(&user->sigpending);

I am not sure that I really agree with this change. This is not a code
example for the sake of showing how to do a particular thing, it's an
example of real code from the tree.

I don't remember if the document is referring to a particular git
version of the code, but I think it might not, in which case it
doesn't REALLY matter even on the microscopic level.

But I won't make a big fuss about it :-)


Vegard

PS: Upon closer inspection, I noticed that one line (line 197) goes
completely missing, there seems to be a typo there too, "readlocke".
Still it's not a huge deal, I admit.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/