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:	Tue, 7 Jun 2016 10:49:21 +0800
From:	Ming Lei <ming.lei@...onical.com>
To:	Minfei Huang <mnghuan@...il.com>
Cc:	Jens Axboe <axboe@...com>, Al Viro <viro@...iv.linux.org.uk>,
	Jeff Moyer <jmoyer@...hat.com>,
	Sagi Grimberg <sagig@...lanox.com>,
	Miklos Szeredi <mszeredi@...e.cz>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] loop: Make user notify for adding loop device failed

On Tue, Jun 7, 2016 at 10:05 AM, Minfei Huang <mnghuan@...il.com> wrote:
> There is no error number returned if loop driver fails in function
> alloc_disk to add new loop device. Add a correct error number to make
> user notify in this case.
>
> Signed-off-by: Minfei Huang <mnghuan@...il.com>

Good catch!

Reviewed-by: Ming Lei <tom.leiming@...il.com>

> ---
>  drivers/block/loop.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/block/loop.c b/drivers/block/loop.c
> index 1fa8cc2..2caaf6f 100644
> --- a/drivers/block/loop.c
> +++ b/drivers/block/loop.c
> @@ -1765,6 +1765,7 @@ static int loop_add(struct loop_device **l, int i)
>          */
>         queue_flag_set_unlocked(QUEUE_FLAG_NOMERGES, lo->lo_queue);
>
> +       err = -ENOMEM;
>         disk = lo->lo_disk = alloc_disk(1 << part_shift);
>         if (!disk)
>                 goto out_free_queue;
> --
> 2.7.4 (Apple Git-66)
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ