Re: [PATCH 2/2] cifs: fix incorrect error return in build_unc_path_to_root

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 27, 2019 at 12:15 PM Steve French <smfrench@xxxxxxxxx> wrote:
>
> Do you have a simple repro for this one that would lead us to want to cc:stable

I don't have a reproducer.

>
> On Mon, Aug 26, 2019 at 8:36 PM Ronnie Sahlberg <lsahlber@xxxxxxxxxx> wrote:
> >
> > Signed-off-by: Ronnie Sahlberg <lsahlber@xxxxxxxxxx>
> > ---
> >  fs/cifs/connect.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> > index 1ed449f4a8ec..c5dc8265b671 100644
> > --- a/fs/cifs/connect.c
> > +++ b/fs/cifs/connect.c
> > @@ -4232,7 +4232,7 @@ build_unc_path_to_root(const struct smb_vol *vol,
> >         unsigned int unc_len = strnlen(vol->UNC, MAX_TREE_SIZE + 1);
> >
> >         if (unc_len > MAX_TREE_SIZE)
> > -               return -EINVAL;
> > +               return ERR_PTR(-EINVAL);
> >
> >         full_path = kmalloc(unc_len + pplen + 1, GFP_KERNEL);
> >         if (full_path == NULL)
> > --
> > 2.13.6
> >
>
>
> --
> Thanks,
>
> Steve



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux