public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [1/3] usb-serial: fix crash when sub-driver updates firmware
  2009-10-15 21:11 ` [0/3] 2.6.27.38-stable review Greg KH
@ 2009-10-15 18:54   ` Greg KH
  2009-10-15 18:54   ` [2/3] SCSI: Fix protection scsi_data_buffer leak Greg KH
  2009-10-15 18:54   ` [3/3] USB: digi_acceleport: Fix broken unthrottle Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2009-10-15 18:54 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Alan Stern

[-- Attachment #1: usb-serial-fix-crash-when-sub-driver-updates-firmware.patch --]
[-- Type: text/plain, Size: 1426 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Alan Stern <stern@rowland.harvard.edu>

commit 0a3c8549ea7e94d74a41096d42bc6cdf43d183bf upstream.

This patch (as1244) fixes a crash in usb-serial that occurs when a
sub-driver returns a positive value from its attach method, indicating
that new firmware was loaded and the device will disconnect and
reconnect.  The usb-serial core then skips the step of registering the
port devices; when the disconnect occurs, the attempt to unregister
the ports fails dramatically.

This problem shows up with Keyspan devices and it might affect others
as well.

When the attach method returns a positive value, the patch sets
num_ports to 0.  This tells usb_serial_disconnect() not to try
unregistering any of the ports; instead they are cleaned up by
destroy_serial().

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/serial/usb-serial.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -973,6 +973,7 @@ int usb_serial_probe(struct usb_interfac
 		if (retval > 0) {
 			/* quietly accept this device, but don't bind to a
 			   serial port as it's about to disappear */
+			serial->num_ports = 0;
 			goto exit;
 		}
 	}



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [2/3] SCSI: Fix protection scsi_data_buffer leak
  2009-10-15 21:11 ` [0/3] 2.6.27.38-stable review Greg KH
  2009-10-15 18:54   ` [1/3] usb-serial: fix crash when sub-driver updates firmware Greg KH
@ 2009-10-15 18:54   ` Greg KH
  2009-10-15 18:54   ` [3/3] USB: digi_acceleport: Fix broken unthrottle Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2009-10-15 18:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Martin K. Petersen,
	James Bottomley

[-- Attachment #1: scsi-fix-protection-scsi_data_buffer-leak.patch --]
[-- Type: text/plain, Size: 1356 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Martin K. Petersen <martin.petersen@oracle.com>

commit b4c2554d40ceac130a8d062eaa8838ed22158c45 upstream.

We would leak a scsi_data_buffer if the free_list command was of the
protected variety.

Reported-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/scsi/scsi.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -243,10 +243,7 @@ scsi_host_alloc_command(struct Scsi_Host
  */
 struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *shost, gfp_t gfp_mask)
 {
-	struct scsi_cmnd *cmd;
-	unsigned char *buf;
-
-	cmd = scsi_host_alloc_command(shost, gfp_mask);
+	struct scsi_cmnd *cmd = scsi_host_alloc_command(shost, gfp_mask);
 
 	if (unlikely(!cmd)) {
 		unsigned long flags;
@@ -260,9 +257,15 @@ struct scsi_cmnd *__scsi_get_command(str
 		spin_unlock_irqrestore(&shost->free_list_lock, flags);
 
 		if (cmd) {
+			void *buf, *prot;
+
 			buf = cmd->sense_buffer;
+			prot = cmd->prot_sdb;
+
 			memset(cmd, 0, sizeof(*cmd));
+
 			cmd->sense_buffer = buf;
+			cmd->prot_sdb = prot;
 		}
 	}
 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [3/3] USB: digi_acceleport: Fix broken unthrottle.
  2009-10-15 21:11 ` [0/3] 2.6.27.38-stable review Greg KH
  2009-10-15 18:54   ` [1/3] usb-serial: fix crash when sub-driver updates firmware Greg KH
  2009-10-15 18:54   ` [2/3] SCSI: Fix protection scsi_data_buffer leak Greg KH
@ 2009-10-15 18:54   ` Greg KH
  2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2009-10-15 18:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Johan Hovold, Oliver Neukum

[-- Attachment #1: usb-digi_acceleport-fix-broken-unthrottle.patch --]
[-- Type: text/plain, Size: 1147 bytes --]

2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Johan Hovold <jhovold@gmail.com>

commit ba6b702f85a61561d329c4c11d3ed95604924f9a upstream.

This patch fixes a regression introduced in
39892da44b21b5362eb848ca424d73a25ccc488f.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Acked-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/serial/digi_acceleport.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
@@ -892,16 +892,16 @@ static void digi_rx_unthrottle(struct tt
 
 	spin_lock_irqsave(&priv->dp_port_lock, flags);
 
-	/* turn throttle off */
-	priv->dp_throttled = 0;
-	priv->dp_throttle_restart = 0;
-
 	/* restart read chain */
 	if (priv->dp_throttle_restart) {
 		port->read_urb->dev = port->serial->dev;
 		ret = usb_submit_urb(port->read_urb, GFP_ATOMIC);
 	}
 
+	/* turn throttle off */
+	priv->dp_throttled = 0;
+	priv->dp_throttle_restart = 0;
+
 	spin_unlock_irqrestore(&priv->dp_port_lock, flags);
 
 	if (ret)



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [0/3] 2.6.27.38-stable review
@ 2009-10-15 21:11 ` Greg KH
  2009-10-15 18:54   ` [1/3] usb-serial: fix crash when sub-driver updates firmware Greg KH
                     ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Greg KH @ 2009-10-15 21:11 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan


This is the start of the stable review cycle for the 2.6.27.38 release.
There are 3 patches in this series, all will be posted as a response to
this one.  If anyone has any issues with these being applied, please let
us know.  If anyone is a maintainer of the proper subsystem, and wants
to add a Signed-off-by: line to the patch, please respond with it.

Responses should be made by Sunday, October 18, 2009 19:00:00 UTC.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.27.38-rc1.gz
and the diffstat can be found below.


thanks,

greg k-h

-----------

 Makefile                             |    2 +-
 drivers/scsi/scsi.c                  |   11 +++++++----
 drivers/usb/serial/digi_acceleport.c |    8 ++++----
 drivers/usb/serial/usb-serial.c      |    1 +
 4 files changed, 13 insertions(+), 9 deletions(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-10-15 21:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20091015185430.128674330@mini.kroah.org>
2009-10-15 21:11 ` [0/3] 2.6.27.38-stable review Greg KH
2009-10-15 18:54   ` [1/3] usb-serial: fix crash when sub-driver updates firmware Greg KH
2009-10-15 18:54   ` [2/3] SCSI: Fix protection scsi_data_buffer leak Greg KH
2009-10-15 18:54   ` [3/3] USB: digi_acceleport: Fix broken unthrottle Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox