[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e6c676d8-0175-e07f-3416-f3b88d0ea4e9@huawei.com>
Date: Thu, 27 Jul 2023 12:02:42 +0800
From: liulongfang <liulongfang@...wei.com>
To: Greg KH <gregkh@...uxfoundation.org>
CC: <linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] USB:bugfix a controller halt error
On 2023/7/26 15:18, Greg KH wrote:
> On Wed, Jul 26, 2023 at 02:44:01PM +0800, liulongfang wrote:
>> On 2023/7/21 19:08, Greg KH Wrote:
>>> On Fri, Jul 21, 2023 at 06:00:15PM +0800, liulongfang wrote:
>>>> On systems that use ECC memory. The ECC error of the memory will
>>>> cause the USB controller to halt. It causes the usb_control_msg()
>>>> operation to fail.
>>>
>>> Why does ECC memory matter here?
>>>
>>
>> This is a test conducted under a special test scenario.
>> ECC memory errors are caused by some test tools.
>
> What memory is failing, and why does just this single check matter in
> the whole kernel?
>
> If hardware is broken, and failing, it's not the job of the kernel to
> protect against that, is it? Shouldn't the ECC memory controller have
> properly notified the kernel of the fault and reset the machine because
> it is now in an undetermined state?
>
>>> Are you sure this is correct? How was this tested? Seems to me that
>>> this will still return "success" if this code path ever happens, what am
>>
>> You are right. I made a patch error here. The code modification should be like this:
>> if (r < 0) {
>> retval = r;
>> kfree(buf);
>> goto fail;
>> }
>
> This means that you didn't test this change at all, so I don't really
> think it is needed :(
>
In fact, currently we have not added this retval assignment operation.
Due to the circumvention of buf access during patch testing.
This problem causes calltrace not to trigger.
Thanks.
Longfang.
> thanks,
>
> greg k-h
> .
>
Powered by blists - more mailing lists