Module Name:    src
Committed By:   ozaki-r
Date:           Thu Sep 19 04:09:34 UTC 2019

Modified Files:
        src/sys/netinet: wqinput.c

Log Message:
wqinput: avoid having struct wqinput_worklist directly in a percpu storage

percpu(9) has a certain memory storage for each CPU and provides it by the piece
to users.  If the storages went short, percpu(9) enlarges them by allocating new
larger memory areas, replacing old ones with them and destroying the old ones.
A percpu storage referenced by a pointer gotten via percpu_getref can be
destroyed by the mechanism after a running thread sleeps even if percpu_putref
has not been called.

Input handlers of wqinput normally involves sleepable operations so we must
avoid dereferencing a percpu data (struct wqinput_worklist) after executing
an input handler.  Address this situation by having just a pointer to the data
in a percpu storage instead.

Reviewed by knakahara@ and yamaguchi@


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/netinet/wqinput.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Reply via email to