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:	Mon, 26 Jan 2015 17:23:58 +0100
From:	Markus Pargmann <mpa@...gutronix.de>
To:	Paul Clements <paul.clements@...sios.com>
Cc:	"nbd-general@...ts.sourceforge.net" 
	<nbd-general@...ts.sourceforge.net>,
	kernel list <linux-kernel@...r.kernel.org>,
	kernel@...gutronix.de
Subject: Re: [RFC 2/4] nbd: Split 'DO_IT' into three functions

Hi Paul,

On Mon, Jan 26, 2015 at 11:16:12AM -0500, Paul Clements wrote:
> Markus,
> 
> This refactor looks OK with the exception of one thing...
> 
> On Tue, Jan 13, 2015 at 8:44 AM, Markus Pargmann <mpa@...gutronix.de> wrote:
> 
> >  /* Must be called with tx_lock held */
> >
> >  static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd,
> > @@ -684,61 +773,8 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd,
> >                 set_capacity(nbd->disk, nbd->bytesize >> 9);
> >                 return 0;
> >
> > -       case NBD_DO_IT: {
> > -               struct task_struct *thread;
> > -               struct socket *sock;
> > -               int error;
> > -
> > -               if (nbd->pid)
> > -                       return -EBUSY;
> > -               if (!nbd->sock)
> > -                       return -EINVAL;
> >
> 
> You seem to have done away with these checks. Was that inadvertent or
> was there a reason for that? The pid check is necessary to prevent two
> instances of NBD_DO_IT from running. Without the sock check you'll get
> a null pointer deref in nbd_do_it.

Thanks, no there is no reason, it got dropped somewhere. These checks
should defenitely be there. Will fix it for the next version.

I also fixed a lot of error handling, style, format and documentation in
the other patches. Will send the patch series soon, but thanks for the
review so far.

Best regards,

Markus

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ