tc_util: Fix no error return when large parent id used
Subsystems (2)
PATCH 1/1 tc_util: Fix no error return when large parent id used
This patch is to fix the issue where there is no error return when large value of parent ID is being used. The return value by stroul() is unsigned long int. Hence the datatype for maj and min should defined as unsigned long to avoid overflow issue.
--- tc/tc_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tc/tc_util.c +1 -1
@@ -93,7 +93,7 @@ ok:int get_tc_classid (__u32 *h,const char *str) { -__u32 maj, min; +unsigned long maj, min;char *p; maj =TC_H_ROOT ;
Signature · 1 line
1.9.1
Quoted 7 lines · On Thu, 17 Nov 2022 13:33:17 +0800 Lai Peter Jun Ann <[email protected]>…
This patch is to fix the issue where there is no error return when large value of parent ID is being used. The return value by
stroul()is unsigned long int. Hence the datatype for maj and min should defined as unsigned long to avoid overflow issue.Signed-off-by Muhammad Husaini Zulkifli <[email protected]>Signed-off-by Lai Peter Jun Ann <[email protected]>
Yes, looks good. Will apply to main.
What about qdisc_handle as well?
Hi,
Quoted 19 lines
-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: Friday, November 18, 2022 12:36 AM
To: Lai, Peter Jun Ann <[email protected]>
Cc: [email protected]; David Ahern <[email protected]>; Gomes, Vinicius <[email protected]>; Jamal Hadi Salim <[email protected]>; Cong Wang <[email protected]>; Jiri Pirko <[email protected]>; Zulkifli, Muhammad Husaini <[email protected]>
Subject: Re: [PATCH iproute2-next v1]tc_util: Fix no error return when large parent id usedQuoted 5 lines · On Thu, 17 Nov 2022 13:33:17 +0800 Lai Peter Jun Ann <[email protected]>…
This patch is to fix the issue where there is no error return when large value of parent ID is being used. The return value by
stroul()is unsigned long int. Hence the datatype for maj and min should defined as unsigned long to avoid overflow issue.
Quoted 6 lines
Quoted 3 lines
Signed-off-by: Muhammad Husaini Zulkifli
<[email protected]>Signed-off-by Lai Peter Jun Ann <[email protected]>Yes, looks good. Will apply to main.
What aboutqdisc_handleas well?
Thanks for prompt response.
I will submit another patch for qdisc_handle.
This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:
Hello:
This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:
Quoted 9 lines · On Thu, 17 Nov 2022 13:33:17 +0800 you wrote:
This patch is to fix the issue where there is no error return when large value of parent ID is being used. The return value by
stroul()is unsigned long int. Hence the datatype for maj and min should defined as unsigned long to avoid overflow issue.Signed-off-by Muhammad Husaini Zulkifli <[email protected]>Signed-off-by Lai Peter Jun Ann <[email protected]>[...]
Here is the summary with links:
- [iproute2-next,v1] tc_util: Fix no error return when large parent id used
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=e0ecee3a33af
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html