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
F153461604: D32337.id96345.diff
Tue, Apr 21, 7:32 AM
F153461542: D32337.id96345.diff
Tue, Apr 21, 7:32 AM
Unknown Object (File)
Sun, Apr 19, 3:16 AM
Unknown Object (File)
Thu, Apr 16, 9:20 PM
Unknown Object (File)
Wed, Apr 15, 10:36 AM
Unknown Object (File)
Thu, Apr 9, 4:41 PM
Unknown Object (File)
Sat, Apr 4, 5:51 AM
Unknown Object (File)
Mon, Mar 23, 11:54 AM
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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 41983
Build 38871: arc lint + arc unit

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.