Page MenuHomeFreeBSD

9pfs: move NULL check immediately after allocation
ClosedPublic

Authored by emaste on Jun 24 2024, 4:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 21, 1:13 AM
Unknown Object (File)
Wed, Apr 16, 7:55 PM
Unknown Object (File)
Mon, Apr 14, 8:01 AM
Unknown Object (File)
Mon, Apr 14, 5:00 AM
Unknown Object (File)
Mon, Apr 14, 1:27 AM
Unknown Object (File)
Sun, Apr 13, 9:09 PM
Unknown Object (File)
Mar 26 2025, 12:25 PM
Unknown Object (File)
Feb 26 2025, 8:25 AM
Subscribers

Details

Summary

Reported by: Shawn Webb (HardenedBSD)

Diff Detail

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

Event Timeline

emaste created this revision.
emaste edited reviewers, added: dfr; removed: d.raith_comcast.net.
emaste added a reviewer: lattera-gmail.com.
This revision is now accepted and ready to land.Jun 24 2024, 4:24 PM
markj added inline comments.
sys/dev/virtio/p9fs/virtio_p9fs.c
334

This can just be an M_WAITOK allocation. We use malloc(M_WAITOK) further below, and device_attach routines are allowed to sleep in general.