Page MenuHomeFreeBSD

rtnetlink: Check for allocation failure in _nl_store_ifp_cookie()
AbandonedPublic

Authored by pouria on May 12 2026, 12:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 25, 11:46 PM
Unknown Object (File)
Jun 2 2026, 9:58 AM
Unknown Object (File)
May 31 2026, 7:11 AM
Unknown Object (File)
May 28 2026, 1:00 PM
Unknown Object (File)
May 27 2026, 3:02 PM
Unknown Object (File)
May 27 2026, 11:14 AM
Unknown Object (File)
May 25 2026, 7:19 AM
Unknown Object (File)
May 21 2026, 8:48 AM
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.