early init: fix error handling when opening /dev/console
The comment says "this should never fail", but it definitely can fail when you have odd initial boot filesystems, or kernel configurations. So get the error handling right: filp_open() returns an error pointer. Reported-by: NJesse Barnes <jsbarnes@google.com> Reported-by: Nyouling 257 <youling257@gmail.com> Fixes: 8243186f ("fs: remove ksys_dup()") Cc: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
Showing
想要评论请 注册 或 登录