Search Linux Wireless

GPF on memory allocation, bisected down to "iwlwifi: fix leaks/bad data after failed firmware load"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

After updating from 5.15.14 to 5.16.5, I started getting GPF at
seemingly random places, but always(?) related to some memory allocation
(kmalloc, kmem_cache_alloc_trace etc). Since I had very specific good
and bad versions, and trivial reproducer (it crashes on boot rather
quickly), I bisected it, and ended up with:

    iwlwifi: fix leaks/bad data after failed firmware load

    If firmware load fails after having loaded some parts of the
    firmware, e.g. the IML image, then this would leak. For the
    host command list we'd end up running into a WARN on the next
    attempt to load another firmware image.

    Fix this by calling iwl_dealloc_ucode() on failures, and make
    that also clear the data so we start fresh on the next round.

    Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
    Signed-off-by: Luca Coelho <luciano.coelho@xxxxxxxxx>
    Link: https://lore.kernel.org/r/iwlwifi.20211210110539.1f742f0eb58a.I1315f22f6aa632d94ae2069f85e1bca5e734dce0@changeid
    Signed-off-by: Luca Coelho <luciano.coelho@xxxxxxxxx>

as the first bad commit.

And indeed, after reverting it on top of 5.16.5, the problem disappears.

What I think is an important details, I don't have any firmware for the
network card on this setup, so all attempts fails (several messages
about failed firmware load, for a variety of versions).

Some more details (including specific crash log) are at https://github.com/QubesOS/qubes-issues/issues/7241


-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux