[linux-cifs-client] [PATCH] [CIFS] Prevent OOPs when mounting with remote prefixpath

Jeff Layton jlayton at redhat.com
Wed Feb 4 13:31:34 GMT 2009


On Wed, 04 Feb 2009 16:25:46 +0300
Igor Mammedov <niallain at gmail.com> wrote:

> Patch with Jeff's suggestions is attached.
> 
> Jeff Layton wrote:
> > On Wed, 04 Feb 2009 13:35:16 +0300
> ...
> > 
> > Maybe something like:
> > 
> >     cERROR(1, ("Path %s not accessable: %d", full_path, rc));
> > 
> > ...of course, you'd need to not kfree full_path until after this is
> > printed but that's not too tough.
> > 
> > Won't this error also fire when trying to mount with an inaccessable
> > prefixpath, even if DFS is involved? If so, then mentioning DFS in
> > the error is probably going to be confusing for users/admins.
> > 
> > Actually, there's another problem too. If build_path_to_root ends up
> > returning NULL, then we'll just skip this check. Shouldn't we return
> > -ENOMEM or something at that point? It's probably better to fail the
> > mount than to leave the client subject to a later oops...
> > 
> 

Looks good to me:

Acked-by: Jeff Layton <jlayton at redhat.com>


More information about the linux-cifs-client mailing list