tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

MPSAFE and KERNEL_LOCK



A traditional ethernet driver receives input via an interrupt routine
and passes packets to ether_input(). The data is protected by disabling
the receive interrupt.

In multiprocessor land, the same is achieved by also acquiring the
big kernel lock.

Current code however queues incoming packets in a percpuq and passes
things through a softint tagged as MPSAFE. The softint handler is calling
ether_input without holding the kernel lock.

There is another unprotected path in bpf_write calling into the
_if_input vector directly without locking (bpf device is tagged MPSAFE)
and without disabling interrupts.

Did I miss something?

-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index