lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0a0a6160-f469-9be8-a9e2-3067c02f0b57@gmail.com>
Date:   Wed, 10 Mar 2021 09:13:43 +0800
From:   Jia-Ju Bai <baijiaju1990@...il.com>
To:     Jens Axboe <axboe@...nel.dk>, josh.h.morris@...ibm.com,
        pjk1939@...ux.ibm.com
Cc:     linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] block: rsxx: fix error return code of rsxx_pci_probe()



On 2021/3/10 4:59, Jens Axboe wrote:
> On 3/8/21 3:05 AM, Jia-Ju Bai wrote:
>> Some error handling segments of rsxx_pci_probe() do not return error code,
>> so add error code for these segments.
>>
>> Fixes: 8722ff8cdbfa ("block: IBM RamSan 70/80 device driver")
>> Reported-by: TOTE Robot <oslab@...nghua.edu.cn>
>> Signed-off-by: Jia-Ju Bai <baijiaju1990@...il.com>
>> ---
>>   drivers/block/rsxx/core.c | 18 +++++++++++++++---
>>   1 file changed, 15 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/block/rsxx/core.c b/drivers/block/rsxx/core.c
>> index 63f549889f87..6b3b9b31a3e8 100644
>> --- a/drivers/block/rsxx/core.c
>> +++ b/drivers/block/rsxx/core.c
>> @@ -760,13 +760,17 @@ static int rsxx_pci_probe(struct pci_dev *dev,
>>   	pci_set_drvdata(dev, card);
>>   
>>   	st = ida_alloc(&rsxx_disk_ida, GFP_KERNEL);
>> -	if (st < 0)
>> +	if (st < 0) {
>> +		st = -ENOMEM;
>>   		goto failed_ida_get;
>> +	}
>>   	card->disk_id = st;
>>   
>>   	st = pci_enable_device(dev);
>> -	if (st)
>> +	if (st) {
>> +		st = -EIO;
>>   		goto failed_enable;
>> +	}
>>   
>>   	pci_set_master(dev);
> Maybe there are some valid parts to the patch, but the two above at
> least make no sense - we're returning the error here as passed from
> ida_alloc or pci_enable_device, why are you overriding them?
>

Ah, sorry for these incorrect parts...
I will send a new patch.


Best wishes,
Jia-Ju Bai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ