qla2xxx firmware crashes in target mode

2015-10-19 Thread Chris Boot
Hi folks, So this is a bit of a strange situation I'm in, where my *target* qla2xxx firmware appears to get stuck when the *initiator* kernel is 4.1+. The target is an Intel system with a QLE2464 running kernel 4.2.1 (from Debian) and using fw=7.03.00. The initiator is another Intel system with a

Re: [PATCH 00/25] HiSilicon SAS driver

2015-10-19 Thread John Garry
Hi James, Could we please get a review for our driver? We have got some good input on changes we need to make, and we will produce another patchset in the coming days. However it would good to get a subsystem maintainer review/acknowledgement to progress our upstreaming. Thanks in advance, J

Re: [PATCH 00/25] HiSilicon SAS driver

2015-10-19 Thread Hannes Reinecke
On 10/19/2015 10:47 AM, John Garry wrote: > Hi James, > > Could we please get a review for our driver? We have got some good > input on changes we need to make, and we will produce another > patchset in the coming days. However it would good to get a > subsystem maintainer review/acknowledgement t

Re: linux kernel security issuses at ses_enclosure_data_process , ses_intf_remove_enclosure, irlmp_seq_hb_idx report

2015-10-19 Thread Dan Carpenter
Thanks Berry, James, the first two issues are SCSI things. I'm sending patches for them but I can't test them myself. Especially, I'm not positive that [patch 2/2] ses: invalid free in ses_intf_remove_enclosure() is a complete fix. Berry, would it be possible to test that one? regards, dan car

[patch 1/2] ses: tighten range checking in ses_enclosure_data_process()

2015-10-19 Thread Dan Carpenter
"len" has to be at least 12 because we need that space for the overall descriptor, otherwise we end up reading beyond the end of the array and KASan complains. Later on we have some more range checking on desc_ptr but we are checking the start of the "desc_ptr" buffer instead of the end of the buf

[patch 2/2] ses: invalid free in ses_intf_remove_enclosure()

2015-10-19 Thread Dan Carpenter
If thre aren't any components, then the component[0] is beyond the end of the array. Reported-by: "Berry Cheng 程君(成淼)" Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c index ff474c7..a31114d 100644 --- a/drivers/scsi/ses.c +++ b/drivers/scsi/ses.c @@ -780,7 +780

[patch] bfa: integer overflow bug in debugfs

2015-10-19 Thread Dan Carpenter
The "len << 2" operation can have an integer overflow and leading to a kernel crash. This is debugfs and thus root only so no one really cares, but we should fix it anyway just to make the static checker happy. Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/bfa/bfad_debugfs.c b/drivers/

Re: [PATCH 00/25] HiSilicon SAS driver

2015-10-19 Thread John Garry
On 19/10/2015 09:55, Hannes Reinecke wrote: On 10/19/2015 10:47 AM, John Garry wrote: Hi James, Could we please get a review for our driver? We have got some good input on changes we need to make, and we will produce another patchset in the coming days. However it would good to get a subsystem

Re: [PATCH 02/25] devicetree: bindings: scsi: HiSi SAS

2015-10-19 Thread John Garry
On 16/10/2015 14:47, Rob Herring wrote: On Mon, Oct 12, 2015 at 10:20 AM, John Garry wrote: Add devicetree bindings for HiSilicon SAS driver. In the future, please use get_maintainers.pl. Will do. Signed-off-by: John Garry --- .../devicetree/bindings/scsi/hisilicon-sas.txt | 63 +++

Re: [PATCH 02/12] megaraid_sas : Code optimization- remove PCI Ids based checks

2015-10-19 Thread Tomas Henzl
On 19.10.2015 07:48, Sumit Saxena wrote: >> -Original Message- >> From: Tomas Henzl [mailto:the...@redhat.com] >> Sent: Friday, October 16, 2015 8:10 PM >> To: sumit.sax...@avagotech.com; linux-scsi@vger.kernel.org; >> martin.peter...@oracle.com; h...@infradead.org; jbottom...@parallels.com

[patch] ses: tighten range checks in ses_intf_add()

2015-10-19 Thread Dan Carpenter
We test that "type_ptr" is within the buffer but then we read from "type_ptr[3]" so we could be reading beyond the end of the buffer. Reported-by: "Berry Cheng 程君(成淼)" Signed-off-by: Dan Carpenter --- This isn't a complete fix because we still need more range checking in all the other places whi

Re: [PATCH 13/25] scsi: hisi_sas: add path from phyup irq to SAS framework

2015-10-19 Thread John Garry
On 16/10/2015 14:36, Arnd Bergmann wrote: On Friday 16 October 2015 14:29:55 John Garry wrote: It could be considered. A potential issue I see is with hisi_sas_control_phy() for PHY_FUNC_HARD_RESET: this allocates a hisi_sas_wq struct and processes the reset in the queue work. When we re-enabl

[Bug 106251] New: there exists a wrong return value of function iscsi_if_recv_msg() when iscsi_lookup_endpoint() fails

2015-10-19 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=106251 Bug ID: 106251 Summary: there exists a wrong return value of function iscsi_if_recv_msg() when iscsi_lookup_endpoint() fails Product: SCSI Drivers Version: 2.5 Kernel Version: 4.

[Bug 106261] New: there exists a wrong return value of function asd_map_memio() when ioremap_nocache() fails

2015-10-19 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=106261 Bug ID: 106261 Summary: there exists a wrong return value of function asd_map_memio() when ioremap_nocache() fails Product: SCSI Drivers Version: 2.5 Kernel Version: 4.2

[Bug 106261] there exists a wrong return value of function asd_map_memio() when ioremap_nocache() fails

2015-10-19 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=106261 --- Comment #1 from RUC_Soft_Sec --- *** Bug 106211 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching the assignee of the bug. -- To unsubscribe from this list: send the line "unsubscribe l

Re: [PATCH 13/25] scsi: hisi_sas: add path from phyup irq to SAS framework

2015-10-19 Thread Arnd Bergmann
On Monday 19 October 2015 15:11:47 John Garry wrote: > On 16/10/2015 14:36, Arnd Bergmann wrote: > > On Friday 16 October 2015 14:29:55 John Garry wrote: > >> > >> It could be considered. > >> > >> A potential issue I see is with hisi_sas_control_phy() for > >> PHY_FUNC_HARD_RESET: this allocates a

[PATCH] scsi: restart list search after unlock in scsi_remove_target

2015-10-19 Thread Christoph Hellwig
When dropping a lock while iterating a list we must restart the search as other threads could have manipulated the list under us. Without this we can get stuck in an endless loop. Reported-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/

Re: [PATCH 02/25] devicetree: bindings: scsi: HiSi SAS

2015-10-19 Thread zhangfei
On 10/19/2015 06:48 PM, John Garry wrote: On 16/10/2015 14:47, Rob Herring wrote: + - reg : Address and length of the register sets for the device + - SAS controller registers + - SAS controller control registers + + - reset-reg : offset to reset, status, and clock registers in control

Re: [PATCH 13/25] scsi: hisi_sas: add path from phyup irq to SAS framework

2015-10-19 Thread John Garry
I'd have to review more closely, but I think that's fine, as this is how most work queues are used: you can queue the same function multiple times, and it's guaranteed to run at least once after the last queue, so if you queue it while it's already running, it will be called again, otherwise it wo

Re: [PATCH 09/12] megaraid_sas : Make PI enabled VD 8 byte DMA aligned

2015-10-19 Thread Tomas Henzl
On 15.10.2015 10:10, sumit.sax...@avagotech.com wrote: > Signed-off-by: Sumit Saxena > Signed-off-by: Kashyap Desai Reviewed-by: Tomas Henzl Tomas -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [PATCH 10/12] megaraid_sas : SMAP restriction-do not access user memory from IOCTL code

2015-10-19 Thread Tomas Henzl
On 15.10.2015 10:10, sumit.sax...@avagotech.com wrote: > This is an issue on SMAP enabled CPUs and 32 bit apps running on 64 bit OS. > Donot access user memory from kernel code. > SMAP bit restricts to access user memory from kernel code. Corresponding > Redhat Bugzilla id for this is:[Bug 126791

Re: [PATCH 11/12] megaraid_sas : Driver version upgrade

2015-10-19 Thread Tomas Henzl
On 15.10.2015 10:11, sumit.sax...@avagotech.com wrote: > Signed-off-by: Sumit Saxena Reviewed-by: Tomas Henzl Tomas -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majo

Re: [PATCH 12/12] megaraid_sas : Remove debug print from function megasas_update_span_set

2015-10-19 Thread Tomas Henzl
On 15.10.2015 10:11, sumit.sax...@avagotech.com wrote: > Signed-off-by: Sumit Saxena Reviewed-by: Tomas Henzl Tomas -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majo

Re: [PATCH] scsi: restart list search after unlock in scsi_remove_target

2015-10-19 Thread Bart Van Assche
On 10/19/2015 07:35 AM, Christoph Hellwig wrote: When dropping a lock while iterating a list we must restart the search as other threads could have manipulated the list under us. Without this we can get stuck in an endless loop. Hello Christoph, Thanks for looking into this. However, I think

Re: [PATCH] scsi: restart list search after unlock in scsi_remove_target

2015-10-19 Thread Christoph Hellwig
On Mon, Oct 19, 2015 at 08:36:23AM -0700, Bart Van Assche wrote: > Thanks for looking into this. However, I think we need a motivation in the > patch description why this patch does not reintroduce the soft lockup > documented in patch "scsi_remove_target: fix softlockup regression on hot > remo

Re: [PATCH] scsi: restart list search after unlock in scsi_remove_target

2015-10-19 Thread James Bottomley
On Mon, 2015-10-19 at 17:56 +0200, Christoph Hellwig wrote: > On Mon, Oct 19, 2015 at 08:36:23AM -0700, Bart Van Assche wrote: > > Thanks for looking into this. However, I think we need a motivation in the > > patch description why this patch does not reintroduce the soft lockup > > documented in

Re: [PATCH] scsi: restart list search after unlock in scsi_remove_target

2015-10-19 Thread Dan Williams
On Mon, Oct 19, 2015 at 8:56 AM, Christoph Hellwig wrote: > On Mon, Oct 19, 2015 at 08:36:23AM -0700, Bart Van Assche wrote: >> Thanks for looking into this. However, I think we need a motivation in the >> patch description why this patch does not reintroduce the soft lockup >> documented in patch

[PATCH] iscsi-target: return -ENOMEM instead of -1 in case of failed kmalloc()

2015-10-19 Thread Luis de Bethencourt
Smatch complains about returning hard coded error codes, silence this warning. drivers/target/iscsi/iscsi_target_parameters.c:211 iscsi_create_default_params() warn: returning -1 instead of -ENOMEM is sloppy Signed-off-by: Luis de Bethencourt --- Hi, This doesn't change the functionality. It

[PATCH 3/7] bnx2fc: Set ELS transfer length correctly for middle path commands.

2015-10-19 Thread Chad Dupuis
Signed-off-by: Giridhar Malavali Signed-off-by: Chad Dupuis --- drivers/scsi/bnx2fc/bnx2fc_els.c |1 + drivers/scsi/bnx2fc/bnx2fc_io.c |8 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/bnx2fc/bnx2fc_els.c b/drivers/scsi/bnx2fc/bnx2fc_els.c index 49

[PATCH 1/7] bnx2fc: Update copyright for 2015.

2015-10-19 Thread Chad Dupuis
Signed-off-by: Giridhar Malavali Signed-off-by: Chad Dupuis --- drivers/scsi/bnx2fc/57xx_hsi_bnx2fc.h |4 ++-- drivers/scsi/bnx2fc/bnx2fc.h |4 ++-- drivers/scsi/bnx2fc/bnx2fc_constants.h |4 ++-- drivers/scsi/bnx2fc/bnx2fc_debug.c |4 ++-- drivers/scsi/bnx2fc/bnx2

[PATCH 6/7] bnx2fc: Add HZ to task management timeout.

2015-10-19 Thread Chad Dupuis
Signed-off-by: Giridhar Malavali Signed-off-by: Chad Dupuis --- drivers/scsi/bnx2fc/bnx2fc.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/bnx2fc/bnx2fc.h b/drivers/scsi/bnx2fc/bnx2fc.h index d46267d..d05866d 100644 --- a/drivers/scsi/bnx2fc/bnx2fc.h +++

[PATCH 4/7] bnx2fc: Fix FCP RSP residual parsing.

2015-10-19 Thread Chad Dupuis
Signed-off-by: Giridhar Malavali Signed-off-by: Chad Dupuis --- drivers/scsi/bnx2fc/bnx2fc_io.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c index 5d6a81b..877a79a 100644 --- a/drivers/scsi/bnx2fc/b

[PATCH 0/7] bnx2fc: Update to version 2.9.6.

2015-10-19 Thread Chad Dupuis
From: Chad Dupuis Hi James, Please add the following patches to the scsi misc branch at your earliest convenience. Thanks, Chad Chad Dupuis (7): bnx2fc: Update copyright for 2015. bnx2fc: Remove 'NetXtreme II' from source files. bnx2fc: Set ELS transfer length correctly for middle path

[PATCH 5/7] bnx2fc: Remove explicit logouts.

2015-10-19 Thread Chad Dupuis
Explicit logouts from bnx2fc were causing race conditions in either returning stale SCSI commands or not allowing a target to log back in. Signed-off-by: Giridhar Malavali Signed-off-by: Chad Dupuis --- drivers/scsi/bnx2fc/bnx2fc.h |1 - drivers/scsi/bnx2fc/bnx2fc_els.c |3 +- drive

[PATCH 7/7] bnx2fc: Update version number to 2.9.6.

2015-10-19 Thread Chad Dupuis
Signed-off-by: Giridhar Malavali Signed-off-by: Chad Dupuis --- drivers/scsi/bnx2fc/bnx2fc.h |2 +- drivers/scsi/bnx2fc/bnx2fc_fcoe.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/bnx2fc/bnx2fc.h b/drivers/scsi/bnx2fc/bnx2fc.h index d05866d..4f3c

[PATCH 2/7] bnx2fc: Remove 'NetXtreme II' from source files.

2015-10-19 Thread Chad Dupuis
Signed-off-by: Giridhar Malavali Signed-off-by: Chad Dupuis --- drivers/scsi/bnx2fc/57xx_hsi_bnx2fc.h |2 +- drivers/scsi/bnx2fc/Kconfig|5 ++--- drivers/scsi/bnx2fc/bnx2fc.h |2 +- drivers/scsi/bnx2fc/bnx2fc_constants.h |2 +- drivers/scsi/bnx2fc/bnx2fc_de

[PATCH] scsi: mvsas: fix misleading indentation

2015-10-19 Thread Luis de Bethencourt
Fix a smatch warning: drivers/scsi/mvsas/mv_sas.c:740 mvs_task_prep() warn: curly braces intended? The code is correct, the indention is misleading. When the device is not ready we want to return SAS_PHY_DOWN. But current indentation makes it look like we only do so in the else branch of if (mvi_d

Re: NULL pointer dereference: IP: [] sr_runtime_suspend+0xc/0x20 [sr_mod]

2015-10-19 Thread Ben Hutchings
On Fri, 2015-10-16 at 09:54 +0200, Paul Menzel wrote: [...] > > BUG: unable to handle kernel NULL pointer dereference at 0014 > > IP: [] sr_runtime_suspend+0xc/0x20 [sr_mod] > > *pdpt = 3696e001 *pde = 00 > > Oops: [#1] SMB > > Modules linked in: sd_mod(+) sr_mod(+)

Re: [patch] ses: tighten range checks in ses_intf_add()

2015-10-19 Thread Willy Tarreau
Hi Dan, On Mon, Oct 19, 2015 at 04:48:20PM +0300, Dan Carpenter wrote: > We test that "type_ptr" is within the buffer but then we read from > "type_ptr[3]" so we could be reading beyond the end of the buffer. > > Reported-by: "Berry Cheng ??(??)" > Signed-off-by: Dan Carpenter > --- > T