Skip to contentSkip to conversation

2.6.27.38-stable review

PATCH New Greg KH 1 participant 4 messages Oct 15, 2009

Subsystems (3)
lore
Share & tools
lore
author
#1 lore raw

PATCH 1/3 usb-serial: fix crash when sub-driver updates firmware

In reply to Greg KH

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

------------------
From: Alan Stern <[email protected]>

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().

---
 drivers/usb/serial/usb-serial.c |    1 +
 1 file changed, 1 insertion(+)
drivers/usb/serial/usb-serial.c +1 -0
@@ -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;
 		}
 	}
author
#2 lore raw

PATCH 2/3 SCSI: Fix protection scsi_data_buffer leak

In reply to Greg KH

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

------------------
From: Martin K. Petersen <[email protected]>

commit b4c2554d40ceac130a8d062eaa8838ed22158c45 upstream.

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

---
 drivers/scsi/scsi.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/scsi/scsi.c +7 -4
@@ -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;
 		}
 	}
 
author
#3 lore raw

PATCH 3/3 USB: digi_acceleport: Fix broken unthrottle.

In reply to Greg KH

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

------------------
From: Johan Hovold <[email protected]>

commit ba6b702f85a61561d329c4c11d3ed95604924f9a upstream.

This patch fixes a regression introduced in
39892da44b21b5362eb848ca424d73a25ccc488f.

---
 drivers/usb/serial/digi_acceleport.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/usb/serial/digi_acceleport.c +4 -4
@@ -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)

Greg KH

author
#0 lore raw

cover 2.6.27.38-stable review

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