diff mbox

Kernel crash in bridge module: unable to handle kernel paging request

Message ID 53516A9F.9070309@allmail.net
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Michael Maier April 18, 2014, 6:10 p.m. UTC
Michael Maier wrote:
> Hello!
> 
> I'm using the following configuration on CentOS 6.5 w/ lt-kernel
> (3.10.37) - or any other kernel version.
> 
> brctl addbr br0
> brctl addif br0 eth0
> 
> ip li add vxlan0 type vxlan id 1 group 239.1.1.1 ttl 1 dev ra0
> 
> brctl addif br0 vxlan0
> 
> This is one end of a vxlan tunnel via WLAN.
> 
> At the moment the first package arrives the bridge, the 64 bit-kernel
> crashes (32 bit kernel works perfectly). What could be the reason for
> the crash w/ 64 bit kernel? Btw: there isn't any problem even w/ 64
> bit kernel as long as the bridge code isn't involved.

The rt5572sta driver (DPO_RT5572_LinuxSTA_2.6.1.3_20121022) isn't
completely 64 bit stable. The attached patch makes rt5572sta working
with 64bit kernels even when used with a bridge like mentioned above.

The patch is derived from
https://github.com/ashaffer/rt3573sta/commit/2654eaee416f238a6651465c88a804ee251afe74
- there it was applied to rt3573 driver from Ralink / Mediatek.

I applied and tested it for rt5572sta (which is the newer one and
supports a lot more chips, amongst others rt3573) and kernel 3.13.6 / 64
bit. I suppose it to work with 3.10.x, too.


I detected, that bridging does not work with 3.14.x - but there is no
crash - it just doesn't work (packages came in in eth0, go through the
bridge and vxlan, are remotely answered, but the sent response can only
be seen in the vxlan and br0 device - but it can't be seen in eth0 -
strange).



Michael
diff mbox

Patch

diff --git a/include/os/rt_linux.h b/include/os/rt_linux.h
index c3a7792..f5975a1 100644
--- a/include/os/rt_linux.h
+++ b/include/os/rt_linux.h
@@ -860,7 +860,7 @@  void linux_pci_unmap_single(void *handle, ra_dma_addr_t dma_addr, size_t size, i
 		(RTPKT_TO_OSPKT(_pkt)->tail)
 #ifdef NET_SKBUFF_DATA_USES_OFFSET
 #define SET_OS_PKT_DATATAIL(_pkt, _start, _len)	\
-		((RTPKT_TO_OSPKT(_pkt))->tail) = (PUCHAR)(RTPKT_TO_OSPKT(_pkt)->data-(RTPKT_TO_OSPKT(_pkt)->head) + (_len))
+		((RTPKT_TO_OSPKT(_pkt))->tail) = (ULONG)RTPKT_TO_OSPKT(_pkt)->data - (ULONG)(RTPKT_TO_OSPKT(_pkt)->head) + (_len)
 #else
 #define SET_OS_PKT_DATATAIL(_pkt, _start, _len)	\
 		((RTPKT_TO_OSPKT(_pkt))->tail) = (PUCHAR)((_start) + (_len))