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:	Thu, 26 May 2011 22:53:04 -0500
From:	James Bottomley <James.Bottomley@...senPartnership.com>
To:	Parag Warudkar <parag.lkml@...il.com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Jens Axboe <jaxboe@...ionio.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	Linux SCSI List <linux-scsi@...r.kernel.org>
Subject: Re: [PATCH] SCSI IOCTL: Check for device deletion [was Re:
 __elv_add_request OOPS]

On Wed, 2011-05-25 at 15:52 -0500, James Bottomley wrote:
> On Wed, 2011-05-25 at 16:42 -0400, Parag Warudkar wrote:
> > Yeah - that makes sense. By that logic, looks like we can only disallow 
> > for SDEV_DEL (if we decide to do that check here).
> 
> I don't think this is the root cause.  I think q is non-NULL but has
> already been released, so we're just getting a NULL deref on the actual
> list head.
> 
> Does this fix it?  It adds the refcounting at approximately the correct
> places.  Of course, we'll now be trying elevator operations on an extant
> queue but one whose elevator functions have been destroyed, so there are
> probably additional state guards to place.
> 
> James
> 
> ---
> 
> diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
> index 58584dc..44e8ca3 100644
> --- a/drivers/scsi/scsi_scan.c
> +++ b/drivers/scsi/scsi_scan.c
> @@ -297,7 +297,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget,
>  		kfree(sdev);
>  		goto out;
>  	}
> -
> +	blk_get_queue(sdev->request_queue);

Apparently we can't do this because blk_[put|get]_queue aren't exported
for use in modules (and SCSI can be modular), so this caused a build
failure in linux-next.

James


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