lkml.org 
[lkml]   [2019]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 4.19 075/276] scsi: qla2xxx: Fix a qla24xx_enable_msix() error path
From
Date
On 5/31/19 1:59 AM, Pavel Machek wrote:
>
> On Wed 2019-05-29 20:03:53, Greg Kroah-Hartman wrote:
>> [ Upstream commit 24afabdbd0b3553963a2bbf465895492b14d1107 ]
>>
>> Make sure that the allocated interrupts are freed if allocating memory for
>> the msix_entries array fails.
>>
>> Cc: Himanshu Madhani <hmadhani@marvell.com>
>> Cc: Giridhar Malavali <gmalavali@marvell.com>
>> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
>> Acked-by: Himanshu Madhani <hmadhani@marvell.com>
>> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>
>> --- a/drivers/scsi/qla2xxx/qla_isr.c
>> +++ b/drivers/scsi/qla2xxx/qla_isr.c
>> @@ -3449,7 +3449,7 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)
>> ql_log(ql_log_fatal, vha, 0x00c8,
>> "Failed to allocate memory for ha->msix_entries.\n");
>> ret = -ENOMEM;
>> - goto msix_out;
>> + goto free_irqs;
>
> Could we just do > + pci_free_irq_vectors(ha->pdev); return
> -ENOMEM; here? Going through two gotos just does not feel right.
>
> And yes, I'd replace msix_out with direct returns, too. gotos have
> value when there's cleanup to be done, but we are not doing any here.

That would have been an appropriate comment for the original patch. This
e-mail thread is about backporting an upstream commit to the stable
tree. If you want to change this code you need to send a patch to the
linux-scsi mailing list.

Bart.

\
 
 \ /
  Last update: 2019-05-31 15:57    [W:0.271 / U:0.568 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site