From: Jakub Kicinski Date: Tue, 3 Mar 2020 05:05:16 +0000 (-0800) Subject: can: add missing attribute validation for termination X-Git-Tag: v4.19.111~62 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=89b4332a9f241cf4171f25586072440aaa415f02;p=platform%2Fkernel%2Flinux-rpi.git can: add missing attribute validation for termination [ Upstream commit ab02ad660586b94f5d08912a3952b939cf4c4430 ] Add missing attribute validation for IFLA_CAN_TERMINATION to the netlink policy. Fixes: 12a6075cabc0 ("can: dev: add CAN interface termination API") Signed-off-by: Jakub Kicinski Acked-by: Oliver Hartkopp Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c index 49b853f..1545f2b 100644 --- a/drivers/net/can/dev.c +++ b/drivers/net/can/dev.c @@ -892,6 +892,7 @@ static const struct nla_policy can_policy[IFLA_CAN_MAX + 1] = { = { .len = sizeof(struct can_bittiming) }, [IFLA_CAN_DATA_BITTIMING_CONST] = { .len = sizeof(struct can_bittiming_const) }, + [IFLA_CAN_TERMINATION] = { .type = NLA_U16 }, }; static int can_validate(struct nlattr *tb[], struct nlattr *data[],