]> git.baikalelectronics.ru Git - kernel.git/commit
neighbor: tracing: Have neigh_create event use __string()
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 5 Jul 2022 22:37:41 +0000 (18:37 -0400)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 15 Jul 2022 17:35:59 +0000 (13:35 -0400)
commite58998eb111dae631bd4da62b2eace8d72de1743
tree7c0946601b3986cc811211d4358ba46169d7c38a
parent75881d9e4ec81c42d4571b925926fdfd697b8689
neighbor: tracing: Have neigh_create event use __string()

The dev field of the neigh_create event uses __dynamic_array() with a
fixed size, which defeats the purpose of __dynamic_array(). Looking at the
logic, as it already uses __assign_str(), just use the same logic in
__string to create the size needed. It appears that because "dev" can be
NULL, it needs the check. But __string() can have the same checks as
__assign_str() so use them there too.

Link: https://lkml.kernel.org/r/20220705183741.35387e3f@rorschach.local.home
Cc: David Ahern <dsahern@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Acked-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
include/trace/events/neigh.h