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]
Message-ID: <20081120073501.GZ26308@kernel.dk>
Date:	Thu, 20 Nov 2008 08:35:01 +0100
From:	Jens Axboe <jens.axboe@...cle.com>
To:	crquan@...il.com
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [GENDISK] fix disk_part_tbl always alloced in node 0: set node_id before refered in alloc_disk

On Thu, Nov 20 2008, crquan@...il.com wrote:
> From: Cheng Renquan <crquan@...il.com>
> 
> disk->node_id will be refered in allocating in disk_expand_part_tbl, so we
> should set it before disk->node_id is refered.
> 
> Signed-off-by: Cheng Renquan <crquan@...il.com>
> ---
>  block/genhd.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/block/genhd.c b/block/genhd.c
> index 27549e4..2f7feda 100644
> --- a/block/genhd.c
> +++ b/block/genhd.c
> @@ -1102,6 +1102,7 @@ struct gendisk *alloc_disk_node(int minors, int node_id)
>  			kfree(disk);
>  			return NULL;
>  		}
> +		disk->node_id = node_id;
>  		if (disk_expand_part_tbl(disk, 0)) {
>  			free_part_stats(&disk->part0);
>  			kfree(disk);
> @@ -1116,7 +1117,6 @@ struct gendisk *alloc_disk_node(int minors, int node_id)
>  		device_initialize(disk_to_dev(disk));
>  		INIT_WORK(&disk->async_notify,
>  			media_change_notify_thread);
> -		disk->node_id = node_id;
>  	}
>  	return disk;
>  }

Good spotting, applied!

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ