Message ID | 20190827013558.18281-2-lsahlber@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] cifs: create a helper to find a writeable handle py path name | expand |
Do you have a simple repro for this one that would lead us to want to cc:stable On Mon, Aug 26, 2019 at 8:36 PM Ronnie Sahlberg <lsahlber@redhat.com> wrote: > > Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> > --- > 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 >
On Tue, Aug 27, 2019 at 12:15 PM Steve French <smfrench@gmail.com> 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@redhat.com> wrote: > > > > Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> > > --- > > 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
I fixed this in an earlier patch of yours On Mon, Aug 26, 2019 at 8:36 PM Ronnie Sahlberg <lsahlber@redhat.com> wrote: > > Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> > --- > 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 >
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)
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> --- fs/cifs/connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)