From: Ben Hutchings <hidden> Date: 2009-12-15 02:06:41
velocity_open() calls velocity_give_many_rx_descs(), which gives RX
descriptors to the NIC, before installing an interrupt handler or
calling velocity_init_registers(). I think this is very unsafe and it
appears to explain the bug report <http://bugs.debian.org/508527>.
On MTU change, velocity_give_many_rx_descs() is again called before
velocity_init_registers(). I'm not sure whether this is unsafe but
it does look wrong.
Therefore, move the calls to velocity_give_many_rx_descs() after
request_irq() and velocity_init_registers().
Signed-off-by: Ben Hutchings <redacted>
---
This is untested; I don't have this hardware.
Ben.
drivers/net/via-velocity.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
From: David Miller <davem@davemloft.net> Date: 2009-12-26 02:21:01
From: Ben Hutchings <redacted>
Date: Tue, 15 Dec 2009 02:05:09 +0000
velocity_open() calls velocity_give_many_rx_descs(), which gives RX
descriptors to the NIC, before installing an interrupt handler or
calling velocity_init_registers(). I think this is very unsafe and it
appears to explain the bug report <http://bugs.debian.org/508527>.
On MTU change, velocity_give_many_rx_descs() is again called before
velocity_init_registers(). I'm not sure whether this is unsafe but
it does look wrong.
Therefore, move the calls to velocity_give_many_rx_descs() after
request_irq() and velocity_init_registers().
Signed-off-by: Ben Hutchings <redacted>
---
This is untested; I don't have this hardware.
Although this patch looks fine to me, I don't want to apply
it until someone tests it.
From: Jan Ceuleers <hidden> Date: 2009-12-28 09:29:24
David Miller wrote:
quoted
velocity_open() calls velocity_give_many_rx_descs(), which gives RX
descriptors to the NIC, before installing an interrupt handler or
calling velocity_init_registers(). I think this is very unsafe and it
appears to explain the bug report <http://bugs.debian.org/508527>.
On MTU change, velocity_give_many_rx_descs() is again called before
velocity_init_registers(). I'm not sure whether this is unsafe but
it does look wrong.
Therefore, move the calls to velocity_give_many_rx_descs() after
request_irq() and velocity_init_registers().
Signed-off-by: Ben Hutchings <redacted>
---
This is untested; I don't have this hardware.
Although this patch looks fine to me, I don't want to apply
it until someone tests it.
I have successfully booted a 2.6.32.2 kernel with this patch applied on top on a PXE-booting machine with nfsroot. If you consider that to be a sufficient test then please feel free to add my
Tested-by: Jan Ceuleers <redacted>
Otherwise, please let me know which other tests you would like me to carry out.
Note though that I am unable to reproduce the original bug on my system.
Cheers, Jan