Re: [PATCH 02/10] drivers:crypto: return -ENOMEM on allocation failure.

2017-10-06 Thread Herbert Xu
Allen Pais  wrote:
> Signed-off-by: Allen Pais 

Patch applied.  Thanks.
-- 
Email: Herbert Xu 
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


[PATCH] scsi: be2iscsi: Use kasprintf

2017-10-06 Thread Himanshu Jha
Use kasprintf instead of combination of kmalloc and sprintf.

Signed-off-by: Himanshu Jha 
---
 drivers/scsi/be2iscsi/be_main.c | 12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index b4542e7..6a9ee0e 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -803,15 +803,14 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
 
if (pcidev->msix_enabled) {
for (i = 0; i < phba->num_cpus; i++) {
-   phba->msi_name[i] = kzalloc(BEISCSI_MSI_NAME,
-   GFP_KERNEL);
+   phba->msi_name[i] = kasprintf(GFP_KERNEL,
+ "beiscsi_%02x_%02x",
+ phba->shost->host_no, i);
if (!phba->msi_name[i]) {
ret = -ENOMEM;
goto free_msix_irqs;
}
 
-   sprintf(phba->msi_name[i], "beiscsi_%02x_%02x",
-   phba->shost->host_no, i);
ret = request_irq(pci_irq_vector(pcidev, i),
  be_isr_msix, 0, phba->msi_name[i],
  _context->be_eq[i]);
@@ -824,13 +823,12 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
goto free_msix_irqs;
}
}
-   phba->msi_name[i] = kzalloc(BEISCSI_MSI_NAME, GFP_KERNEL);
+   phba->msi_name[i] = kasprintf(GFP_KERNEL, "beiscsi_mcc_%02x",
+ phba->shost->host_no);
if (!phba->msi_name[i]) {
ret = -ENOMEM;
goto free_msix_irqs;
}
-   sprintf(phba->msi_name[i], "beiscsi_mcc_%02x",
-   phba->shost->host_no);
ret = request_irq(pci_irq_vector(pcidev, i), be_isr_mcc, 0,
  phba->msi_name[i], _context->be_eq[i]);
if (ret) {
-- 
2.7.4



Re: [PATCH 1/1] scsi/libfc: fix a deadlock in fc_rport_work

2017-10-06 Thread Martin K. Petersen

Satish,

> In places like fc_rport_recv_plogi_req and fcoe_ctlr_vn_add we
> always take the lport disc_mutex lock before the rports mutex
> (rp_mutex) lock. Gaurding list_del_rcu(>peers) with
> disc.disc_mutex in fc_rport_work is correct but the rp_mutex lock
> can and should to be dropped before taking that lock else results
> in a deadlock.

Applied to 4.14/scsi-fixes. Thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: fixup kernel warning during rmmod()

2017-10-06 Thread Martin K. Petersen

Hannes,

> Calling rmmod() on a FC driver will results in warnings like

Applied to 4.14/scsi-fixes. Thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] scsi: isci: Convert timers to use timer_setup()

2017-10-06 Thread Artur Paszkiewicz
On 10/05/2017 02:48 AM, Kees Cook wrote:
> In preparation for unconditionally passing the struct timer_list pointer to
> all timer callbacks, switch to using the new timer_setup() and from_timer()
> to pass the timer pointer explicitly.
> 
> Cc: Intel SCU Linux support 
> Cc: Artur Paszkiewicz 
> Cc: "James E.J. Bottomley" 
> Cc: "Martin K. Petersen" 
> Cc: linux-scsi@vger.kernel.org
> Cc: Thomas Gleixner 
> Signed-off-by: Kees Cook 

Reviewed-by: Artur Paszkiewicz 


Re: [PATCH 1/1] scsi/libfc: fix a deadlock in fc_rport_work

2017-10-06 Thread Johannes Thumshirn
Looks good,
Reviewed-by: Johannes Thumshirn 
-- 
Johannes Thumshirn  Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850