This is a note to let you know that I've just added the patch titled tools/bootconfig: Fix error return code in apply_xbc() to the 5.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: tools-bootconfig-fix-error-return-code-in-apply_xbc.patch and it can be found in the queue-5.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From e8ba0b2b64126381643bb50df3556b139a60545a Mon Sep 17 00:00:00 2001 From: Zhen Lei <thunder.leizhen@xxxxxxxxxx> Date: Sat, 8 May 2021 11:42:16 +0800 Subject: tools/bootconfig: Fix error return code in apply_xbc() From: Zhen Lei <thunder.leizhen@xxxxxxxxxx> commit e8ba0b2b64126381643bb50df3556b139a60545a upstream. Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Link: https://lkml.kernel.org/r/20210508034216.2277-1-thunder.leizhen@xxxxxxxxxx Fixes: a995e6bc0524 ("tools/bootconfig: Fix to check the write failure correctly") Reported-by: Hulk Robot <hulkci@xxxxxxxxxx> Acked-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx> Signed-off-by: Zhen Lei <thunder.leizhen@xxxxxxxxxx> Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- tools/bootconfig/main.c | 1 + 1 file changed, 1 insertion(+) --- a/tools/bootconfig/main.c +++ b/tools/bootconfig/main.c @@ -399,6 +399,7 @@ static int apply_xbc(const char *path, c } /* TODO: Ensure the @path is initramfs/initrd image */ if (fstat(fd, &stat) < 0) { + ret = -errno; pr_err("Failed to get the size of %s\n", path); goto out; } Patches currently in stable-queue which might be from thunder.leizhen@xxxxxxxxxx are queue-5.12/tools-bootconfig-fix-error-return-code-in-apply_xbc.patch