Commit 5aea2ac3 authored by sunliming's avatar sunliming Committed by Greg Kroah-Hartman
Browse files

tracing/user_events: Fix incorrect return value for writing operation when events are disabled

commit f6d026ee upstream.

The writing operation return the count of writes regardless of whether events
are enabled or disabled. Switch it to return -EBADF to indicates that the event
is disabled.

Link: https://lkml.kernel.org/r/20230626111344.19136-2-sunliming@kylinos.cn



Cc: stable@vger.kernel.org
7f5a08c7 ("user_events: Add minimal support for trace_event into ftrace")
Acked-by: default avatarBeau Belgrave <beaub@linux.microsoft.com>
Signed-off-by: default avatarsunliming <sunliming@kylinos.cn>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a4336343
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment