On Thu, 05 Jun 2008 15:31:37 +0800
Ian Kent <email@example.com> wrote:
Should have been ENOMEM, I guess.
OK, so here we work out that autofs4_init_ino() had to allocate a new
autofs_info and if so, free it here. It took me a moment..
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?
I'm suspecting we can zap a lump of code and just do
cp = kstrdup(symname, GFP_KERNEL);
Anyway, please check that.
This all looks very similar to the code in autofs4_dir_symlink(). Some
refactoring might be needed at some stage?