lkml.org 
[lkml]   [2011]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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).
\
 
 \ /
  Last update: 2011-10-18 03:35    [W:1.257 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site