Skip to content
Snippets Groups Projects
user avatar
Linus Torvalds authored
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: default avatarJesse Barnes <jsbarnes@google.com>
Reported-by: default avataryouling 257 <youling257@gmail.com>
Fixes: 8243186f ("fs: remove ksys_dup()")
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
2d3145f8