Skip to content

Commit a264011

Browse files
committed
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] qla2xxx: Return DID_NO_CONNECT when FC device is lost. [SCSI] mptfusion: Bump version 03.04.18 [SCSI] mptfusion: Fix Incorrect return value in mptscsih_dev_reset [SCSI] mptfusion: mptctl_release is required in mptctl.c [SCSI] target: fix use after free detected by SLUB poison [SCSI] target: Remove procfs based target_core_mib.c code [SCSI] target: Fix SCF_SCSI_CONTROL_SG_IO_CDB breakage [SCSI] target: Fix top-level configfs_subsystem default_group shutdown breakage [SCSI] target: fixed missing lock drop in error path [SCSI] target: Fix demo-mode MappedLUN shutdown UA/PR breakage [SCSI] target/iblock: Fix failed bd claim NULL pointer dereference [SCSI] target: iblock/pscsi claim checking for NULL instead of IS_ERR [SCSI] scsi_debug: Fix 32-bit overflow in do_device_access causing memory corruption [SCSI] qla2xxx: Change from irq to irqsave with host_lock [SCSI] qla2xxx: Fix race that could hang kthread_stop()
2 parents 0d6e82e + 1621dbb commit a264011

19 files changed

Lines changed: 278 additions & 1256 deletions

‎drivers/message/fusion/mptbase.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
#define COPYRIGHT "Copyright (c) 1999-2008 " MODULEAUTHOR
7777
#endif
7878

79-
#define MPT_LINUX_VERSION_COMMON "3.04.17"
80-
#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.17"
79+
#define MPT_LINUX_VERSION_COMMON "3.04.18"
80+
#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.18"
8181
#define WHAT_MAGIC_STRING "@" "(" "#" ")"
8282

8383
#define show_mptmod_ver(s,ver) \

‎drivers/message/fusion/mptctl.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,13 @@ mptctl_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply)
596596
return 1;
597597
}
598598

599+
static int
600+
mptctl_release(struct inode *inode, struct file *filep)
601+
{
602+
fasync_helper(-1, filep, 0, &async_queue);
603+
return 0;
604+
}
605+
599606
static int
600607
mptctl_fasync(int fd, struct file *filep, int mode)
601608
{
@@ -2815,6 +2822,7 @@ static const struct file_operations mptctl_fops = {
28152822
.llseek = no_llseek,
28162823
.fasync = mptctl_fasync,
28172824
.unlocked_ioctl = mptctl_ioctl,
2825+
.release = mptctl_release,
28182826
#ifdef CONFIG_COMPAT
28192827
.compat_ioctl = compat_mpctl_ioctl,
28202828
#endif

‎drivers/message/fusion/mptscsih.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1873,8 +1873,9 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
18731873
}
18741874

18751875
out:
1876-
printk(MYIOC_s_INFO_FMT "task abort: %s (sc=%p)\n",
1877-
ioc->name, ((retval == SUCCESS) ? "SUCCESS" : "FAILED"), SCpnt);
1876+
printk(MYIOC_s_INFO_FMT "task abort: %s (rv=%04x) (sc=%p) (sn=%ld)\n",
1877+
ioc->name, ((retval == SUCCESS) ? "SUCCESS" : "FAILED"), retval,
1878+
SCpnt, SCpnt->serial_number);
18781879

18791880
return retval;
18801881
}
@@ -1911,7 +1912,7 @@ mptscsih_dev_reset(struct scsi_cmnd * SCpnt)
19111912

19121913
vdevice = SCpnt->device->hostdata;
19131914
if (!vdevice || !vdevice->vtarget) {
1914-
retval = SUCCESS;
1915+
retval = 0;
19151916
goto out;
19161917
}
19171918

‎drivers/scsi/qla2xxx/qla_attr.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,6 +1561,7 @@ qla2x00_dev_loss_tmo_callbk(struct fc_rport *rport)
15611561
{
15621562
struct Scsi_Host *host = rport_to_shost(rport);
15631563
fc_port_t *fcport = *(fc_port_t **)rport->dd_data;
1564+
unsigned long flags;
15641565

15651566
if (!fcport)
15661567
return;
@@ -1573,10 +1574,10 @@ qla2x00_dev_loss_tmo_callbk(struct fc_rport *rport)
15731574
* Transport has effectively 'deleted' the rport, clear
15741575
* all local references.
15751576
*/
1576-
spin_lock_irq(host->host_lock);
1577+
spin_lock_irqsave(host->host_lock, flags);
15771578
fcport->rport = fcport->drport = NULL;
15781579
*((fc_port_t **)rport->dd_data) = NULL;
1579-
spin_unlock_irq(host->host_lock);
1580+
spin_unlock_irqrestore(host->host_lock, flags);
15801581

15811582
if (test_bit(ABORT_ISP_ACTIVE, &fcport->vha->dpc_flags))
15821583
return;

‎drivers/scsi/qla2xxx/qla_init.c‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2505,11 +2505,12 @@ qla2x00_rport_del(void *data)
25052505
{
25062506
fc_port_t *fcport = data;
25072507
struct fc_rport *rport;
2508+
unsigned long flags;
25082509

2509-
spin_lock_irq(fcport->vha->host->host_lock);
2510+
spin_lock_irqsave(fcport->vha->host->host_lock, flags);
25102511
rport = fcport->drport ? fcport->drport: fcport->rport;
25112512
fcport->drport = NULL;
2512-
spin_unlock_irq(fcport->vha->host->host_lock);
2513+
spin_unlock_irqrestore(fcport->vha->host->host_lock, flags);
25132514
if (rport)
25142515
fc_remote_port_delete(rport);
25152516
}
@@ -2879,6 +2880,7 @@ qla2x00_reg_remote_port(scsi_qla_host_t *vha, fc_port_t *fcport)
28792880
struct fc_rport_identifiers rport_ids;
28802881
struct fc_rport *rport;
28812882
struct qla_hw_data *ha = vha->hw;
2883+
unsigned long flags;
28822884

28832885
qla2x00_rport_del(fcport);
28842886

@@ -2893,9 +2895,9 @@ qla2x00_reg_remote_port(scsi_qla_host_t *vha, fc_port_t *fcport)
28932895
"Unable to allocate fc remote port!\n");
28942896
return;
28952897
}
2896-
spin_lock_irq(fcport->vha->host->host_lock);
2898+
spin_lock_irqsave(fcport->vha->host->host_lock, flags);
28972899
*((fc_port_t **)rport->dd_data) = fcport;
2898-
spin_unlock_irq(fcport->vha->host->host_lock);
2900+
spin_unlock_irqrestore(fcport->vha->host->host_lock, flags);
28992901

29002902
rport->supported_classes = fcport->supported_classes;
29012903

‎drivers/scsi/qla2xxx/qla_os.c‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,6 @@ qla2xxx_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)
562562
}
563563
if (atomic_read(&fcport->state) != FCS_ONLINE) {
564564
if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
565-
atomic_read(&fcport->state) == FCS_DEVICE_LOST ||
566565
atomic_read(&base_vha->loop_state) == LOOP_DEAD) {
567566
cmd->result = DID_NO_CONNECT << 16;
568567
goto qc24_fail_command;
@@ -2513,16 +2512,17 @@ qla2x00_schedule_rport_del(struct scsi_qla_host *vha, fc_port_t *fcport,
25132512
{
25142513
struct fc_rport *rport;
25152514
scsi_qla_host_t *base_vha;
2515+
unsigned long flags;
25162516

25172517
if (!fcport->rport)
25182518
return;
25192519

25202520
rport = fcport->rport;
25212521
if (defer) {
25222522
base_vha = pci_get_drvdata(vha->hw->pdev);
2523-
spin_lock_irq(vha->host->host_lock);
2523+
spin_lock_irqsave(vha->host->host_lock, flags);
25242524
fcport->drport = rport;
2525-
spin_unlock_irq(vha->host->host_lock);
2525+
spin_unlock_irqrestore(vha->host->host_lock, flags);
25262526
set_bit(FCPORT_UPDATE_NEEDED, &base_vha->dpc_flags);
25272527
qla2xxx_wake_dpc(base_vha);
25282528
} else
@@ -3282,10 +3282,10 @@ qla2x00_do_dpc(void *data)
32823282

32833283
set_user_nice(current, -20);
32843284

3285+
set_current_state(TASK_INTERRUPTIBLE);
32853286
while (!kthread_should_stop()) {
32863287
DEBUG3(printk("qla2x00: DPC handler sleeping\n"));
32873288

3288-
set_current_state(TASK_INTERRUPTIBLE);
32893289
schedule();
32903290
__set_current_state(TASK_RUNNING);
32913291

@@ -3454,7 +3454,9 @@ qla2x00_do_dpc(void *data)
34543454
qla2x00_do_dpc_all_vps(base_vha);
34553455

34563456
ha->dpc_active = 0;
3457+
set_current_state(TASK_INTERRUPTIBLE);
34573458
} /* End of while(1) */
3459+
__set_current_state(TASK_RUNNING);
34583460

34593461
DEBUG(printk("scsi(%ld): DPC handler exiting\n", base_vha->host_no));
34603462

‎drivers/scsi/scsi_debug.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1671,7 +1671,7 @@ static int do_device_access(struct scsi_cmnd *scmd,
16711671
unsigned long long lba, unsigned int num, int write)
16721672
{
16731673
int ret;
1674-
unsigned int block, rest = 0;
1674+
unsigned long long block, rest = 0;
16751675
int (*func)(struct scsi_cmnd *, unsigned char *, int);
16761676

16771677
func = write ? fetch_to_dev_buffer : fill_from_dev_buffer;

‎drivers/target/Makefile‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ target_core_mod-y := target_core_configfs.o \
1313
target_core_transport.o \
1414
target_core_cdb.o \
1515
target_core_ua.o \
16-
target_core_rd.o \
17-
target_core_mib.o
16+
target_core_rd.o
1817

1918
obj-$(CONFIG_TARGET_CORE) += target_core_mod.o
2019

0 commit comments

Comments
 (0)