lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 21 Nov 2019 15:35:35 -0800
From:   Bjorn Andersson <bjorn.andersson@...aro.org>
To:     Navid Emamdoost <navid.emamdoost@...il.com>
Cc:     Ohad Ben-Cohen <ohad@...ery.com>, linux-remoteproc@...r.kernel.org,
        Navid Emamdoost <emamd001@....edu>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] rpmsg: char: release allocated memory

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

> On Mon, Sep 16, 2019 at 10:31 PM Navid Emamdoost
> <navid.emamdoost@...il.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@...il.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ