All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [BK PATCH] SCSI Bugfixes for 2.6.0-test9
Date: Thu, 20 Nov 2003 09:09:05 +1000	[thread overview]
Message-ID: <3FBBF811.3030207@torque.net> (raw)
In-Reply-To: <1069270260.1664.8.camel@mulgrave>

[-- Attachment #1: Type: text/plain, Size: 1040 bytes --]

James Bottomley wrote:
> This contains the current slew of bug fixes harvested from the scsi
> mailing lists.  I think we could still do with getting our
> slave_alloc/destroy bug sorted out, and finally getting our mid layer
> refcounting up to the level where were robust against surprise ejection,
> but those could also wait for 2.6.1
> 
> You can pull the changes from:
> 
> bk://linux-scsi.bkbits.net/scsi-bugfixes-2.6
> 
> The short changelogs are:
> 
> Alan Stern:
>   o Off-by-one bug in user page calculations for Direct I/O
> 
> Andrew Morton:
>   o fix scsi_report_lun_scan bug
> 
> Christoph Hellwig:
>   o scsi_device refcounting and list lockdown
> 
> James Bottomley:
>   o Add missing .module initialisation to lasi700 and sim710
>   o lasi700: Fix missed variable name change causing module load error

James,
You might like to add this one that OSDL found
(if they haven't already submitted a fix):

Changelog:
   When detecting a locked sg device (O_EXCL) return
   -EBUSY (rather than 0) from sg_open()

Doug Gilbert



[-- Attachment #2: sg290t9ma.diff --]
[-- Type: text/plain, Size: 1029 bytes --]

--- linux/drivers/scsi/sg.c	2003-10-28 09:18:32.000000000 +1000
+++ linux/drivers/scsi/sg.c260t9ma	2003-11-14 20:15:20.000000000 +1000
@@ -243,7 +243,7 @@
 	Sg_device *sdp;
 	Sg_fd *sfp;
 	int res;
-	int retval = -EBUSY;
+	int retval;
 
 	SCSI_LOG_TIMEOUT(3, printk("sg_open: dev=%d, flags=0x%x\n", dev, flags));
 	sdp = sg_get_dev(dev);
@@ -270,8 +270,10 @@
 			retval = -EPERM; /* Can't lock it with read only access */
 			goto error_out;
 		}
-		if (sdp->headfp && (flags & O_NONBLOCK))
+		if (sdp->headfp && (flags & O_NONBLOCK)) {
+			retval = -EBUSY;
 			goto error_out;
+		}
 		res = 0;
 		__wait_event_interruptible(sdp->o_excl_wait,
 			((sdp->headfp || sdp->exclude) ? 0 : (sdp->exclude = 1)), res);
@@ -280,8 +282,10 @@
 			goto error_out;
 		}
 	} else if (sdp->exclude) {	/* some other fd has an exclusive lock on dev */
-		if (flags & O_NONBLOCK)
+		if (flags & O_NONBLOCK) {
+			retval = -EBUSY;
 			goto error_out;
+		}
 		res = 0;
 		__wait_event_interruptible(sdp->o_excl_wait, (!sdp->exclude),
 					   res);

      reply	other threads:[~2003-11-19 23:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-19 20:33 [BK PATCH] SCSI Bugfixes for 2.6.0-test9 James Bottomley
2003-11-19 23:09 ` Douglas Gilbert [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3FBBF811.3030207@torque.net \
    --to=dougg@torque.net \
    --cc=James.Bottomley@steeleye.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.