[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1530120815-13736-7-git-send-email-mrv@mojatatu.com>
Date: Wed, 27 Jun 2018 13:33:35 -0400
From: Roman Mashak <mrv@...atatu.com>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, kernel@...atatu.com, jhs@...atatu.com,
xiyou.wangcong@...il.com, jiri@...nulli.us,
Roman Mashak <mrv@...atatu.com>
Subject: [PATCH v2 net-next 6/6] net sched actions: avoid bitwise operation on signed value in pedit
Since char can be unsigned or signed, and bitwise operators may have
implementation-dependent results when performed on signed operands,
declare 'u8 *' operand instead.
Suggested-by: Davide Caratti <dcaratti@...hat.com>
Signed-off-by: Roman Mashak <mrv@...atatu.com>
---
net/sched/act_pedit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c
index caa6927a992c..ab151346d3d4 100644
--- a/net/sched/act_pedit.c
+++ b/net/sched/act_pedit.c
@@ -311,7 +311,7 @@ static int tcf_pedit(struct sk_buff *skb, const struct tc_action *a,
}
if (tkey->offmask) {
- char *d, _d;
+ u8 *d, _d;
if (!offset_valid(skb, hoffset + tkey->at)) {
pr_info("tc action pedit 'at' offset %d out of bounds\n",
--
2.7.4
Powered by blists - more mailing lists