Re: [PATCH] backing_file: Fix error code swallow

From: Paul Moore

Date: Sun Mar 22 2026 - 20:53:30 EST


On Sun, Mar 22, 2026 at 7:27 PM Ethan Tidmore <ethantidmore06@xxxxxxxxx> wrote:
>
> The macro WARN_ON() returns true if the condition inside is true. So if
> there is an error with vfs_open() 1 is returned.
>
> Capture the return value of vfs_open() then run WARN_ON() on it.
>
> Detected by Smatch:
> fs/backing-file.c:52 backing_file_open() warn:
> passing positive error code '1' to 'ERR_PTR'
>
> fs/backing-file.c:77 backing_tmpfile_open() warn:
> passing positive error code '1' to 'ERR_PTR'
>
> Fixes: 7ea30795d6b7d ("backing_file: store user_path_file")
> Signed-off-by: Ethan Tidmore <ethantidmore06@xxxxxxxxx>
> ---
> fs/file_table.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)

Due to other discussions (see the related threads) I have removed the
patch{set} this targets from lsm/{stable-7.0,next}.

--
paul-moore.com