Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e2840ee authored by John Fastabend's avatar John Fastabend Committed by David S. Miller
Browse files

net: sched: cls_u32: rcu can not be last node



tc_u32_sel 'sel' in tc_u_knode expects to be the last element in the
structure and pads the structure with tc_u32_key fields for each key.

 kzalloc(sizeof(*n) + s->nkeys*sizeof(struct tc_u32_key), GFP_KERNEL)

CC: Eric Dumazet <edumazet@google.com>
Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ab34f648
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -64,8 +64,11 @@ struct tc_u_knode {
	u32 __percpu		*pcpu_success;
#endif
	struct tcf_proto	*tp;
	struct tc_u32_sel	sel;
	struct rcu_head		rcu;
	/* The 'sel' field MUST be the last field in structure to allow for
	 * tc_u32_keys allocated at end of structure.
	 */
	struct tc_u32_sel	sel;
};

struct tc_u_hnode {