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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <496B4BBE.5040701@steeleye.com>
Date:	Mon, 12 Jan 2009 08:55:10 -0500
From:	Paul Clements <paul.clements@...eleye.com>
To:	Pavel Machek <pavel@...e.cz>
CC:	kernel list <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...l.org>
Subject: Re: do not allow two nbd-clients at same time

Pavel Machek wrote:
> Two nbd-clients at same time are bad idea, and cause WARN_ON from nbd
> in 2.6.28-rc7 from sysfs_add_one. This simply prevents that from
> happening.

Thanks for this. But I think we also need the following:

--- drivers/block/nbd.c        2008-12-24 18:26:37.000000000 -0500
+++ drivers/block/nbd.c 2009-01-12 08:50:17.000000000 -0500
@@ -406,6 +406,7 @@ static int nbd_do_it(struct nbd_device *
         ret = sysfs_create_file(&disk_to_dev(lo->disk)->kobj, 
&pid_attr.attr);
         if (ret) {
                 printk(KERN_ERR "nbd: sysfs_create_file failed!");
+               lo->pid = 0;
                 return ret;
         }


To zero out pid in the error case. Otherwise, it looks good.

Thanks,
Paul

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