From: Steve French <smfrench@gmail.com>
To: Pavel Shilovsky <piastryyy@gmail.com>
Cc: Chuhong Yuan <hslester96@gmail.com>,
Steve French <sfrench@samba.org>,
linux-cifs <linux-cifs@vger.kernel.org>,
samba-technical <samba-technical@lists.samba.org>,
Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cifs: Fix missed free operations
Date: Mon, 14 Oct 2019 23:53:38 -0500 [thread overview]
Message-ID: <CAH2r5msPBvF298mWgz_1Jx9svHY1NyqNti4G9TUaNdEqg=A=CQ@mail.gmail.com> (raw)
In-Reply-To: <CAKywueQY-J3g0RBF4=opP8SbhpWh-BHoHWzNEeTruxmfacnhGw@mail.gmail.com>
Merged into cifs-2.6.git for-next and cc: stable for 5.3
On Mon, Oct 14, 2019 at 4:43 PM Pavel Shilovsky via samba-technical
<samba-technical@lists.samba.org> wrote:
>
> пн, 14 окт. 2019 г. в 00:18, Chuhong Yuan <hslester96@gmail.com>:
> >
> > cifs_setattr_nounix has two paths which miss free operations
> > for xid and fullpath.
> > Use goto cifs_setattr_exit like other paths to fix them.
> >
> > Fixes: aa081859b10c ("cifs: flush before set-info if we have writeable handles")
> > Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
> > ---
> > fs/cifs/inode.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
> > index 5dcc95b38310..df9377828e2f 100644
> > --- a/fs/cifs/inode.c
> > +++ b/fs/cifs/inode.c
> > @@ -2475,9 +2475,9 @@ cifs_setattr_nounix(struct dentry *direntry, struct iattr *attrs)
> > rc = tcon->ses->server->ops->flush(xid, tcon, &wfile->fid);
> > cifsFileInfo_put(wfile);
> > if (rc)
> > - return rc;
> > + goto cifs_setattr_exit;
> > } else if (rc != -EBADF)
> > - return rc;
> > + goto cifs_setattr_exit;
> > else
> > rc = 0;
> > }
> > --
> > 2.20.1
> >
>
> Looks good, thanks.
>
> Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
>
> The original patch was tagged for stable, so, it seems that this one
> should be tagged too.
>
> --
> Best regards,
> Pavel Shilovsky
>
--
Thanks,
Steve
prev parent reply other threads:[~2019-10-15 4:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-14 7:15 [PATCH] cifs: Fix missed free operations Chuhong Yuan
2019-10-14 21:43 ` Pavel Shilovsky
2019-10-15 4:53 ` Steve French [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH2r5msPBvF298mWgz_1Jx9svHY1NyqNti4G9TUaNdEqg=A=CQ@mail.gmail.com' \
--to=smfrench@gmail.com \
--cc=hslester96@gmail.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=piastryyy@gmail.com \
--cc=samba-technical@lists.samba.org \
--cc=sfrench@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).