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] [day] [month] [year] [list]
Date:   Tue, 12 Mar 2019 10:22:04 -0700
From:   Song Liu <liu.song.a23@...il.com>
To:     Guoqing Jiang <gqjiang@...e.com>
Cc:     Aditya Pakki <pakki001@....edu>, kjlu@....edu,
        Shaohua Li <shli@...nel.org>,
        linux-raid <linux-raid@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] md: Fix failed allocation of md_register_thread

On Thu, Mar 7, 2019 at 7:13 PM Guoqing Jiang <gqjiang@...e.com> wrote:
>
>
>
> On 3/5/19 6:48 AM, Aditya Pakki wrote:
> > mddev->sync_thread can be set to NULL on kzalloc failure downstream.
> > The patch checks for such a scenario and frees allocated resources.
> >
> > Signed-off-by: Aditya Pakki <pakki001@....edu>

Applied to https://github.com/liu-song-6/linux/tree/for-5.1/md-post

@Guoqing, I added your Acked-by to the commit and also the raid5 fix.

Thanks,
Song

> > ---
> >   drivers/md/raid10.c | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
> > index abb5d382f64d..f52b4d9bcd24 100644
> > --- a/drivers/md/raid10.c
> > +++ b/drivers/md/raid10.c
> > @@ -3939,6 +3939,8 @@ static int raid10_run(struct mddev *mddev)
> >               set_bit(MD_RECOVERY_RUNNING, &mddev->recovery);
> >               mddev->sync_thread = md_register_thread(md_do_sync, mddev,
> >                                                       "reshape");
> > +             if (!mddev->sync_thread)
> > +                     goto out_free_conf;
> >       }
> >
> >       return 0;
>
> Could you make the change for raid5 as well? It also doesn't check the
> failure
> in raid5_run.
>
> Thanks,
> Guoqing

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ