• Luis R. Rodriguez's avatar
    firmware: fix __getname() missing failure check · f5727b05
    Luis R. Rodriguez authored
    The request_firmware*() APIs uses __getname() to iterate
    over the list of paths possible for firmware to be found,
    the code however never checked for failure on __getname().
    Although *very unlikely*, this can still happen. Add the
    missing check.
    
    There is still no checks on the concatenation of the path
    and filename passed, that requires a bit more work and
    subsequent patches address this. The commit that introduced
    this is abb139e7 ("firmware: teach the kernel to load
    firmware files directly from the filesystem").
    
    mcgrof@ergon ~/linux (git::firmware-fixes) $ git describe --contains abb139e7
    v3.7-rc1~120
    
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Ming Lei <ming.lei@canonical.com>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Cc: David Howells <dhowells@redhat.com>
    Cc: Kyle McMartin <kyle@kernel.org>
    Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    f5727b05
firmware_class.c 39.2 KB