mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
The hda-intel driver uses request_firmware_nowait() for loading its
patch, and tries to continue the probe directly from the fw loader
callback. This works in principle, but it has a few drawbacks:
- The driver may be released before the firmware callback completes
- Having two ways of async probe makes the code flow unnecessarily
complex
The former issue is more severe, as it may potentially lead to a UAF,
and there is no explicit way to cancel the pending firmware worker
for now.
This patch changes the firmware loading to be performed rather in the
common probe work without *_nowait(). Then the pending work can be
easily canceled, and the code becomes more straightforward.
A nice bonus is that, by moving into the probe work, the firmware
doesn't need any longer to be cached, hence we can get rid of struct
azx.fw field, and release the firmware immediately after parsing it,
too.
Fixes:
|
||
|---|---|---|
| .. | ||
| acpi.c | ||
| cix-ipbloq.c | ||
| intel_trace.h | ||
| intel.c | ||
| intel.h | ||
| Kconfig | ||
| Makefile | ||
| tegra.c | ||