From: Michael Maier <m1278468@allmail.net>
To: netdev@vger.kernel.org,
"users@rt2x00.serialmonkey.com" <users@rt2x00.serialmonkey.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: Kernel crash in bridge module: unable to handle kernel paging request
Date: Fri, 18 Apr 2014 20:10:39 +0200 [thread overview]
Message-ID: <53516A9F.9070309@allmail.net> (raw)
In-Reply-To: <20140417110002.790f7ae1@dualc.maya.org>
[-- Attachment #1: Type: text/plain, Size: 1477 bytes --]
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
[-- Attachment #2: ralink-64bit-1.diff --]
[-- Type: text/x-patch, Size: 1736 bytes --]
diff --git a/include/os/rt_linux.h b/include/os/rt_linux.h
index 1612e34..c3a7792 100644
--- a/include/os/rt_linux.h
+++ b/include/os/rt_linux.h
@@ -858,9 +858,14 @@ void linux_pci_unmap_single(void *handle, ra_dma_addr_t dma_addr, size_t size, i
#define GET_OS_PKT_DATATAIL(_pkt) \
(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))
+#else
#define SET_OS_PKT_DATATAIL(_pkt, _start, _len) \
((RTPKT_TO_OSPKT(_pkt))->tail) = (PUCHAR)((_start) + (_len))
-
+#endif
+
#define GET_OS_PKT_HEAD(_pkt) \
(RTPKT_TO_OSPKT(_pkt)->head)
diff --git a/os/linux/rt_linux.c b/os/linux/rt_linux.c
index f5b5e19..817bca8 100644
--- a/os/linux/rt_linux.c
+++ b/os/linux/rt_linux.c
@@ -505,9 +505,15 @@ PNDIS_PACKET duplicate_pkt(
MEM_DBG_PKT_ALLOC_INC(skb);
skb_reserve(skb, 2);
+#ifdef NET_SKBUFF_DATA_USES_OFFSET
+ NdisMoveMemory(skb->data+skb->tail, pHeader802_3, HdrLen);
+ skb_put(skb, HdrLen);
+ NdisMoveMemory(skb->data+skb->tail, pData, DataSize);
+#else
NdisMoveMemory(skb->tail, pHeader802_3, HdrLen);
skb_put(skb, HdrLen);
NdisMoveMemory(skb->tail, pData, DataSize);
+#endif
skb_put(skb, DataSize);
skb->dev = pNetDev; /*get_netdev_from_bssid(pAd, FromWhichBSSID); */
pPacket = OSPKT_TO_RTPKT(skb);
@@ -705,7 +711,11 @@ void wlan_802_11_to_802_3_packet(
pOSPkt->dev = pNetDev;
pOSPkt->data = pData;
pOSPkt->len = DataSize;
+#ifdef NET_SKBUFF_DATA_USES_OFFSET
+ pOSPkt->tail = (pOSPkt->data-pOSPkt->head)+pOSPkt->len;
+#else
pOSPkt->tail = pOSPkt->data + pOSPkt->len;
+#endif
/* */
/* copy 802.3 header */
[-- Attachment #3: ralink-64bit-2.diff --]
[-- Type: text/x-patch, Size: 715 bytes --]
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))
parent reply other threads:[~2014-04-18 18:30 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20140417110002.790f7ae1@dualc.maya.org>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53516A9F.9070309@allmail.net \
--to=m1278468@allmail.net \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=users@rt2x00.serialmonkey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).