diff options
author | Mathias Krause <[email protected]> | 2024-07-23 14:25:21 +0200 |
---|---|---|
committer | Steven Rostedt (Google) <[email protected]> | 2024-08-07 19:28:31 -0400 |
commit | 12c20c65d0460cf34f9a665d8f0c0d77d45a3829 (patch) | |
tree | e59a59491639fd4ee9b527895999898bf6b96c24 /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | 0df2ac59bebfac221463ef57ed3554899b41d75f (diff) |
eventfs: Don't return NULL in eventfs_create_dir()
Commit 77a06c33a22d ("eventfs: Test for ei->is_freed when accessing
ei->dentry") added another check, testing if the parent was freed after
we released the mutex. If so, the function returns NULL. However, all
callers expect it to either return a valid pointer or an error pointer,
at least since commit 5264a2f4bb3b ("tracing: Fix a NULL vs IS_ERR() bug
in event_subsystem_dir()"). Returning NULL will therefore fail the error
condition check in the caller.
Fix this by substituting the NULL return value with a fitting error
pointer.
Cc: Masami Hiramatsu <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: [email protected]
Fixes: 77a06c33a22d ("eventfs: Test for ei->is_freed when accessing ei->dentry")
Link: https://lore.kernel.org/[email protected]
Reviewed-by: Dan Carpenter <[email protected]>
Reviewed-by: Ajay Kaher <[email protected]>
Signed-off-by: Mathias Krause <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions