diff options
| author | Marc Dionne <[email protected]> | 2025-03-25 12:59:05 +0000 |
|---|---|---|
| committer | Christian Brauner <[email protected]> | 2025-03-25 13:59:14 +0000 |
| commit | 406fad7698f5bf21ab6b5ca195bf4b9e0b3990ed (patch) | |
| tree | 26b2514128c3d05d4f3eb3adc9b72f5d5cc09ac1 /lib/netdev-notifier-error-inject.c | |
| parent | exec: fix the racy usage of fs_struct->in_exec (diff) | |
| download | kernel-406fad7698f5bf21ab6b5ca195bf4b9e0b3990ed.tar.gz kernel-406fad7698f5bf21ab6b5ca195bf4b9e0b3990ed.zip | |
cachefiles: Fix oops in vfs_mkdir from cachefiles_get_directory
Commit c54b386969a5 ("VFS: Change vfs_mkdir() to return the dentry.")
changed cachefiles_get_directory, replacing "subdir" with a ERR_PTR
from the result of cachefiles_inject_write_error, which is either 0
or some error code. This causes an oops when the resulting pointer
is passed to vfs_mkdir.
Use a similar pattern to what is used earlier in the function; replace
subdir with either the return value from vfs_mkdir, or the ERR_PTR
of the cachefiles_inject_write_error() return value, but only if it
is non zero.
Fixes: c54b386969a5 ("VFS: Change vfs_mkdir() to return the dentry.")
cc: [email protected]
Signed-off-by: Marc Dionne <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'lib/netdev-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions
