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]
Message-ID: <20110602103406.GD7943@redhat.com>
Date:	Thu, 2 Jun 2011 13:34:06 +0300
From:	"Michael S. Tsirkin" <mst@...hat.com>
To:	Mark Wu <dwu@...hat.com>
Cc:	Rusty Russell <rusty@...tcorp.com.au>,
	virtualization@...ts.linux-foundation.org, kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] [virt] virtio-blk: Use ida to allocate disk index

On Wed, Jun 01, 2011 at 04:25:48AM -0400, Mark Wu wrote:
> On 06/01/2011 03:24 AM, Mark Wu wrote:
> >-	if (index_to_minor(index)>= 1<<  MINORBITS)
> >-		return -ENOSPC;
> >+	do {
> >+		if (!ida_pre_get(&vd_index_ida, GFP_KERNEL))
> >+			return err;
> >+
> There's a problem in above code: err is not initialized before
> using, so change it to return -1;
> +       do {
> +               if (!ida_pre_get(&vd_index_ida, GFP_KERNEL))
> +                       return -1;

Not -1. Pls return -ENOMEM.

--
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