Page MenuHomeFreeBSD

rtnetlink: Check for allocation failure in _nl_store_ifp_cookie()
Needs ReviewPublic

Authored by pouria on Tue, May 12, 12:40 PM.
Tags
None
Referenced Files
F157429140: D56965.diff
Thu, May 21, 8:48 AM
Unknown Object (File)
Tue, May 19, 9:38 PM
Unknown Object (File)
Tue, May 19, 6:01 AM
Unknown Object (File)
Tue, May 19, 5:59 AM
Unknown Object (File)
Mon, May 18, 11:41 PM
Unknown Object (File)
Mon, May 18, 9:02 PM
Unknown Object (File)
Mon, May 18, 9:02 PM
Unknown Object (File)
Mon, May 18, 9:02 PM
Subscribers

Details

Reviewers
markj
glebius
melifaro
Group Reviewers
network
Summary

Almost impossible to happen, but if it does, just report nothing.

MFC after: 3 days

Test Plan

Follow up D56954

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 73013
Build 69896: arc lint + arc unit

Event Timeline

Hmm, if we think it's impossible, then probably it's better to just assume nla_cookie != NULL rather than silently doing nothing? Otherwise we should probably report the error back to create_link(), no?

Hmm, if we think it's impossible, then probably it's better to just assume nla_cookie != NULL rather than silently doing nothing? Otherwise we should probably report the error back to create_link(), no?

It's absolutely safe to assume nla_cookie != NULL.
Unless someone else touches this code and forgets about the null check.
We can leave it as is.