* [PATCH v2] USB: core: remove dead code in do_proc_bulk()
@ 2024-11-09 2:11 Rex Nie
2024-11-09 6:59 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Rex Nie @ 2024-11-09 2:11 UTC (permalink / raw)
To: gregkh; +Cc: linux-usb, linux-kernel, angus.chen, stable, Rex Nie
Since len1 is unsigned int, len1 < 0 always false. Remove it keep code
simple.
Cc: stable@vger.kernel.org
Fixes: ae8709b296d8 ("USB: core: Make do_proc_control() and do_proc_bulk() killable")
Signed-off-by: Rex Nie <rex.nie@jaguarmicro.com>
---
changes in v2:
- Add "Cc: stable@vger.kernel.org" (kernel test robot)
- Add Fixes tag
- Link to v1: https://lore.kernel.org/stable/20241108094255.2133-1-rex.nie@jaguarmicro.com/
---
drivers/usb/core/devio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 3beb6a862e80..712e290bab04 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1295,7 +1295,7 @@ static int do_proc_bulk(struct usb_dev_state *ps,
return ret;
len1 = bulk->len;
- if (len1 < 0 || len1 >= (INT_MAX - sizeof(struct urb)))
+ if (len1 >= (INT_MAX - sizeof(struct urb)))
return -EINVAL;
if (bulk->ep & USB_DIR_IN)
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] USB: core: remove dead code in do_proc_bulk()
2024-11-09 2:11 [PATCH v2] USB: core: remove dead code in do_proc_bulk() Rex Nie
@ 2024-11-09 6:59 ` Greg KH
2024-11-09 11:38 ` 答复: " Rex Nie
0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2024-11-09 6:59 UTC (permalink / raw)
To: Rex Nie; +Cc: linux-usb, linux-kernel, angus.chen, stable
On Sat, Nov 09, 2024 at 10:11:41AM +0800, Rex Nie wrote:
> Since len1 is unsigned int, len1 < 0 always false. Remove it keep code
> simple.
>
> Cc: stable@vger.kernel.org
> Fixes: ae8709b296d8 ("USB: core: Make do_proc_control() and do_proc_bulk() killable")
> Signed-off-by: Rex Nie <rex.nie@jaguarmicro.com>
> ---
> changes in v2:
> - Add "Cc: stable@vger.kernel.org" (kernel test robot)
Why is this relevant for the stable kernels? What bug is being fixed
that users would hit that this is needed to resolve?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* 答复: [PATCH v2] USB: core: remove dead code in do_proc_bulk()
2024-11-09 6:59 ` Greg KH
@ 2024-11-09 11:38 ` Rex Nie
2024-11-09 11:47 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Rex Nie @ 2024-11-09 11:38 UTC (permalink / raw)
To: Greg KH
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Angus Chen, stable@vger.kernel.org
> -----邮件原件-----
> 发件人: Greg KH <gregkh@linuxfoundation.org>
> 发送时间: 2024年11月9日 14:59
> 收件人: Rex Nie <rex.nie@jaguarmicro.com>
> 抄送: linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org; Angus Chen
> <angus.chen@jaguarmicro.com>; stable@vger.kernel.org
> 主题: Re: [PATCH v2] USB: core: remove dead code in do_proc_bulk()
>
> External Mail: This email originated from OUTSIDE of the organization!
> Do not click links, open attachments or provide ANY information unless you
> recognize the sender and know the content is safe.
>
>
> On Sat, Nov 09, 2024 at 10:11:41AM +0800, Rex Nie wrote:
> > Since len1 is unsigned int, len1 < 0 always false. Remove it keep code
> > simple.
> >
> > Cc: stable@vger.kernel.org
> > Fixes: ae8709b296d8 ("USB: core: Make do_proc_control() and
> > do_proc_bulk() killable")
> > Signed-off-by: Rex Nie <rex.nie@jaguarmicro.com>
> > ---
> > changes in v2:
> > - Add "Cc: stable@vger.kernel.org" (kernel test robot)
>
> Why is this relevant for the stable kernels? What bug is being fixed that
> users would hit that this is needed to resolve?
HI Greg k-h, I got a email from lkp@intel.com let me add Cc tag yesterday, so I apply v2 patch.
Although this shouldn't bother users, the expression len1 < 0 in the if condition doesn't make sense,
and removing it makes the code more simple and efficient. The original email from kernel robot test
shows as follows. I think it no need a cc tag either.
Thanks
Rex
---
Hi,
Thanks for your patch.
FYI: kernel test robot notices the stable kernel rule is not satisfied.
The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-1
Rule: add the tag "Cc: stable@vger.kernel.org" in the sign-off area to have the patch automatically included in the stable tree.
Subject: [PATCH] USB: core: remove dead code in do_proc_bulk()
Link: https://lore.kernel.org/stable/20241108094255.2133-1-rex.nie%40jaguarmicro.com
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
---
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 答复: [PATCH v2] USB: core: remove dead code in do_proc_bulk()
2024-11-09 11:38 ` 答复: " Rex Nie
@ 2024-11-09 11:47 ` Greg KH
2024-11-11 8:01 ` 答复: " Rex Nie
0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2024-11-09 11:47 UTC (permalink / raw)
To: Rex Nie
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Angus Chen, stable@vger.kernel.org
On Sat, Nov 09, 2024 at 11:38:43AM +0000, Rex Nie wrote:
>
>
> > -----邮件原件-----
> > 发件人: Greg KH <gregkh@linuxfoundation.org>
> > 发送时间: 2024年11月9日 14:59
> > 收件人: Rex Nie <rex.nie@jaguarmicro.com>
> > 抄送: linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org; Angus Chen
> > <angus.chen@jaguarmicro.com>; stable@vger.kernel.org
> > 主题: Re: [PATCH v2] USB: core: remove dead code in do_proc_bulk()
> >
> > External Mail: This email originated from OUTSIDE of the organization!
> > Do not click links, open attachments or provide ANY information unless you
> > recognize the sender and know the content is safe.
> >
> >
> > On Sat, Nov 09, 2024 at 10:11:41AM +0800, Rex Nie wrote:
> > > Since len1 is unsigned int, len1 < 0 always false. Remove it keep code
> > > simple.
> > >
> > > Cc: stable@vger.kernel.org
> > > Fixes: ae8709b296d8 ("USB: core: Make do_proc_control() and
> > > do_proc_bulk() killable")
> > > Signed-off-by: Rex Nie <rex.nie@jaguarmicro.com>
> > > ---
> > > changes in v2:
> > > - Add "Cc: stable@vger.kernel.org" (kernel test robot)
> >
> > Why is this relevant for the stable kernels? What bug is being fixed that
> > users would hit that this is needed to resolve?
> HI Greg k-h, I got a email from lkp@intel.com let me add Cc tag yesterday, so I apply v2 patch.
That was because you cc: stable and yet did not tag it as such. That's
not passing a judgement call on if it should have been done at all,
which is what I am asking here.
> Although this shouldn't bother users, the expression len1 < 0 in the if condition doesn't make sense,
> and removing it makes the code more simple and efficient. The original email from kernel robot test
> shows as follows. I think it no need a cc tag either.
Does this follow the patches as per the documentation for what should be
accepted for stable kernels?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* 答复: 答复: [PATCH v2] USB: core: remove dead code in do_proc_bulk()
2024-11-09 11:47 ` Greg KH
@ 2024-11-11 8:01 ` Rex Nie
2024-11-12 11:11 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Rex Nie @ 2024-11-11 8:01 UTC (permalink / raw)
To: Greg KH
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Angus Chen, stable@vger.kernel.org
> -----邮件原件-----
> 发件人: Greg KH <gregkh@linuxfoundation.org>
> 发送时间: 2024年11月9日 19:47
> 收件人: Rex Nie <rex.nie@jaguarmicro.com>
> 抄送: linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org; Angus Chen
> <angus.chen@jaguarmicro.com>; stable@vger.kernel.org
> 主题: Re: 答复: [PATCH v2] USB: core: remove dead code in do_proc_bulk()
>
> External Mail: This email originated from OUTSIDE of the organization!
> Do not click links, open attachments or provide ANY information unless you
> recognize the sender and know the content is safe.
>
>
> On Sat, Nov 09, 2024 at 11:38:43AM +0000, Rex Nie wrote:
> >
> >
> > > -----邮件原件-----
> > > 发件人: Greg KH <gregkh@linuxfoundation.org>
> > > 发送时间: 2024年11月9日 14:59
> > > 收件人: Rex Nie <rex.nie@jaguarmicro.com>
> > > 抄送: linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org; Angus
> > > Chen <angus.chen@jaguarmicro.com>; stable@vger.kernel.org
> > > 主题: Re: [PATCH v2] USB: core: remove dead code in do_proc_bulk()
> > >
> > > External Mail: This email originated from OUTSIDE of the organization!
> > > Do not click links, open attachments or provide ANY information
> > > unless you recognize the sender and know the content is safe.
> > >
> > >
> > > On Sat, Nov 09, 2024 at 10:11:41AM +0800, Rex Nie wrote:
> > > > Since len1 is unsigned int, len1 < 0 always false. Remove it keep
> > > > code simple.
> > > >
> > > > Cc: stable@vger.kernel.org
> > > > Fixes: ae8709b296d8 ("USB: core: Make do_proc_control() and
> > > > do_proc_bulk() killable")
> > > > Signed-off-by: Rex Nie <rex.nie@jaguarmicro.com>
> > > > ---
> > > > changes in v2:
> > > > - Add "Cc: stable@vger.kernel.org" (kernel test robot)
> > >
> > > Why is this relevant for the stable kernels? What bug is being
> > > fixed that users would hit that this is needed to resolve?
> > HI Greg k-h, I got a email from lkp@intel.com let me add Cc tag yesterday,
> so I apply v2 patch.
>
> That was because you cc: stable and yet did not tag it as such. That's not
> passing a judgement call on if it should have been done at all, which is what I
> am asking here.
>
Thanks for detailed explanation.
> > Although this shouldn't bother users, the expression len1 < 0 in the
> > if condition doesn't make sense, and removing it makes the code more
> > simple and efficient. The original email from kernel robot test shows as
> follows. I think it no need a cc tag either.
>
> Does this follow the patches as per the documentation for what should be
> accepted for stable kernels?
>
I check Documentation/process/stable-kernel-rules.rst again, it don't follow rules for stable kernels.
I think this patch can be picked up by mainline kernel tree.
BRs
Thanks
Rex
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 答复: 答复: [PATCH v2] USB: core: remove dead code in do_proc_bulk()
2024-11-11 8:01 ` 答复: " Rex Nie
@ 2024-11-12 11:11 ` Greg KH
0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2024-11-12 11:11 UTC (permalink / raw)
To: Rex Nie
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Angus Chen, stable@vger.kernel.org
On Mon, Nov 11, 2024 at 08:01:59AM +0000, Rex Nie wrote:
>
>
> > -----邮件原件-----
> > 发件人: Greg KH <gregkh@linuxfoundation.org>
> > 发送时间: 2024年11月9日 19:47
> > 收件人: Rex Nie <rex.nie@jaguarmicro.com>
> > 抄送: linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org; Angus Chen
> > <angus.chen@jaguarmicro.com>; stable@vger.kernel.org
> > 主题: Re: 答复: [PATCH v2] USB: core: remove dead code in do_proc_bulk()
> >
> > External Mail: This email originated from OUTSIDE of the organization!
> > Do not click links, open attachments or provide ANY information unless you
> > recognize the sender and know the content is safe.
> >
> >
> > On Sat, Nov 09, 2024 at 11:38:43AM +0000, Rex Nie wrote:
> > >
> > >
> > > > -----邮件原件-----
> > > > 发件人: Greg KH <gregkh@linuxfoundation.org>
> > > > 发送时间: 2024年11月9日 14:59
> > > > 收件人: Rex Nie <rex.nie@jaguarmicro.com>
> > > > 抄送: linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org; Angus
> > > > Chen <angus.chen@jaguarmicro.com>; stable@vger.kernel.org
> > > > 主题: Re: [PATCH v2] USB: core: remove dead code in do_proc_bulk()
> > > >
> > > > External Mail: This email originated from OUTSIDE of the organization!
> > > > Do not click links, open attachments or provide ANY information
> > > > unless you recognize the sender and know the content is safe.
> > > >
> > > >
> > > > On Sat, Nov 09, 2024 at 10:11:41AM +0800, Rex Nie wrote:
> > > > > Since len1 is unsigned int, len1 < 0 always false. Remove it keep
> > > > > code simple.
> > > > >
> > > > > Cc: stable@vger.kernel.org
> > > > > Fixes: ae8709b296d8 ("USB: core: Make do_proc_control() and
> > > > > do_proc_bulk() killable")
> > > > > Signed-off-by: Rex Nie <rex.nie@jaguarmicro.com>
> > > > > ---
> > > > > changes in v2:
> > > > > - Add "Cc: stable@vger.kernel.org" (kernel test robot)
> > > >
> > > > Why is this relevant for the stable kernels? What bug is being
> > > > fixed that users would hit that this is needed to resolve?
> > > HI Greg k-h, I got a email from lkp@intel.com let me add Cc tag yesterday,
> > so I apply v2 patch.
> >
> > That was because you cc: stable and yet did not tag it as such. That's not
> > passing a judgement call on if it should have been done at all, which is what I
> > am asking here.
> >
> Thanks for detailed explanation.
> > > Although this shouldn't bother users, the expression len1 < 0 in the
> > > if condition doesn't make sense, and removing it makes the code more
> > > simple and efficient. The original email from kernel robot test shows as
> > follows. I think it no need a cc tag either.
> >
> > Does this follow the patches as per the documentation for what should be
> > accepted for stable kernels?
> >
> I check Documentation/process/stable-kernel-rules.rst again, it don't follow rules for stable kernels.
> I think this patch can be picked up by mainline kernel tree.
Great, please resend this with that properly removed.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-11-12 11:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-09 2:11 [PATCH v2] USB: core: remove dead code in do_proc_bulk() Rex Nie
2024-11-09 6:59 ` Greg KH
2024-11-09 11:38 ` 答复: " Rex Nie
2024-11-09 11:47 ` Greg KH
2024-11-11 8:01 ` 答复: " Rex Nie
2024-11-12 11:11 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox