public inbox for linux-remoteproc@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Navid Emamdoost <navid.emamdoost@gmail.com>
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
	linux-remoteproc@vger.kernel.org,
	Navid Emamdoost <emamd001@umn.edu>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rpmsg: char: release allocated memory
Date: Thu, 21 Nov 2019 15:35:38 -0800	[thread overview]
Message-ID: <20191121233535.GW18024@yoga> (raw)
In-Reply-To: <CAEkB2EQTO3wtCrZgLv068xGpxJYwir_SuMUBK0jGaTU6KdCRNg@mail.gmail.com>

On Thu 21 Nov 10:20 PST 2019, Navid Emamdoost wrote:

> On Mon, Sep 16, 2019 at 10:31 PM Navid Emamdoost
> <navid.emamdoost@gmail.com> wrote:
> >
> > In rpmsg_eptdev_write_iter, if copy_from_iter_full fails the allocated
> > buffer needs to be released.
> >
> > Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
> 
> Would you please review this patch?
> 

I'm sorry, I must have missed to reply as I applied the patch. You can
find it in the rpmsg-next branch [1] and it will be part of the pull
request for v5.5

[1] https://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc.git/log/?h=rpmsg-next

Regards,
Bjorn

> Thank you,
> 
> > ---
> >  drivers/rpmsg/rpmsg_char.c | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/rpmsg/rpmsg_char.c b/drivers/rpmsg/rpmsg_char.c
> > index eea5ebbb5119..c655074c07c2 100644
> > --- a/drivers/rpmsg/rpmsg_char.c
> > +++ b/drivers/rpmsg/rpmsg_char.c
> > @@ -227,8 +227,10 @@ static ssize_t rpmsg_eptdev_write_iter(struct kiocb *iocb,
> >         if (!kbuf)
> >                 return -ENOMEM;
> >
> > -       if (!copy_from_iter_full(kbuf, len, from))
> > -               return -EFAULT;
> > +       if (!copy_from_iter_full(kbuf, len, from)) {
> > +               ret = -EFAULT;
> > +               goto free_kbuf;
> > +       }
> >
> >         if (mutex_lock_interruptible(&eptdev->ept_lock)) {
> >                 ret = -ERESTARTSYS;
> > --
> > 2.17.1
> >
> 
> 
> -- 
> Navid.

  reply	other threads:[~2019-11-21 23:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-17  3:31 [PATCH] rpmsg: char: release allocated memory Navid Emamdoost
2019-11-21 18:20 ` Navid Emamdoost
2019-11-21 23:35   ` Bjorn Andersson [this message]
2019-11-21 23:54     ` Navid Emamdoost

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=20191121233535.GW18024@yoga \
    --to=bjorn.andersson@linaro.org \
    --cc=emamd001@umn.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=navid.emamdoost@gmail.com \
    --cc=ohad@wizery.com \
    /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