linux-stable/include
Steven Rostedt (Google) 44faf8a482 tracing/net_sched: Fix tracepoints that save qdisc_dev() as a string
[ Upstream commit 51270d573a ]

I'm updating __assign_str() and will be removing the second parameter. To
make sure that it does not break anything, I make sure that it matches the
__string() field, as that is where the string is actually going to be
saved in. To make sure there's nothing that breaks, I added a WARN_ON() to
make sure that what was used in __string() is the same that is used in
__assign_str().

In doing this change, an error was triggered as __assign_str() now expects
the string passed in to be a char * value. I instead had the following
warning:

include/trace/events/qdisc.h: In function ‘trace_event_raw_event_qdisc_reset’:
include/trace/events/qdisc.h:91:35: error: passing argument 1 of 'strcmp' from incompatible pointer type [-Werror=incompatible-pointer-types]
   91 |                 __assign_str(dev, qdisc_dev(q));

That's because the qdisc_enqueue() and qdisc_reset() pass in qdisc_dev(q)
to __assign_str() and to __string(). But that function returns a pointer
to struct net_device and not a string.

It appears that these events are just saving the pointer as a string and
then reading it as a string as well.

Use qdisc_dev(q)->name to save the device instead.

Fixes: a34dac0b90 ("net_sched: add tracepoints for qdisc_reset() and qdisc_destroy()")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:14 -04:00
..
acpi
asm-generic linux/init: remove __memexit* annotations 2024-02-23 09:12:38 +01:00
clocksource
crypto crypto: af_alg - Disallow multiple in-flight AIO requests 2024-01-25 15:27:21 -08:00
drm drm: using mul_u32_u32() requires linux/math64.h 2024-02-05 20:13:00 +00:00
dt-bindings dt-bindings: clock: Update the videocc resets for sm8150 2024-01-25 15:27:36 -08:00
keys
kunit
kvm
linux ceph: switch to corrected encoding of max_xattr_size in mdsmap 2024-03-15 10:48:13 -04:00
math-emu
media
memory
misc
net bpf: Derive source IP addr via bpf_*_fib_lookup() 2024-03-06 14:45:20 +00:00
pcmcia
ras
rdma
rv
scsi scsi: sd: usb_storage: uas: Access media prior to querying device properties 2024-03-06 14:45:04 +00:00
soc
sound
target
trace tracing/net_sched: Fix tracepoints that save qdisc_dev() as a string 2024-03-15 10:48:14 -04:00
uapi bpf: Derive source IP addr via bpf_*_fib_lookup() 2024-03-06 14:45:20 +00:00
ufs
vdso
video
xen