diff options
author | Asier Llano <a.llano@ziv.es> | 2009-12-08 20:29:10 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-08 20:29:10 -0800 |
commit | 1e4e0767ecb1cf53a43343518c0e09ad7ee5e23a (patch) | |
tree | cccda01860fec5659a2c178284c2f57cbb755e16 /.gitignore | |
parent | 4b860abf636fdd963731ae4ccafdd39ebcd5f962 (diff) | |
download | kernel_samsung_tuna-1e4e0767ecb1cf53a43343518c0e09ad7ee5e23a.zip kernel_samsung_tuna-1e4e0767ecb1cf53a43343518c0e09ad7ee5e23a.tar.gz kernel_samsung_tuna-1e4e0767ecb1cf53a43343518c0e09ad7ee5e23a.tar.bz2 |
net/mpc5200: Fix locking on fec_mpc52xx driver
Fix the locking scheme on the fec_mpc52xx driver. This device can
receive IRQs from three sources; the FEC itself, the tx DMA, and the
rx DMA. Mutual exclusion was handled by taking a spin_lock() in the
critical regions, but because the handlers are run with IRQs enabled,
spin_lock() is insufficient and the driver can end up interrupting
a critical region anyway from another IRQ.
Asier Llano discovered that this occurs when an error IRQ is raised
in the middle of handling rx irqs which resulted in an sk_buff memory
leak.
In addition, locking is spotty at best in the driver and inspection
revealed quite a few places with insufficient locking.
This patch is based on Asier's initial work, but reworks a number of
things so that locks are held for as short a time as possible, so
that spin_lock_irqsave() is used everywhere, and so the locks are
dropped when calling into the network stack (because the lock only
protects the hardware interface; not the network stack).
Boot tested on a lite5200 with an NFS root. Has not been performance
tested.
Signed-off-by: Asier Llano <a.llano@ziv.es>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions