From: Roman Mashak Date: Wed, 27 Jun 2018 17:33:35 +0000 (-0400) Subject: net sched actions: avoid bitwise operation on signed value in pedit X-Git-Tag: v4.19~410^2~524^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=430527415398cf7e741f5e2f11324a8df9093327;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Roman Mashak Signed-off-by: David S. Miller --- 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",