firmware: ensure the firmware cache is not used on incompatible calls
authorLuis R. Rodriguez <mcgrof@kernel.org>
Sat, 10 Mar 2018 14:14:59 +0000 (06:14 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Mar 2018 08:28:47 +0000 (09:28 +0100)
commit995e8695f65db7a8b465b5c27887b32e8e5bb66e
tree14765863ac5c5cf5a646f7f8dc807c4de9d147a2
parent9952db75e0659d9db62d76d9a351fdae06898642
firmware: ensure the firmware cache is not used on incompatible calls

request_firmware_into_buf() explicitly disables the firmware cache,
meanwhile the firmware cache cannot be used when request_firmware_nowait()
is used without the uevent. Enforce a sanity check for this to avoid future
issues undocumented behaviours should misuses of the firmware cache
happen later.

One of the reasons we want to enforce this is the firmware cache is
used for helping with suspend/resume, and if incompatible calls use it
they can stall suspend.

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/firmware_loader/main.c