net/sched: act_pedit: Use kmemdup() to replace kmalloc + memcpy
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Fri, 9 Jun 2023 07:01:17 +0000 (15:01 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Jun 2023 08:31:09 +0000 (09:31 +0100)
commit26e35370b9766914364409626035fda2c63fef05
tree90521d0cc012a41cf762131b838aa29763a451aa
parent132b4ebfa090492663f84144a1e7afaca54cd58a
net/sched: act_pedit: Use kmemdup() to replace kmalloc + memcpy

./net/sched/act_pedit.c:245:21-28: WARNING opportunity for kmemdup.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5478
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: Pedro Tammela <pctammela@mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_pedit.c