Page MenuHomeFreeBSD

9pfs: move NULL check immediately after allocation
ClosedPublic

Authored by emaste on Mon, Jun 24, 4:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jul 7, 2:22 PM
Unknown Object (File)
Sun, Jul 7, 12:43 PM
Unknown Object (File)
Thu, Jul 4, 8:18 PM
Unknown Object (File)
Thu, Jun 27, 3:14 PM
Unknown Object (File)
Wed, Jun 26, 5:17 PM
Unknown Object (File)
Mon, Jun 24, 7:42 PM
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.Mon, Jun 24, 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.