mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-23 02:53:12 +08:00
NETISR(9): Fix NULL pointer access
This commit is contained in:
parent
0d48d6ede4
commit
760e894d54
@ -1042,7 +1042,11 @@ netisr_dispatch_src(u_int proto, uintptr_t source, struct mbuf *m)
|
|||||||
* to always being forced to directly dispatch.
|
* to always being forced to directly dispatch.
|
||||||
*/
|
*/
|
||||||
if (dispatch_policy == NETISR_DISPATCH_DIRECT) {
|
if (dispatch_policy == NETISR_DISPATCH_DIRECT) {
|
||||||
|
#ifndef __rtems__
|
||||||
nwsp = DPCPU_PTR(nws);
|
nwsp = DPCPU_PTR(nws);
|
||||||
|
#else /* __rtems__ */
|
||||||
|
nwsp = &rtems_bsd_nws;
|
||||||
|
#endif /* __rtems__ */
|
||||||
npwp = &nwsp->nws_work[proto];
|
npwp = &nwsp->nws_work[proto];
|
||||||
npwp->nw_dispatched++;
|
npwp->nw_dispatched++;
|
||||||
npwp->nw_handled++;
|
npwp->nw_handled++;
|
||||||
@ -1071,7 +1075,11 @@ netisr_dispatch_src(u_int proto, uintptr_t source, struct mbuf *m)
|
|||||||
KASSERT(!CPU_ABSENT(cpuid), ("%s: CPU %u absent", __func__, cpuid));
|
KASSERT(!CPU_ABSENT(cpuid), ("%s: CPU %u absent", __func__, cpuid));
|
||||||
if (cpuid != curcpu)
|
if (cpuid != curcpu)
|
||||||
goto queue_fallback;
|
goto queue_fallback;
|
||||||
|
#ifndef __rtems__
|
||||||
nwsp = DPCPU_PTR(nws);
|
nwsp = DPCPU_PTR(nws);
|
||||||
|
#else /* __rtems__ */
|
||||||
|
nwsp = &rtems_bsd_nws;
|
||||||
|
#endif /* __rtems__ */
|
||||||
npwp = &nwsp->nws_work[proto];
|
npwp = &nwsp->nws_work[proto];
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
|
Loading…
x
Reference in New Issue
Block a user