Messages in this thread | | | Date | Mon, 17 Oct 2011 18:33:10 -0700 (PDT) | From | David Rientjes <> | Subject | Re: [patch] Avoid using hardcoded values in kernel/sys.c |
| |
On Mon, 17 Oct 2011, Linus Torvalds wrote:
> > The release field of struct new_utsname may always change, so avoid > > hardcoded values when setting up a buffer to copy to it. > > This patch is totally bogus. > > > +static int override_release(char __user *release) > > { > > + const int len = sizeof(release); >
Right, I meant to pass the struct in and use sizeof(release->name), but I was under the impression that wouldn't count as a variable length array or be compiled as such by ISO99 standards because it's a constant expression (as the standard says is not variable length). | |