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, 22 Nov 2022 16:44:34 +0100
From:   Ulf Hansson <ulf.hansson@...aro.org>
To:     Jiasheng Jiang <jiasheng@...as.ac.cn>
Cc:     maximlevitsky@...il.com, oakad@...oo.com,
        christophe.jaillet@...adoo.fr, axboe@...nel.dk, hare@...e.de,
        linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] memstick/ms_block: Add check for alloc_ordered_workqueue

On Tue, 22 Nov 2022 at 10:19, Jiasheng Jiang <jiasheng@...as.ac.cn> wrote:
>
> As the alloc_ordered_workqueue may return NULL pointer,
> it should be better to add check for the return
> value.
>
> Fixes: 0ab30494bc4f ("memstick: add support for legacy memorysticks")
> Signed-off-by: Jiasheng Jiang <jiasheng@...as.ac.cn>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/memstick/core/ms_block.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/memstick/core/ms_block.c b/drivers/memstick/core/ms_block.c
> index ba8414519515..ccfdb3dea30a 100644
> --- a/drivers/memstick/core/ms_block.c
> +++ b/drivers/memstick/core/ms_block.c
> @@ -2116,6 +2116,9 @@ static int msb_init_disk(struct memstick_dev *card)
>         dbg("Set total disk size to %lu sectors", capacity);
>
>         msb->io_queue = alloc_ordered_workqueue("ms_block", WQ_MEM_RECLAIM);
> +       if (!msb->io_queue)
> +               goto out_cleanup_disk;
> +
>         INIT_WORK(&msb->io_work, msb_io_work);
>         sg_init_table(msb->prealloc_sg, MS_BLOCK_MAX_SEGS+1);
>
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ