mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: liulongfang <liulongfang@huawei.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] USB:bugfix a controller halt error
Date: Thu, 27 Jul 2023 12:02:42 +0800	[thread overview]
Message-ID: <e6c676d8-0175-e07f-3416-f3b88d0ea4e9@huawei.com> (raw)
In-Reply-To: <2023072629-unblended-perky-4732@gregkh>

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
> .
> 

  parent reply	other threads:[~2023-07-27  4:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21 10:00 liulongfang
2023-07-21 11:08 ` Greg KH
2023-07-26  6:44   ` liulongfang
2023-07-26  7:18     ` Greg KH
2023-07-26 11:16       ` Oliver Neukum
2023-07-27  7:00         ` liulongfang
2023-07-27  8:46           ` Oliver Neukum
2023-07-27  4:02       ` liulongfang [this message]
2023-07-21 14:57 ` Alan Stern
2023-07-24 12:35   ` Oliver Neukum
2023-07-26  6:58   ` liulongfang
2023-07-26 14:20     ` Alan Stern
2023-07-27  7:03       ` liulongfang
2023-07-27  8:47         ` Oliver Neukum
2023-07-27 14:42         ` Alan Stern
2023-07-27 15:31           ` Oliver Neukum
2023-07-27 15:57             ` Alan Stern
2023-08-10  1:20               ` liulongfang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e6c676d8-0175-e07f-3416-f3b88d0ea4e9@huawei.com \
    --to=liulongfang@huawei.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®