diff options
author | Kuniyuki Iwashima <[email protected]> | 2024-10-24 13:14:58 -0700 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2024-10-29 16:31:23 -0700 |
commit | 4bbd360a5084d8f890f814327e1d9fbb1f0f6fa1 (patch) | |
tree | 60665c3a8969efc0da533d85c37ab3a504032166 /tools/perf/scripts/python/stat-cpi.py | |
parent | f75d1fbe7809bc5ed134204b920fd9e2fc5db1df (diff) |
socket: Print pf->create() when it does not clear sock->sk on failure.
I suggested to put DEBUG_NET_WARN_ON_ONCE() in __sock_create() to
catch possible use-after-free.
But the warning itself was not useful because our interest is in
the callee than the caller.
Let's define DEBUG_NET_WARN_ONCE() and print the name of pf->create()
and the socket identifier.
While at it, we enclose DEBUG_NET_WARN_ON_ONCE() in parentheses too
to avoid a checkpatch error.
Note that %pf or %pF were obsoleted and will be removed later as per
comment in lib/vsprintf.c.
Link: https://lore.kernel.org/netdev/[email protected]/
Signed-off-by: Kuniyuki Iwashima <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stat-cpi.py')
0 files changed, 0 insertions, 0 deletions