Re: [PATCH] Support single byte reads from integers published inprocfs by kernel/sysctl.c

From: Andrew Morton
Date: Tue Jan 24 2012 - 17:50:37 EST


On Mon, 23 Jan 2012 08:47:51 -0800
Earl Chew <echew@xxxxxxxxxxx> wrote:

> > Rereading different bytes of the integer multiple times when the integer
> > may be changing does not seem like a reasonable implementation.
>
> Yes. I agree with you. I shall re-work the patch as per your suggestion.

Yes, this is a bug and procfs should support byte-at-a-time reading of these
strings. And yes, they are strings! Of digits.

We fixed an instance of this in procfs a while ago (maybe a year ago?).
But I forget where it was. It is surprising that a bug of this nature
survived so long.

--
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/