Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
[SCSI] bsg: fix oops on remove
[SCSI] fusion: default MSI to disabled for SPI and FC controllers
[SCSI] ipr: Fix HDIO_GET_IDENTITY oops for SATA devices
[SCSI] mptspi: fix oops in mptspi_dv_renegotiate_work()
[SCSI] erase invalid data returned by device

+31 -7
+2 -1
block/bsg.c
··· 709 709 { 710 710 struct bsg_class_device *bcd = 711 711 container_of(kref, struct bsg_class_device, ref); 712 + struct device *parent = bcd->parent; 712 713 713 714 if (bcd->release) 714 715 bcd->release(bcd->parent); 715 716 716 - put_device(bcd->parent); 717 + put_device(parent); 717 718 } 718 719 719 720 static int bsg_put_device(struct bsg_device *bd)
+8 -3
drivers/message/fusion/mptbase.c
··· 1686 1686 ioc->bus_type = SAS; 1687 1687 } 1688 1688 1689 - if (ioc->bus_type == SAS && mpt_msi_enable == -1) 1690 - ioc->msi_enable = 1; 1691 - else 1689 + if (mpt_msi_enable == -1) { 1690 + /* Enable on SAS, disable on FC and SPI */ 1691 + if (ioc->bus_type == SAS) 1692 + ioc->msi_enable = 1; 1693 + else 1694 + ioc->msi_enable = 0; 1695 + } else 1696 + /* follow flag: 0 - disable; 1 - enable */ 1692 1697 ioc->msi_enable = mpt_msi_enable; 1693 1698 1694 1699 if (ioc->errata_flag_1064)
+7 -2
drivers/message/fusion/mptspi.c
··· 1266 1266 static int 1267 1267 mptspi_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) 1268 1268 { 1269 - struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh); 1270 1269 int rc; 1271 1270 1272 1271 rc = mptscsih_ioc_reset(ioc, reset_phase); 1273 1272 1274 - if (reset_phase == MPT_IOC_POST_RESET) 1273 + /* only try to do a renegotiation if we're properly set up 1274 + * if we get an ioc fault on bringup, ioc->sh will be NULL */ 1275 + if (reset_phase == MPT_IOC_POST_RESET && 1276 + ioc->sh) { 1277 + struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh); 1278 + 1275 1279 mptspi_dv_renegotiate(hd); 1280 + } 1276 1281 1277 1282 return rc; 1278 1283 }
+5 -1
drivers/scsi/ipr.c
··· 71 71 #include <linux/module.h> 72 72 #include <linux/moduleparam.h> 73 73 #include <linux/libata.h> 74 + #include <linux/hdreg.h> 74 75 #include <asm/io.h> 75 76 #include <asm/irq.h> 76 77 #include <asm/processor.h> ··· 4914 4913 struct ipr_resource_entry *res; 4915 4914 4916 4915 res = (struct ipr_resource_entry *)sdev->hostdata; 4917 - if (res && ipr_is_gata(res)) 4916 + if (res && ipr_is_gata(res)) { 4917 + if (cmd == HDIO_GET_IDENTITY) 4918 + return -ENOTTY; 4918 4919 return ata_scsi_ioctl(sdev, cmd, arg); 4920 + } 4919 4921 4920 4922 return -EINVAL; 4921 4923 }
+9
drivers/scsi/scsi_lib.c
··· 207 207 */ 208 208 blk_execute_rq(req->q, NULL, req, 1); 209 209 210 + /* 211 + * Some devices (USB mass-storage in particular) may transfer 212 + * garbage data together with a residue indicating that the data 213 + * is invalid. Prevent the garbage from being misinterpreted 214 + * and prevent security leaks by zeroing out the excess data. 215 + */ 216 + if (unlikely(req->data_len > 0 && req->data_len <= bufflen)) 217 + memset(buffer + (bufflen - req->data_len), 0, req->data_len); 218 + 210 219 ret = req->errors; 211 220 out: 212 221 blk_put_request(req);