Messages in this thread |  | | | Subject | Re: Linux 2.6.26-rc4 | | From | Ian Kent <> | | Date | Fri, 27 Jun 2008 12:18:19 +0800 | |
On Thu, 2008-06-05 at 15:30 -0700, Andrew Morton wrote:
> >
> > + ino->u.symlink = cp;
> > + ino->size = strlen(symname);
> > dir->i_mtime = CURRENT_TIME;
>
> This all seems a bit ungainly. I assume that on entry to
> autofs4_dir_symlink(), ino->size is equal to strlen(symname)? If it's
> not, that strcpy() will overrun.
>
> But if ino->size _is_ equal to strlen(symname) then why did we just
> recalculate the same thing?
Oops.
I've fixed that in my git tree just now.
>
> I'm suspecting we can zap a lump of code and just do
>
> cp = kstrdup(symname, GFP_KERNEL);
>
> Anyway, please check that.
Yep, but fix now re-factor later.
Ian
|  |