Page MenuHomeFreeBSD

Stop checking for failures from malloc(M_WAITOK)
Needs ReviewPublic

Authored by zlei on Wed, Jul 3, 6:03 AM.

Details

Reviewers
markj
andrew
shurd
manu
Group Reviewers
Src Committers
Restricted Owners Package(Owns No Changed Paths)
cam
Summary

MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Owners added a reviewer: Restricted Owners Package.Wed, Jul 3, 6:03 AM
zlei requested review of this revision.Wed, Jul 3, 6:03 AM

The full diff is quite large. See https://github.com/gmshake/freebsd-src/tree/main_m_waitok or I can upload it here if requested.

Changes for drivers those have taskqueue_create(M_WAITOK) / taskqueue_create_fast(M_WAITOK) are split into D45853 .

sys/kern/kern_fail.c
481

fp_malloc is defined as macro as

#define fp_malloc(size, flags) malloc((size), M_FAIL_POINT, (flags))
sys/xdr/xdr_sizeof.c
97

Casting return of malloc(9) is also a stylistic error, please clear that meanwhile, too. This applies to any typecast, but preserving caddr_t makes it even worse.

I have no objection to the change, it seems fine. It's not really possible to review the diff without context, e.g., I can't verify the diff for sys/dev/etherswitch/infineon/adm6996fc.c in phabricator.

I have no objection to the change, it seems fine. It's not really possible to review the diff without context, e.g., I can't verify the diff for sys/dev/etherswitch/infineon/adm6996fc.c in phabricator.

Umm, from my side Phabricator is quite slow with large diff. Hope it does not get DOSed by me ;)

sys/xdr/xdr_sizeof.c
97

Casting return of malloc(9) is also a stylistic error, please clear that meanwhile, too. This applies to any typecast, but preserving caddr_t makes it even worse.

Sure. I can do it before the final committing.