Page MenuHomeFreeBSD

netgraph: If queue is full, don't enqueue in ng_source_rcvdata()
ClosedPublic

Authored by nc on Feb 3 2020, 4:40 AM.
Tags
None
Referenced Files
F103129126: D23477.id82783.diff
Thu, Nov 21, 9:29 AM
F103129119: D23477.id67740.diff
Thu, Nov 21, 9:29 AM
F103129072: D23477.id67696.diff
Thu, Nov 21, 9:28 AM
F103129071: D23477.id.diff
Thu, Nov 21, 9:28 AM
F103129062: D23477.id67680.diff
Thu, Nov 21, 9:28 AM
F103127478: D23477.diff
Thu, Nov 21, 9:04 AM
Unknown Object (File)
Mon, Nov 18, 2:43 PM
Unknown Object (File)
Thu, Nov 14, 4:23 PM

Details

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Please let me verify, that this change does not break D21968.

sys/netgraph/ng_source.c
287

This comment should be removed.

sys/netgraph/ng_source.c
571

_IF_xxx are unlocked, while IF_xxx enclose the operation in the queue mutex.

Because all calls in the module use the unlocked version, there is no need to make an extra effort here.

OTOH, even if the other calls would use locking, this call did not need any locking because it's read only and the possible damage in the case of a race condition is limited.

So I'm fine with it.

donner requested changes to this revision.Feb 3 2020, 7:45 AM

There are no interactions with the other open review.

To proceed, please remove the comment in https://reviews.freebsd.org/D23477#inline-145966

This revision now requires changes to proceed.Feb 3 2020, 7:45 AM

Sure, removed the comment

nc marked an inline comment as done.Feb 3 2020, 1:53 PM
sys/netgraph/ng_source.c
573

I'd like to have an error value other than 0.
How about ENOBUFS or similar?

This revision is now accepted and ready to land.Feb 3 2020, 8:31 PM

Approved by: kp (mentor)