Page MenuHomeFreeBSD

linuxkpi: Handle NULL cache pointer in kmem_cache_destroy()
ClosedPublic

Authored by markj on Oct 6 2021, 3:36 PM.
Tags
None
Referenced Files
F108515756: D32337.id96363.diff
Sat, Jan 25, 7:49 PM
Unknown Object (File)
Fri, Jan 24, 7:17 PM
Unknown Object (File)
Thu, Jan 23, 12:03 AM
Unknown Object (File)
Fri, Jan 17, 4:36 PM
Unknown Object (File)
Thu, Jan 9, 11:26 PM
Unknown Object (File)
Dec 25 2024, 12:43 PM
Unknown Object (File)
Dec 8 2024, 7:19 AM
Unknown Object (File)
Oct 12 2024, 6:14 PM
Subscribers

Details

Summary

This scenario arose when testing iwlwifi, when iwl_trans_pcie_alloc()
fails at the "wrong" point. Linux handles a NULL pointer here, so let's
do the same.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Oct 6 2021, 3:36 PM
emaste added inline comments.
sys/compat/linuxkpi/common/src/linux_slab.c
196

We're already using unlikely()s here, maybe add it on this test?

This revision is now accepted and ready to land.Oct 6 2021, 4:22 PM

If you have a log from iwlwifi along with hardware information please email that over as well.

sys/compat/linuxkpi/common/src/linux_slab.c
196

It really doesn't make sense here, this function is very expensive and rarely called.