* Re: 0001-usb-mtu3-fix-panic-in-mtu3_gadget_wakeup.patch
[not found] <SEZPR02MB54953820B2A9EEBD807D0ED18E512@SEZPR02MB5495.apcprd02.prod.outlook.com>
@ 2024-11-05 8:41 ` Greg Kroah-Hartman
2024-11-06 19:39 ` 回复: 0001-usb-mtu3-fix-panic-in-mtu3_gadget_wakeup.patch Haowei Cheng(Harvey)
0 siblings, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-05 8:41 UTC (permalink / raw)
To: Haowei Cheng(Harvey)
Cc: chunfeng.yun@mediatek.com, linux-usb@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
On Mon, Nov 04, 2024 at 05:54:43PM +0000, Haowei Cheng(Harvey) wrote:
>
For some reason you only attached a patch, please send it properly so we
can actually review and apply it if needed.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* 回复: 0001-usb-mtu3-fix-panic-in-mtu3_gadget_wakeup.patch
2024-11-05 8:41 ` 0001-usb-mtu3-fix-panic-in-mtu3_gadget_wakeup.patch Greg Kroah-Hartman
@ 2024-11-06 19:39 ` Haowei Cheng(Harvey)
2024-11-07 5:13 ` Greg Kroah-Hartman
2024-11-07 5:14 ` Greg Kroah-Hartman
0 siblings, 2 replies; 6+ messages in thread
From: Haowei Cheng(Harvey) @ 2024-11-06 19:39 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: chunfeng.yun@mediatek.com, linux-usb@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Hi greg k-h,
We found during development that when there are data packets to be sent on the USB RNDIS network card,
unplugging the USB cable will trigger a certain probability of system warning or panic.
We observed that the mtu3_gadget_wakeup function uses the usleep_range_state function,
which has certain scenario limitations. Therefore, we made this optimization.
The specific call trace information is as follows:
[ 594.638749] Call trace:
[ 594.639059] dump_backtrace+0x0/0x174
[ 594.639531] show_stack+0x18/0x24
[ 594.639953] dump_stack_lvl+0x64/0x80
[ 594.640420] dump_stack+0x18/0x34
[ 594.640842] __schedule_bug+0x50/0x6c
[ 594.641308] __schedule+0x94/0x468
[ 594.641741] schedule+0xa0/0xe8
[ 594.642140] schedule_hrtimeout_range_clock+0xa8/0xe0
[ 594.642780] schedule_hrtimeout_range+0x14/0x20
[ 594.643352] usleep_range_state+0x5c/0x90
[ 594.643859] mtu3_gadget_wakeup+0x90/0xd4
[ 594.644369] usb_gadget_wakeup+0x1c/0x30
[ 594.644868] 0xffffffc00150f110
[ 594.645315] 0xffffffc00151006c
[ 594.645723] netdev_start_xmit+0x40/0x6c
[ 594.646223] dev_hard_start_xmit+0x90/0xe4
[ 594.646743] sch_direct_xmit+0x100/0x270
[ 594.647242] __dev_queue_xmit+0x404/0x600
[ 594.647750] dev_queue_xmit+0x14/0x20
[ 594.648214] br_dev_queue_push_xmit+0x13c/0x1b4
[ 594.648788] NF_HOOK.constprop.0+0x5c/0xd4
[ 594.649307] br_forward_finish+0x34/0x40
[ 594.649804] NF_HOOK.constprop.0+0x5c/0xd4
[ 594.650323] __br_forward+0xcc/0xe0
[ 594.650766] br_forward+0x80/0x98
[ 594.651187] br_dev_xmit+0x354/0x380
[ 594.651639] netdev_start_xmit+0x40/0x6c
[ 594.652137] dev_hard_start_xmit+0x90/0xe4
[ 594.652656] __dev_queue_xmit+0x52c/0x600
[ 594.653164] dev_queue_xmit+0x14/0x20
[ 594.653628] neigh_resolve_output+0xf4/0x12c
[ 594.654170] __neigh_update+0x514/0x650
[ 594.654656] neigh_update+0x14/0x20
[ 594.655098] arp_ioctl+0x410/0x58c
[ 594.655531] inet_ioctl+0x11c/0x1b4
[ 594.655974] sock_do_ioctl+0x48/0xf8
[ 594.656429] sock_ioctl+0x150/0x338
[ 594.656871] vfs_ioctl+0x28/0x48
[ 594.657283] __arm64_sys_ioctl+0x78/0xac
[ 594.657781] invoke_syscall+0x6c/0xf8
[ 594.658247] el0_svc_common.constprop.0+0x78/0xe4
[ 594.658842] do_el0_svc+0x64/0x70
[ 594.659263] el0_svc+0x18/0x44
[ 594.659652] el0t_64_sync_handler+0xb4/0x134
[ 594.660193] el0t_64_sync+0x184/0x188
[ 594.662319] ------------[ cut here ]------------
[ 594.662322] WARNING: CPU: 2 PID: 14162 at kernel/softirq.c:362 __local_bh_enable_ip+0x1c/0x80
________________________________________
发件人: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
发送时间: 2024年11月5日 16:41
收件人: Haowei Cheng(Harvey)
抄送: chunfeng.yun@mediatek.com; linux-usb@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-mediatek@lists.infradead.org; linux-kernel@vger.kernel.org
主题: Re: 0001-usb-mtu3-fix-panic-in-mtu3_gadget_wakeup.patch
On Mon, Nov 04, 2024 at 05:54:43PM +0000, Haowei Cheng(Harvey) wrote:
>
For some reason you only attached a patch, please send it properly so we
can actually review and apply it if needed.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 回复: 0001-usb-mtu3-fix-panic-in-mtu3_gadget_wakeup.patch
2024-11-06 19:39 ` 回复: 0001-usb-mtu3-fix-panic-in-mtu3_gadget_wakeup.patch Haowei Cheng(Harvey)
@ 2024-11-07 5:13 ` Greg Kroah-Hartman
2024-11-07 5:14 ` Greg Kroah-Hartman
1 sibling, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-07 5:13 UTC (permalink / raw)
To: Haowei Cheng(Harvey)
Cc: chunfeng.yun@mediatek.com, linux-usb@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
On Wed, Nov 06, 2024 at 07:39:59PM +0000, Haowei Cheng(Harvey) wrote:
> Hi greg k-h,
>
> We found during development that when there are data packets to be sent on the USB RNDIS network card,
> unplugging the USB cable will trigger a certain probability of system warning or panic.
> We observed that the mtu3_gadget_wakeup function uses the usleep_range_state function,
> which has certain scenario limitations. Therefore, we made this optimization.
Please do not top-post :(
Just resend your patch properly, in a format that we can apply it in,
and we will be glad to review and discuss it that way.
Look for thousands of examples on the lists for how to do this, as well
as the documentation in the kernel tree itself which explains this in
way-too-much detail.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 回复: 0001-usb-mtu3-fix-panic-in-mtu3_gadget_wakeup.patch
2024-11-06 19:39 ` 回复: 0001-usb-mtu3-fix-panic-in-mtu3_gadget_wakeup.patch Haowei Cheng(Harvey)
2024-11-07 5:13 ` Greg Kroah-Hartman
@ 2024-11-07 5:14 ` Greg Kroah-Hartman
2024-11-07 7:47 ` 回复: " Haowei Cheng(Harvey)
1 sibling, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-07 5:14 UTC (permalink / raw)
To: Haowei Cheng(Harvey)
Cc: chunfeng.yun@mediatek.com, linux-usb@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
On Wed, Nov 06, 2024 at 07:39:59PM +0000, Haowei Cheng(Harvey) wrote:
> Hi greg k-h,
>
> We found during development that when there are data packets to be sent on the USB RNDIS network card,
Also, wait, why in the world are you using RNDIS when it is documented
to be an insecure and broken protocol? Do you really trust both sides
of that connection? If so, that's fine, but if not, please do not use
that protocol at all.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* 回复: 回复: 0001-usb-mtu3-fix-panic-in-mtu3_gadget_wakeup.patch
2024-11-07 5:14 ` Greg Kroah-Hartman
@ 2024-11-07 7:47 ` Haowei Cheng(Harvey)
2024-11-07 8:14 ` Greg Kroah-Hartman
0 siblings, 1 reply; 6+ messages in thread
From: Haowei Cheng(Harvey) @ 2024-11-07 7:47 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: chunfeng.yun@mediatek.com, linux-usb@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Hi greg k-h,
We have configured the USB RNDIS port protocol by default on the product and conducted extensive stress testing and validation.
This issue was discovered during compatibility verification, and after making clear modifications to the API usage,
the issue has not been reproduced in subsequent tests.
________________________________________
发件人: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
发送时间: 2024年11月7日 13:14
收件人: Haowei Cheng(Harvey)
抄送: chunfeng.yun@mediatek.com; linux-usb@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-mediatek@lists.infradead.org; linux-kernel@vger.kernel.org
主题: Re: 回复: 0001-usb-mtu3-fix-panic-in-mtu3_gadget_wakeup.patch
On Wed, Nov 06, 2024 at 07:39:59PM +0000, Haowei Cheng(Harvey) wrote:
> Hi greg k-h,
>
> We found during development that when there are data packets to be sent on the USB RNDIS network card,
Also, wait, why in the world are you using RNDIS when it is documented
to be an insecure and broken protocol? Do you really trust both sides
of that connection? If so, that's fine, but if not, please do not use
that protocol at all.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 回复: 回复: 0001-usb-mtu3-fix-panic-in-mtu3_gadget_wakeup.patch
2024-11-07 7:47 ` 回复: " Haowei Cheng(Harvey)
@ 2024-11-07 8:14 ` Greg Kroah-Hartman
0 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-07 8:14 UTC (permalink / raw)
To: Haowei Cheng(Harvey)
Cc: chunfeng.yun@mediatek.com, linux-usb@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
A: http://en.wikipedia.org/wiki/Top_post
Q: Were do I find info about this thing called top-posting?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
A: No.
Q: Should I include quotations after my reply?
http://daringfireball.net/2007/07/on_top
On Thu, Nov 07, 2024 at 07:47:14AM +0000, Haowei Cheng(Harvey) wrote:
> Hi greg k-h,
> We have configured the USB RNDIS port protocol by default on the product and conducted extensive stress testing and validation.
Where are the RNDIS stress testing and validation tests? What host did
you use for this testing, Linux or Windows?
> This issue was discovered during compatibility verification, and after making clear modifications to the API usage,
> the issue has not been reproduced in subsequent tests.
I do not understand what you mean by this, sorry.
Again, you need to submit this patch properly if you wish to have it
applied...
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-11-07 8:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <SEZPR02MB54953820B2A9EEBD807D0ED18E512@SEZPR02MB5495.apcprd02.prod.outlook.com>
2024-11-05 8:41 ` 0001-usb-mtu3-fix-panic-in-mtu3_gadget_wakeup.patch Greg Kroah-Hartman
2024-11-06 19:39 ` 回复: 0001-usb-mtu3-fix-panic-in-mtu3_gadget_wakeup.patch Haowei Cheng(Harvey)
2024-11-07 5:13 ` Greg Kroah-Hartman
2024-11-07 5:14 ` Greg Kroah-Hartman
2024-11-07 7:47 ` 回复: " Haowei Cheng(Harvey)
2024-11-07 8:14 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).