Re: nvmet_fc: add defer_req callback for deferment of cmd buffer return

2017-08-14 Thread James Smart
On 8/14/2017 9:38 AM, Christoph Hellwig wrote: On Mon, Aug 14, 2017 at 10:19:24AM -0400, Dave Jones wrote: > + > +/* Cleanup defer'ed IOs in queue */ > +list_for_each_entry(deferfcp, >avail_defer_list, req_list) { > +list_del(>req_list); > +

Re: nvmet_fc: add defer_req callback for deferment of cmd buffer return

2017-08-14 Thread James Smart
On 8/14/2017 9:38 AM, Christoph Hellwig wrote: On Mon, Aug 14, 2017 at 10:19:24AM -0400, Dave Jones wrote: > + > +/* Cleanup defer'ed IOs in queue */ > +list_for_each_entry(deferfcp, >avail_defer_list, req_list) { > +list_del(>req_list); > +

Re: [PATCH 1/2] scsi: lpfc: spin_lock_irq() is not nestable

2017-06-30 Thread James Smart
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> looks good. Signed-off-By: James Smart <james.sm...@broadcom.com>

Re: [PATCH 1/2] scsi: lpfc: spin_lock_irq() is not nestable

2017-06-30 Thread James Smart
Signed-off-by: Dan Carpenter looks good. Signed-off-By: James Smart

Re: [PATCH] scsi: lpfc: fix spelling mistake "entrys" -> "entries"

2017-05-29 Thread James Smart
it's good :) Signed-off-by: James Smart <james.sm...@broadcom.com> -- james On 5/26/2017 3:11 AM, Colin King wrote: From: Colin Ian King <colin.k...@canonical.com> Trivial fix to spelling mistake in debugfs message Signed-off-by: Colin Ian King <colin.k...@canonical.com>

Re: [PATCH] scsi: lpfc: fix spelling mistake "entrys" -> "entries"

2017-05-29 Thread James Smart
it's good :) Signed-off-by: James Smart -- james On 5/26/2017 3:11 AM, Colin King wrote: From: Colin Ian King Trivial fix to spelling mistake in debugfs message Signed-off-by: Colin Ian King

Re: [PATCH] scsi: lpfc: make a couple of functions static

2017-05-29 Thread James Smart
Patch is fine. Signed-off-by: James Smart <james.sm...@broadcom.com> -- james On 5/18/2017 2:35 AM, Colin King wrote: From: Colin Ian King <colin.k...@canonical.com> functions lpfc_nvmet_cleanup_io_context and lpfc_nvmet_setup_io_context can be made static as they

Re: [PATCH] scsi: lpfc: make a couple of functions static

2017-05-29 Thread James Smart
Patch is fine. Signed-off-by: James Smart -- james On 5/18/2017 2:35 AM, Colin King wrote: From: Colin Ian King functions lpfc_nvmet_cleanup_io_context and lpfc_nvmet_setup_io_context can be made static as they do not need to be in global scope. Cleans up sparse warnings: "wa

Re: [PATCH] scsi: lpfc: prevent potential null pointer dereference

2017-05-29 Thread James Smart
Looks good Signed-off-by: James Smart <james.sm...@broadcom.com> -- james On 5/23/2017 8:09 AM, Gustavo A. R. Silva wrote: Null check at line 966: if (ndlp) {, implies that ndlp might be NULL. Functions lpfc_nlp_set_state() and lpfc_issue_els_prli() dereference pointer ndlp. I

Re: [PATCH] scsi: lpfc: prevent potential null pointer dereference

2017-05-29 Thread James Smart
Looks good Signed-off-by: James Smart -- james On 5/23/2017 8:09 AM, Gustavo A. R. Silva wrote: Null check at line 966: if (ndlp) {, implies that ndlp might be NULL. Functions lpfc_nlp_set_state() and lpfc_issue_els_prli() dereference pointer ndlp. Include these function calls inside

Re: [PATCH] lpfc: nvmet_fc: fix format string

2017-05-29 Thread James Smart
Patch is fine. Signed-off-by: James Smart <james.sm...@broadcom.com> -- james On 5/19/2017 1:04 AM, Arnd Bergmann wrote: The lpfc_nvmeio_data() tracing helper always takes a format string and three additional arguments. The latest caller has a format string with only two integer arg

Re: [PATCH] lpfc: nvmet_fc: fix format string

2017-05-29 Thread James Smart
Patch is fine. Signed-off-by: James Smart -- james On 5/19/2017 1:04 AM, Arnd Bergmann wrote: The lpfc_nvmeio_data() tracing helper always takes a format string and three additional arguments. The latest caller has a format string with only two integer arguments, causing this harmless

[PATCH] lpfc: fix build issue if NVME_FC_TARGET is not defined

2017-05-16 Thread James Smart
fix build issue if NVME_FC_TARGET is not defined. noop the code. The code will never be invoked if target mode is not enabled. Signed-off-by: Dick Kennedy <dick.kenn...@broadcom.com> Signed-off-by: James Smart <james.sm...@broadcom.com> --- drivers/scsi/lpfc/lpfc_nvmet.c | 2 ++ 1

[PATCH] lpfc: fix build issue if NVME_FC_TARGET is not defined

2017-05-16 Thread James Smart
fix build issue if NVME_FC_TARGET is not defined. noop the code. The code will never be invoked if target mode is not enabled. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_nvmet.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/lpfc

Re: [PATCH] scsi: lpfc: fix linking against modular NVMe support

2017-03-21 Thread James Smart
Note: the patch I referenced (http://www.spinics.net/lists/linux-scsi/msg106102.html) replaced the one I think you referenced below (http://www.spinics.net/lists/linux-scsi/msg106024.html) -- james On 3/21/2017 7:23 PM, James Smart wrote: Arnd, All of the build issues, including building

Re: [PATCH] scsi: lpfc: fix linking against modular NVMe support

2017-03-21 Thread James Smart
Note: the patch I referenced (http://www.spinics.net/lists/linux-scsi/msg106102.html) replaced the one I think you referenced below (http://www.spinics.net/lists/linux-scsi/msg106024.html) -- james On 3/21/2017 7:23 PM, James Smart wrote: Arnd, All of the build issues, including building

Re: [PATCH] scsi: lpfc: fix linking against modular NVMe support

2017-03-21 Thread James Smart
Arnd, All of the build issues, including building as modules, should have been resolved by the following patch: http://www.spinics.net/lists/linux-scsi/msg106102.html Am I missing something ? -- james On 3/21/2017 6:09 AM, Arnd Bergmann wrote: When LPFC is built-in but NVMe is a loadable

Re: [PATCH] scsi: lpfc: fix linking against modular NVMe support

2017-03-21 Thread James Smart
Arnd, All of the build issues, including building as modules, should have been resolved by the following patch: http://www.spinics.net/lists/linux-scsi/msg106102.html Am I missing something ? -- james On 3/21/2017 6:09 AM, Arnd Bergmann wrote: When LPFC is built-in but NVMe is a loadable

Re: [PATCH] scsi: lpfc: don't dereference dma_buf->iocbq before null check

2017-03-04 Thread James Smart
Looks good. I included it in the lpfc patch set just posted. -- james On 2/24/2017 6:09 AM, Colin King wrote: From: Colin Ian King dma_buf->iocbq is being dereferenced immediately before it is being null checked, so we have a potential null pointer dereference bug.

Re: [PATCH] scsi: lpfc: don't dereference dma_buf->iocbq before null check

2017-03-04 Thread James Smart
Looks good. I included it in the lpfc patch set just posted. -- james On 2/24/2017 6:09 AM, Colin King wrote: From: Colin Ian King dma_buf->iocbq is being dereferenced immediately before it is being null checked, so we have a potential null pointer dereference bug. Fix this by only

Re: [PATCH] scsi: lpfc: fix missing spin_unlock on sql_list_lock

2017-03-04 Thread James Smart
Looks good. I included it in the lpfc patch set just posted. -- james On 2/24/2017 6:30 AM, Colin King wrote: From: Colin Ian King In the case where sglq is null, the current code just returns without unlocking the spinlock sql_list_lock. Fix this by breaking out

Re: [PATCH] scsi: lpfc: remove redundant assignment of sgel

2017-03-04 Thread James Smart
Looks good. I included it in the lpfc patch set just posted. -- james On 2/24/2017 5:45 AM, Colin King wrote: From: Colin Ian King In the NVMET_FCOP_RSP case, sgel is assigned but never used and hence is redundant and can be removed. Detected by CoverityScan,

Re: [PATCH] scsi: lpfc: sanity check hrq is null before dereferencing it

2017-03-04 Thread James Smart
Looks good. I included it in the lpfc patch set just posted. -- james On 2/24/2017 5:56 AM, Colin King wrote: From: Colin Ian King The sanity check for hrq should be moved to before the deference of hrq to ensure we don't perform a null pointer deference. Detected

Re: [PATCH] scsi: lpfc: sanity check hrq is null before dereferencing it

2017-03-04 Thread James Smart
Looks good. I included it in the lpfc patch set just posted. -- james On 2/24/2017 5:56 AM, Colin King wrote: From: Colin Ian King The sanity check for hrq should be moved to before the deference of hrq to ensure we don't perform a null pointer deference. Detected by CoverityScan,

Re: [PATCH] scsi: lpfc: fix missing spin_unlock on sql_list_lock

2017-03-04 Thread James Smart
Looks good. I included it in the lpfc patch set just posted. -- james On 2/24/2017 6:30 AM, Colin King wrote: From: Colin Ian King In the case where sglq is null, the current code just returns without unlocking the spinlock sql_list_lock. Fix this by breaking out of the while loop and the

Re: [PATCH] scsi: lpfc: remove redundant assignment of sgel

2017-03-04 Thread James Smart
Looks good. I included it in the lpfc patch set just posted. -- james On 2/24/2017 5:45 AM, Colin King wrote: From: Colin Ian King In the NVMET_FCOP_RSP case, sgel is assigned but never used and hence is redundant and can be removed. Detected by CoverityScan, CID#1411658 ("Unused value")

Re: [PATCH] scsi: lpfc: replace init_timer by setup_timer

2017-03-03 Thread James Smart
looks good -- james Signed-off-by: James Smart <james.sm...@broadcom.com> On 3/3/2017 4:45 AM, Jiri Slaby wrote: From: Tomas Jasek <tomsi...@gmail.com> This patch shortens every init_timer in lpfc module followed by function and data assignment using setup_timer. This is pu

Re: [PATCH] scsi: lpfc: replace init_timer by setup_timer

2017-03-03 Thread James Smart
looks good -- james Signed-off-by: James Smart On 3/3/2017 4:45 AM, Jiri Slaby wrote: From: Tomas Jasek This patch shortens every init_timer in lpfc module followed by function and data assignment using setup_timer. This is purely cleanup patch, it does not add new functionality nor

Re: [PATCH] scsi: lpfc: use proper format string for dma_addr_t

2017-02-28 Thread James Smart
Arnd, Thank you. Looks good. -- james Signed-off-by: James Smart <james.sm...@broadcom.com> On 2/27/2017 12:37 PM, Arnd Bergmann wrote: dma_addr_t may be either u32 or u64, depending on the kernel configuration, and we get a warning for the 32-bit case: drivers/scsi/lpfc/lpfc_

Re: [PATCH] scsi: lpfc: use proper format string for dma_addr_t

2017-02-28 Thread James Smart
Arnd, Thank you. Looks good. -- james Signed-off-by: James Smart On 2/27/2017 12:37 PM, Arnd Bergmann wrote: dma_addr_t may be either u32 or u64, depending on the kernel configuration, and we get a warning for the 32-bit case: drivers/scsi/lpfc/lpfc_nvme.c: In function 'lpfc_nvme_ls_req

Re: [PATCH] scsi: lpfc: use div_u64 for 64-bit division

2017-02-28 Thread James Smart
Arnd, Thank you. Looks good. -- james Signed-off-by: James Smart <james.sm...@broadcom.com> On 2/27/2017 12:31 PM, Arnd Bergmann wrote: The new debugfs output causes a link error on 32-bit architectures: ERROR: "__aeabi_uldivmod" [drivers/scsi/lpfc/lpfc.ko] undef

Re: [PATCH] scsi: lpfc: use div_u64 for 64-bit division

2017-02-28 Thread James Smart
Arnd, Thank you. Looks good. -- james Signed-off-by: James Smart On 2/27/2017 12:31 PM, Arnd Bergmann wrote: The new debugfs output causes a link error on 32-bit architectures: ERROR: "__aeabi_uldivmod" [drivers/scsi/lpfc/lpfc.ko] undefined! This code is not performance criti

Re: [PATCH] lpfc: avoid double free of resource identifiers

2017-01-11 Thread James Smart
looks good. Thanks Signed-off-by: James Smart <james.sm...@broadcom.com> -- james On 1/11/2017 2:06 AM, Johannes Thumshirn wrote: From: Roberto Sassu <rsa...@suse.de> Set variables initialized in lpfc_sli4_alloc_resource_identifiers() to NULL if an error occurre

Re: [PATCH] lpfc: avoid double free of resource identifiers

2017-01-11 Thread James Smart
looks good. Thanks Signed-off-by: James Smart -- james On 1/11/2017 2:06 AM, Johannes Thumshirn wrote: From: Roberto Sassu Set variables initialized in lpfc_sli4_alloc_resource_identifiers() to NULL if an error occurred. Otherwise, lpfc_sli4_driver_resource_unset() attempts to free

Re: [PATCH] nvme-fabrics: remove some logically dead code performing redundant ret checks

2016-12-19 Thread James Smart
Looks good. -- james Signed-off-by: James Smart <james.sm...@broadcom.com> On 12/9/2016 6:59 AM, Colin King wrote: From: Colin Ian King <colin.k...@canonical.com> The check to see if ret is non-zero and return this rather than count is redundant in two occassions. It is redun

Re: [PATCH] nvme-fabrics: remove some logically dead code performing redundant ret checks

2016-12-19 Thread James Smart
Looks good. -- james Signed-off-by: James Smart On 12/9/2016 6:59 AM, Colin King wrote: From: Colin Ian King The check to see if ret is non-zero and return this rather than count is redundant in two occassions. It is redundant because prior to this check, the return code ret is already

Re: [patch] nvme-fabrics: correct some printk information

2016-12-19 Thread James Smart
Dan, Mind if I solve this a different way ? I really don't know why knowing the ptr value is even meaningful -- james On 12/10/2016 1:06 AM, Dan Carpenter wrote: We really don't care where "ctrl" is on the stack since we're just returning soon what we want is the actual ctrl pointer

Re: [patch] nvme-fabrics: correct some printk information

2016-12-19 Thread James Smart
Dan, Mind if I solve this a different way ? I really don't know why knowing the ptr value is even meaningful -- james On 12/10/2016 1:06 AM, Dan Carpenter wrote: We really don't care where "ctrl" is on the stack since we're just returning soon what we want is the actual ctrl pointer

Re: [PATCH] nvme-fabrics: simplify error handling of nvme_fc_create_hw_io_queues

2016-12-15 Thread James Smart
Looks fine -- james Signed-off-by: James Smart <james.sm...@broadcom.com> On 12/15/2016 5:20 AM, Johannes Thumshirn wrote: Simplify the error handling of nvme_fc_create_hw_io_queues(), this saves us one variable and one level of indentation. Signed-off-by: Johannes Thumshirn &l

Re: [PATCH] nvme-fabrics: simplify error handling of nvme_fc_create_hw_io_queues

2016-12-15 Thread James Smart
Looks fine -- james Signed-off-by: James Smart On 12/15/2016 5:20 AM, Johannes Thumshirn wrote: Simplify the error handling of nvme_fc_create_hw_io_queues(), this saves us one variable and one level of indentation. Signed-off-by: Johannes Thumshirn --- drivers/nvme/host/fc.c | 15

Re: [PATCH] lpfc: use %zd format string for size_t

2016-10-17 Thread James Smart
Thanks Signed-off-by: James Smart <james.sm...@broadcom.com> -- james On 10/17/2016 5:35 AM, Arnd Bergmann wrote: A recent bugfix introduced a harmless warning in the lpfc driver: drivers/scsi/lpfc/lpfc_init.c: In function 'lpfc_write_firmware': drivers/scsi/lpfc/lpfc_logmsg.h:56:45:

Re: [PATCH] lpfc: use %zd format string for size_t

2016-10-17 Thread James Smart
Thanks Signed-off-by: James Smart -- james On 10/17/2016 5:35 AM, Arnd Bergmann wrote: A recent bugfix introduced a harmless warning in the lpfc driver: drivers/scsi/lpfc/lpfc_init.c: In function 'lpfc_write_firmware': drivers/scsi/lpfc/lpfc_logmsg.h:56:45: error: format '%ld' expects

[PATCH v4] add u64 number parser

2016-09-25 Thread James Smart
add u64 number parser Reverted back to version 2 of the patch. This adds the interface using existing logic. Comments from the prior reviewers to move to kasprintf were rejected by Linus. Signed-off-by: James Smart <james.sm...@broadcom.com> --- include/linux/parser.h | 1 + lib/pa

[PATCH v4] add u64 number parser

2016-09-25 Thread James Smart
add u64 number parser Reverted back to version 2 of the patch. This adds the interface using existing logic. Comments from the prior reviewers to move to kasprintf were rejected by Linus. Signed-off-by: James Smart --- include/linux/parser.h | 1 + lib/parser.c | 47

[PATCH v3] add u64 number parser

2016-09-24 Thread James Smart
add u64 number parser Prior patch revised to use kasprintf. Modified match_number to use kasprintf as well Signed-off-by: James Smart <james.sm...@broadcom.com> --- include/linux/parser.h | 1 + lib/parser.c | 51 ++ 2 files c

[PATCH v3] add u64 number parser

2016-09-24 Thread James Smart
add u64 number parser Prior patch revised to use kasprintf. Modified match_number to use kasprintf as well Signed-off-by: James Smart --- include/linux/parser.h | 1 + lib/parser.c | 51 ++ 2 files changed, 48 insertions(+), 4

Re: [PATCH] lpfc: Fix possible NULL pointer dereference

2016-07-28 Thread James Smart
This patch is good. Thanks -- james Signed-off-by: James Smart <james.sm...@broadcom.com> On 6/15/2016 6:00 AM, Johannes Thumshirn wrote: Check for the existance of pciob->vport before accessing it. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/scsi/

Re: [PATCH] lpfc: Fix possible NULL pointer dereference

2016-07-28 Thread James Smart
This patch is good. Thanks -- james Signed-off-by: James Smart On 6/15/2016 6:00 AM, Johannes Thumshirn wrote: Check for the existance of pciob->vport before accessing it. Signed-off-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_sli.c | 13 - 1 file changed

Re: [PATCH] add u64 number parser

2016-07-23 Thread James Smart
On 7/22/2016 6:32 PM, Bart Van Assche wrote: On 07/22/16 17:23, James Smart wrote: +buf = kmalloc(len + 1, GFP_KERNEL); +if (!buf) +return -ENOMEM; +memcpy(buf, s->from, len); +buf[len] = '\0'; Hello James, Have you considered to combine the above kmal

Re: [PATCH] add u64 number parser

2016-07-23 Thread James Smart
On 7/22/2016 6:32 PM, Bart Van Assche wrote: On 07/22/16 17:23, James Smart wrote: +buf = kmalloc(len + 1, GFP_KERNEL); +if (!buf) +return -ENOMEM; +memcpy(buf, s->from, len); +buf[len] = '\0'; Hello James, Have you considered to combine the above kmal

[PATCH] add u64 number parser

2016-07-22 Thread James Smart
add u64 number parser Will be used by the nvme-fabrics FC transport in parsing options Signed-off-by: James Smart <james.sm...@broadcom.com> --- include/linux/parser.h | 1 + lib/parser.c | 47 +++ 2 files changed, 48 insertions(+)

[PATCH] add u64 number parser

2016-07-22 Thread James Smart
add u64 number parser Will be used by the nvme-fabrics FC transport in parsing options Signed-off-by: James Smart --- include/linux/parser.h | 1 + lib/parser.c | 47 +++ 2 files changed, 48 insertions(+) diff --git a/include/linux

Re: [PATCH 1/2] scsi: lpfc: avoid harmless comparison warning

2016-07-15 Thread James Smart
Patch is good. Thanks -- james Signed-off-by: James Smart <james.sm...@broadcom.com> On 6/15/2016 1:42 PM, Arnd Bergmann wrote: When building with -Wextra, we get a lot of warnings for the lpfc driver concerning expressions that are always true, starting with: drivers/scsi/lpfc/lpfc_

Re: [PATCH 1/2] scsi: lpfc: avoid harmless comparison warning

2016-07-15 Thread James Smart
Patch is good. Thanks -- james Signed-off-by: James Smart On 6/15/2016 1:42 PM, Arnd Bergmann wrote: When building with -Wextra, we get a lot of warnings for the lpfc driver concerning expressions that are always true, starting with: drivers/scsi/lpfc/lpfc_attr.c: In function

Re: [RFC PATCH] lpfc: Add lockdep assertions

2015-12-16 Thread James Smart
Johannes, Thank you for the time and effort on the patch. At this time, as it doesn't functionally change anything, I did not include the patch. I will consider it if we see additional issues it can help resolve. -- james s On 11/20/2015 4:37 AM, Johannes Thumshirn wrote: Several

Re: [PATCH v2] lpfc: replaced kmalloc + memset with kzalloc

2015-12-16 Thread James Smart
fyi - this patch was just pushed in our 11.0.0.10 patch set - patch 16/17 Note: Patch 16 contains the exact same patch submitted by Punit Vara. I posted Punit's change only as it arrived earlier. -- james s On 11/18/2015 11:34 PM, Saurabh Sengar wrote: replacing kmalloc and memset by a

Re: [PATCH v2 1/2] scsi: lpfc: Use kzalloc instead of kmalloc

2015-12-16 Thread James Smart
fyi - this patch was just pushed in our 11.0.0.10 patch set - patch 16/17 -- james s On 10/24/2015 8:25 PM, Matthew R. Ochs wrote: On Oct 24, 2015, at 2:06 AM, Punit Vara wrote: This patch is to the lpfc_els.c which resolves following warning reported by coccicheck: WARNING: kzalloc

Re: [PATCH] SCSI-lpfc: Delete unnecessary checks before the function call "mempool_destroy"

2015-12-16 Thread James Smart
fyi - this patch was just pushed in our 11.0.0.10 patch set - patch 15/17 -- james s On 11/17/2015 12:44 AM, SF Markus Elfring wrote: From: Markus Elfring Date: Tue, 17 Nov 2015 09:34:27 +0100 The mempool_destroy() function tests whether its argument is NULL and then returns immediately.

Re: [PATCH v2] lpfc: replaced kmalloc + memset with kzalloc

2015-12-16 Thread James Smart
fyi - this patch was just pushed in our 11.0.0.10 patch set - patch 16/17 Note: Patch 16 contains the exact same patch submitted by Punit Vara. I posted Punit's change only as it arrived earlier. -- james s On 11/18/2015 11:34 PM, Saurabh Sengar wrote: replacing kmalloc and memset by a

Re: [RFC PATCH] lpfc: Add lockdep assertions

2015-12-16 Thread James Smart
Johannes, Thank you for the time and effort on the patch. At this time, as it doesn't functionally change anything, I did not include the patch. I will consider it if we see additional issues it can help resolve. -- james s On 11/20/2015 4:37 AM, Johannes Thumshirn wrote: Several

Re: [PATCH] SCSI-lpfc: Delete unnecessary checks before the function call "mempool_destroy"

2015-12-16 Thread James Smart
fyi - this patch was just pushed in our 11.0.0.10 patch set - patch 15/17 -- james s On 11/17/2015 12:44 AM, SF Markus Elfring wrote: From: Markus Elfring Date: Tue, 17 Nov 2015 09:34:27 +0100 The mempool_destroy() function tests whether its argument is NULL

Re: [PATCH v2 1/2] scsi: lpfc: Use kzalloc instead of kmalloc

2015-12-16 Thread James Smart
fyi - this patch was just pushed in our 11.0.0.10 patch set - patch 16/17 -- james s On 10/24/2015 8:25 PM, Matthew R. Ochs wrote: On Oct 24, 2015, at 2:06 AM, Punit Vara wrote: This patch is to the lpfc_els.c which resolves following warning reported by coccicheck:

Re: [PATCH] lpfc: fix memory leak and NULL dereference

2015-10-12 Thread James Smart
Looks Good - Thank you Sudip. Reviewed-by: James Smart -- james s On 9/23/2015 6:32 AM, Sudip Mukherjee wrote: kmalloc() can return NULL and without checking we were dereferencing it. Moreover if kmalloc succeeds but the function fails in other parts then we were returning the error code

Re: [PATCH] lpfc: fix memory leak and NULL dereference

2015-10-12 Thread James Smart
Looks Good - Thank you Sudip. Reviewed-by: James Smart <james.sm...@avagotech.com> -- james s On 9/23/2015 6:32 AM, Sudip Mukherjee wrote: kmalloc() can return NULL and without checking we were dereferencing it. Moreover if kmalloc succeeds but the function fails in other parts then w

Re: [PATCH] lpfc: Fix possible use-after-free and double free in lpfc_mbx_cmpl_rdp_page_a2()

2015-08-31 Thread James Smart
On 8/18/2015 6:27 PM, Sebastian Herbszt wrote: Johannes Thumshirn wrote: Sebastian Herbszt writes: Johannes Thumshirn wrote: If the bf_get() call in lpfc_mbx_cmpl_rdp_page_a2() does succeeds, execution continues normally and mp gets kfree()d. If the subsequent call to lpfc_sli_issue_mbox()

Re: [PATCH] lpfc: Fix possible use-after-free and double free in lpfc_mbx_cmpl_rdp_page_a2()

2015-08-31 Thread James Smart
On 8/18/2015 6:27 PM, Sebastian Herbszt wrote: Johannes Thumshirn wrote: Sebastian Herbszt writes: Johannes Thumshirn wrote: If the bf_get() call in lpfc_mbx_cmpl_rdp_page_a2() does succeeds, execution continues normally and mp gets kfree()d. If the subsequent call to

Re: [PATCH] scsi: Export SCSI Inquiry data to sysfs

2015-08-14 Thread James Smart
On 8/14/2015 2:32 AM, Hannes Reinecke wrote: On 08/13/2015 01:50 PM, Johannes Thumshirn wrote: Export the RAW SCSI Inquiry to sysfs as binfile. This way the data can be used by userlang without the need to have and ioctl or use the sg_inq tool. userland! Just be careful. There are

Re: [PATCH] scsi: Export SCSI Inquiry data to sysfs

2015-08-14 Thread James Smart
On 8/14/2015 2:32 AM, Hannes Reinecke wrote: On 08/13/2015 01:50 PM, Johannes Thumshirn wrote: Export the RAW SCSI Inquiry to sysfs as binfile. This way the data can be used by userlang without the need to have and ioctl or use the sg_inq tool. userland! Just be careful. There are

Re: [PATCH] Fix kmalloc overflow in LPFC driver at large core count

2015-07-13 Thread James Smart
Looks fine. If not merged prior, we'll pull it in our next update. Reviewed-By: James Smart -- james s On 7/10/2015 12:31 PM, ian mitchell wrote: This patch allows the LPFC to start up without a fatal kernel bug based on an exceeded KMALLOC_MAX_SIZE and a too large NR_CPU-based maskbits

Re: [PATCH] Fix kmalloc overflow in LPFC driver at large core count

2015-07-13 Thread James Smart
Looks fine. If not merged prior, we'll pull it in our next update. Reviewed-By: James Smart james.sm...@avagotech.com -- james s On 7/10/2015 12:31 PM, ian mitchell wrote: This patch allows the LPFC to start up without a fatal kernel bug based on an exceeded KMALLOC_MAX_SIZE and a too

Re: [PATCH] lpfc: Destroy lpfc_hba_index IDR on module exit

2015-07-10 Thread James Smart
Reviewed-By: James Smart -- james s On 7/8/2015 11:19 AM, Johannes Thumshirn wrote: Destroy lpfc_hba_index IDR on module exit, reclaiming the allocated memory. This was detected by the following semantic patch (written by Luis Rodriguez ) @ defines_module_init @ declarer name module_init

Re: [PATCH] lpfc: Destroy lpfc_hba_index IDR on module exit

2015-07-10 Thread James Smart
Reviewed-By: James Smart james.sm...@avagotech.com -- james s On 7/8/2015 11:19 AM, Johannes Thumshirn wrote: Destroy lpfc_hba_index IDR on module exit, reclaiming the allocated memory. This was detected by the following semantic patch (written by Luis Rodriguez mcg...@suse.com) SmPL

Re: [PATCH trivial] lpfc: Grammar s/an negative/a negative/

2015-05-21 Thread James Smart
Reviewed-By: James Smart looks fine. Thanks -- james s On 5/21/2015 8:11 AM, Geert Uytterhoeven wrote: Signed-off-by: Geert Uytterhoeven --- drivers/scsi/lpfc/lpfc_debugfs.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/lpfc

Re: [PATCH trivial] lpfc: Grammar s/an negative/a negative/

2015-05-21 Thread James Smart
Reviewed-By: James Smart james.sm...@avagotech.com looks fine. Thanks -- james s On 5/21/2015 8:11 AM, Geert Uytterhoeven wrote: Signed-off-by: Geert Uytterhoeven geert+rene...@glider.be --- drivers/scsi/lpfc/lpfc_debugfs.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions

Re: [PATCH kernel] commit 4fbdf9cb ("lpfc: Fix for lun discovery issue with saturn adapter.")

2015-05-20 Thread James Smart
Alexey, Can you send me boot messages so I can see everything the lpfc driver may have done ? And you're using 10.5.0.0 verbatim ? -- james On 5/20/2015 9:11 AM, James Smart wrote: Not sure - I'll go look. -- james On 5/19/2015 11:55 PM, Alexey Kardashevskiy wrote: On 05/06/2015 07:46

Re: [PATCH kernel] commit 4fbdf9cb ("lpfc: Fix for lun discovery issue with saturn adapter.")

2015-05-20 Thread James Smart
Not sure - I'll go look. -- james On 5/19/2015 11:55 PM, Alexey Kardashevskiy wrote: On 05/06/2015 07:46 AM, Sebastian Herbszt wrote: James Smart wrote: Reviewed-By: James Smart Alexey, Sebastian, Yes - this section needs to be reverted. This patch is good. -- james s Reviewed

Re: [PATCH kernel] commit 4fbdf9cb (lpfc: Fix for lun discovery issue with saturn adapter.)

2015-05-20 Thread James Smart
Not sure - I'll go look. -- james On 5/19/2015 11:55 PM, Alexey Kardashevskiy wrote: On 05/06/2015 07:46 AM, Sebastian Herbszt wrote: James Smart wrote: Reviewed-By: James Smart james.sm...@emulex.com Alexey, Sebastian, Yes - this section needs to be reverted. This patch is good

Re: [PATCH kernel] commit 4fbdf9cb (lpfc: Fix for lun discovery issue with saturn adapter.)

2015-05-20 Thread James Smart
Alexey, Can you send me boot messages so I can see everything the lpfc driver may have done ? And you're using 10.5.0.0 verbatim ? -- james On 5/20/2015 9:11 AM, James Smart wrote: Not sure - I'll go look. -- james On 5/19/2015 11:55 PM, Alexey Kardashevskiy wrote: On 05/06/2015 07:46

Re: [PATCH kernel] commit 4fbdf9cb ("lpfc: Fix for lun discovery issue with saturn adapter.")

2015-05-05 Thread James Smart
Reviewed-By: James Smart Alexey, Sebastian, Yes - this section needs to be reverted. This patch is good. -- james s On 4/28/2015 4:26 AM, Alexey Kardashevskiy wrote: This reverts 4fbdf9cb is breaks LPFC on POWER7 machine, big endian kernel. This is the hardware used for verification

Re: [PATCH kernel] commit 4fbdf9cb (lpfc: Fix for lun discovery issue with saturn adapter.)

2015-05-05 Thread James Smart
Reviewed-By: James Smart james.sm...@emulex.com Alexey, Sebastian, Yes - this section needs to be reverted. This patch is good. -- james s On 4/28/2015 4:26 AM, Alexey Kardashevskiy wrote: This reverts 4fbdf9cb is breaks LPFC on POWER7 machine, big endian kernel. This is the hardware

Re: [PATCH] drivers, scsi, lpfc: Fix trivial typos in comments

2015-03-02 Thread James Smart
Thanks Acked-by: James Smart -- james s On 2/24/2015 3:18 AM, Yannick Guerrini wrote: Change 'comands' to 'commands' Signed-off-by: Yannick Guerrini --- drivers/scsi/lpfc/lpfc_debugfs.c | 2 +- drivers/scsi/lpfc/lpfc_init.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions

Re: [PATCH] drivers, scsi, lpfc: Fix trivial typos in comments

2015-03-02 Thread James Smart
Thanks Acked-by: James Smart james.sm...@emulex.com -- james s On 2/24/2015 3:18 AM, Yannick Guerrini wrote: Change 'comands' to 'commands' Signed-off-by: Yannick Guerrini yguerr...@tomshardware.fr --- drivers/scsi/lpfc/lpfc_debugfs.c | 2 +- drivers/scsi/lpfc/lpfc_init.c| 2 +- 2

Re: [PATCH] scsi/lpfc: use remove handler as shutdown handler

2015-02-16 Thread James Smart
Looks good. Acked-By: James Smart -- james On 1/26/2015 10:18 AM, Thadeu Lima de Souza Cascardo wrote: Without a shutdown handler, some cards behave very badly after a kexec. During probe, pending DMA writes will corrupt kernel memory, for example. Using the remove handler guarantees we

Re: [PATCH] scsi/lpfc: use remove handler as shutdown handler

2015-02-16 Thread James Smart
Looks good. Acked-By: James Smart james.sm...@emulex.com -- james On 1/26/2015 10:18 AM, Thadeu Lima de Souza Cascardo wrote: Without a shutdown handler, some cards behave very badly after a kexec. During probe, pending DMA writes will corrupt kernel memory, for example. Using the remove

Re: [BUG] kzalloc overflow in lpfc driver on 6k core system

2014-12-06 Thread James Smart
Alex, Myself and several others here at Emulex maintain the code. The recommendations look fine. Feel free to post something if you beat us to the work. -- james s On 12/3/2014 11:05 AM, Alex Thorlton wrote: On Tue, Dec 02, 2014 at 10:39:40PM +, Elliott, Robert (Server Storage)

Re: [BUG] kzalloc overflow in lpfc driver on 6k core system

2014-12-06 Thread James Smart
Alex, Myself and several others here at Emulex maintain the code. The recommendations look fine. Feel free to post something if you beat us to the work. -- james s On 12/3/2014 11:05 AM, Alex Thorlton wrote: On Tue, Dec 02, 2014 at 10:39:40PM +, Elliott, Robert (Server Storage)

Re: [PATCH] lpfc: Avoid to disable pci_dev twice

2014-08-27 Thread James Smart
Mike, Can you confirm - the "nulls" this patch correct are because the probe_one and error_detect threads are running concurrently, thus battling ? If so - this fix looks insufficient and we should rework it. Q: why are they allowed to run concurrently ? I could see this solved at the

Re: [PATCH] lpfc: Avoid to disable pci_dev twice

2014-08-27 Thread James Smart
Mike, Can you confirm - the nulls this patch correct are because the probe_one and error_detect threads are running concurrently, thus battling ? If so - this fix looks insufficient and we should rework it. Q: why are they allowed to run concurrently ? I could see this solved at the

Re: [PATCH v2 RESEND 12/23] lpfc: Use pci_enable_msix_range() instead of pci_enable_msix()

2014-08-11 Thread James Smart
pci_enable_msi_range() or pci_enable_msi_exact() and pci_enable_msix_range() or pci_enable_msix_exact() interfaces. Hi James, Could you please review this patch? James? Thanks! Signed-off-by: Alexander Gordeev Cc: James Smart Cc: linux-s...@vger.kernel.org Cc: linux-...@vger.kernel.org --- drivers/scsi

Re: [PATCH v2 RESEND 12/23] lpfc: Use pci_enable_msix_range() instead of pci_enable_msix()

2014-08-11 Thread James Smart
pci_enable_msi_range() or pci_enable_msi_exact() and pci_enable_msix_range() or pci_enable_msix_exact() interfaces. Hi James, Could you please review this patch? James? Thanks! Signed-off-by: Alexander Gordeev agord...@redhat.com Cc: James Smart james.sm...@emulex.com Cc: linux-s...@vger.kernel.org Cc: linux

Re: [PATCH] [SCSI] lpfc 8.3.43: use NULL instead of 0 for pointer

2014-02-24 Thread James Smart
Acked-by: James Smart -- james s On 2/20/2014 8:10 PM, Daeseok Youn wrote: >From 9e7478f6e953fac5b2bef0f5abe76fe8dc9e59d1 Mon Sep 17 00:00:00 2001 From: Daeseok Youn Date: Fri, 21 Feb 2014 09:03:32 +0900 Subject: [PATCH] [SCSI] lpfc 8.3.43: use NULL instead of 0 for pointer sparse s

Re: [PATCH] [SCSI] lpfc 8.3.43: use NULL instead of 0 for pointer

2014-02-24 Thread James Smart
Acked-by: James Smart james.sm...@emulex.com -- james s On 2/20/2014 8:10 PM, Daeseok Youn wrote: From 9e7478f6e953fac5b2bef0f5abe76fe8dc9e59d1 Mon Sep 17 00:00:00 2001 From: Daeseok Youn daeseok.y...@gmail.com Date: Fri, 21 Feb 2014 09:03:32 +0900 Subject: [PATCH] [SCSI] lpfc 8.3.43: use

Re: [PATCH 12/22] lpfc: Use pci_enable_msix_range()

2014-02-20 Thread James Smart
faces need to be updated to use the new pci_enable_msi_range() and pci_enable_msix_range() interfaces. CC: Alexander Gordeev Cc: linux-s...@vger.kernel.org Cc: linux-...@vger.kernel.org Signed-off-by: James Smart --- lpfc_init.c | 43 ++- 1 file c

Re: [PATCH 11/22] lpfc: Remove superfluous call to pci_disable_msix()

2014-02-20 Thread James Smart
Hi Alexander, The change is fine - but not really necessary. The pci_disable_msix() call explicitly checks for enablement so it's safe. It really is a superfluous change - but if James wants to take it: Acked-by: James Smart -- james s On 2/4/2014 6:16 AM, Alexander Gordeev wrote

Re: [PATCH 11/22] lpfc: Remove superfluous call to pci_disable_msix()

2014-02-20 Thread James Smart
Hi Alexander, The change is fine - but not really necessary. The pci_disable_msix() call explicitly checks for enablement so it's safe. It really is a superfluous change - but if James wants to take it: Acked-by: James Smart james.sm...@emulex.com -- james s On 2/4/2014 6:16 AM

Re: [PATCH 12/22] lpfc: Use pci_enable_msix_range()

2014-02-20 Thread James Smart
to be updated to use the new pci_enable_msi_range() and pci_enable_msix_range() interfaces. CC: Alexander Gordeev agord...@redhat.com Cc: linux-s...@vger.kernel.org Cc: linux-...@vger.kernel.org Signed-off-by: James Smart james.sm...@emulex.com --- lpfc_init.c | 43

Re: [LSF/MM TOPIC] [ATTEND] scsi-mq

2014-01-22 Thread James Smart
James, I'd like to attend to participate in the EH, MQ, and T10 PI RDMA discussions. -- james s On 1/16/2014 11:29 AM, Sagi Grimberg wrote: On 1/16/2014 1:05 AM, Nicholas A. Bellinger wrote: Hi all, I'd like to discuss the current state of scsi-mq prototype code. And now that blk-mq

Re: [LSF/MM TOPIC] [ATTEND] scsi-mq

2014-01-22 Thread James Smart
James, I'd like to attend to participate in the EH, MQ, and T10 PI RDMA discussions. -- james s On 1/16/2014 11:29 AM, Sagi Grimberg wrote: On 1/16/2014 1:05 AM, Nicholas A. Bellinger wrote: Hi all, I'd like to discuss the current state of scsi-mq prototype code. And now that blk-mq

Re: [PATCH] drivers: scsi: lpfc_debugfs: Fix wrong assignment

2013-11-14 Thread James Smart
Thanks! Acked-by: James Smart -- james s On 10/18/2013 7:15 PM, Felipe Pena wrote: On lpfc_debugfs_initialize function the dumpHostSlim member setup happens when 'phba->sli_rev < LPFC_SLI_REV4' is true, however when it is false NULL has been assigned to debug_dumpHBASlim i

Re: [PATCH] drivers: scsi: lpfc_debugfs: Fix wrong assignment

2013-11-14 Thread James Smart
Thanks! Acked-by: James Smart james.sm...@emulex.com -- james s On 10/18/2013 7:15 PM, Felipe Pena wrote: On lpfc_debugfs_initialize function the dumpHostSlim member setup happens when 'phba-sli_rev LPFC_SLI_REV4' is true, however when it is false NULL has been assigned

<    1   2   3   4   >