* [PATCH iproute2-next v1] tc_util: Change datatype for maj to avoid overflow issue
@ 2022-11-21 2:29 Lai Peter Jun Ann
2022-11-23 15:54 ` Simon Horman
2022-11-23 17:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Lai Peter Jun Ann @ 2022-11-21 2:29 UTC (permalink / raw)
To: netdev
Cc: David Ahern, Stephen Hemminger, Vinicius Costa Gomes,
Jamal Hadi Salim, Cong Wang, Jiri Pirko,
Muhammad Husaini Zulkifli, Lai Peter Jun Ann
The return value by stroul() is unsigned long int. Hence the datatype
for maj should defined as unsigned long to avoid overflow issue.
Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
Signed-off-by: Lai Peter Jun Ann <jun.ann.lai@intel.com>
---
tc/tc_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tc/tc_util.c b/tc/tc_util.c
index 44137ad..f8d9c88 100644
--- a/tc/tc_util.c
+++ b/tc/tc_util.c
@@ -74,7 +74,7 @@ const char *get_tc_lib(void)
int get_qdisc_handle(__u32 *h, const char *str)
{
- __u32 maj;
+ unsigned long maj;
char *p;
maj = TC_H_UNSPEC;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH iproute2-next v1] tc_util: Change datatype for maj to avoid overflow issue
2022-11-21 2:29 [PATCH iproute2-next v1] tc_util: Change datatype for maj to avoid overflow issue Lai Peter Jun Ann
@ 2022-11-23 15:54 ` Simon Horman
2022-11-23 17:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2022-11-23 15:54 UTC (permalink / raw)
To: Lai Peter Jun Ann
Cc: netdev, David Ahern, Stephen Hemminger, Vinicius Costa Gomes,
Jamal Hadi Salim, Cong Wang, Jiri Pirko,
Muhammad Husaini Zulkifli
On Mon, Nov 21, 2022 at 10:29:09AM +0800, Lai Peter Jun Ann wrote:
> [You don't often get email from jun.ann.lai@intel.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> The return value by stroul() is unsigned long int. Hence the datatype
> for maj should defined as unsigned long to avoid overflow issue.
>
> Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
> Signed-off-by: Lai Peter Jun Ann <jun.ann.lai@intel.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH iproute2-next v1] tc_util: Change datatype for maj to avoid overflow issue
2022-11-21 2:29 [PATCH iproute2-next v1] tc_util: Change datatype for maj to avoid overflow issue Lai Peter Jun Ann
2022-11-23 15:54 ` Simon Horman
@ 2022-11-23 17:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-11-23 17:00 UTC (permalink / raw)
To: Lai Peter Jun Ann
Cc: netdev, dsahern, stephen, vinicius.gomes, jhs, xiyou.wangcong,
jiri, muhammad.husaini.zulkifli
Hello:
This patch was applied to iproute2/iproute2.git (main)
by Stephen Hemminger <stephen@networkplumber.org>:
On Mon, 21 Nov 2022 10:29:09 +0800 you wrote:
> The return value by stroul() is unsigned long int. Hence the datatype
> for maj should defined as unsigned long to avoid overflow issue.
>
> Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
> Signed-off-by: Lai Peter Jun Ann <jun.ann.lai@intel.com>
> ---
> tc/tc_util.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [iproute2-next,v1] tc_util: Change datatype for maj to avoid overflow issue
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=455fa8295298
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-23 17:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-21 2:29 [PATCH iproute2-next v1] tc_util: Change datatype for maj to avoid overflow issue Lai Peter Jun Ann
2022-11-23 15:54 ` Simon Horman
2022-11-23 17:00 ` patchwork-bot+netdevbpf
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).