]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
xsigo: PCA 2.3.1 Compute Node panics in xve_create_arp+430
authorPradeep Gopanapalli <pradeep.gopanapalli@oracle.com>
Tue, 29 Aug 2017 18:59:54 +0000 (11:59 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 30 Aug 2017 20:52:20 +0000 (13:52 -0700)
Orabug: 26474000

After some idle time on a RC connection xve driver cleans up the idle entry
and by that time arp entry for that address would be flushed out.
Further, traffic re-establishment for that address is taken care by arps
generated by the system. But its not rare that arp entry for that
address is still present with driver cleaned up the path and in that
case xve driver generates arp/ndp packets to resolve the path.

While generating an vlan based arp, xve driver uses "vlan_eth_hdr" API
to fill vlan specific data. This API works as expected only if skb
mac_header is initialized to proper value before using API.
In xve_create_arp and xve_create_ndp newly allocated skb's will not have
correct mac_header offset and as a result the pointer returned by
vlan_eth_hdr function is not the correct address to use, some times this
will result in a kernel panic.

Call Trace:
BUG: unable to handle kernel paging request at ffff88005a47060b
IP: [<ffffffffa12e3614>] xve_create_arp+0x1ae/0x200 [xve]

The fix here is to directly typecast skb->data instead of using
"vlan_eth_hdr" API.

This change in xve of using "vlan_eth_hdr" was mostly introduced during
EDR/uVNIC development and is applicable only for UEK4.

Signed-off-by: Pradeep Gopanapalli <pradeep.gopanapalli@oracle.com>
Reviewed-by: Chien Yen <chien.yen@oracle.com>
drivers/infiniband/ulp/xsigo/xscore/Makefile
drivers/infiniband/ulp/xsigo/xsvhba/Makefile
drivers/infiniband/ulp/xsigo/xsvnic/Makefile
drivers/infiniband/ulp/xsigo/xve/Makefile
drivers/infiniband/ulp/xsigo/xve/xve.h
drivers/infiniband/ulp/xsigo/xve/xve_main.c

index 91c0ef4a6a4d0a1272a19d49ccd405ef5a647f4d..762cf2e6731d1eef75cfb00b5a5616a63118e41b 100644 (file)
@@ -2,7 +2,7 @@ obj-$(CONFIG_INFINIBAND_XSCORE) := xscore.o
 xscore-y := xscore_impl.o xs_ud.o xscore_api.o xsmp.o \
            xscore_stats.o xscore_uadm.o
 
-ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8043\"
+ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8044\"
 ccflags-y += -DRDMA_PORT_LINK_LAYER_CHANGES -DHAS_SKB_ACCESS_FUNCTIONS
 ccflags-y += -DSCSI_STRUCT_CHANGES -DSCSI_TIMEOUT_CHANGES -DLLE
 ccflags-y += -DXG_FRAG_SIZE_PRESENT -DXG_FRAG_PAGE_PRESENT
index 20c710673132b6eefcd910a926702838a4e63d6b..d028912ddf7a105cbbd719ed15fcf81a9c2fee3b 100644 (file)
@@ -3,7 +3,7 @@ xsvhba-y := vhba_main.o vhba_xsmp.o vhba_create.o vhba_init.o vhba_delete.o \
            vhba_attr.o vhba_wq.o vhba_proc.o vhba_stats.o vhba_ib.o        \
            vhba_scsi_intf.o vhba_align.o
 
-ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8043\"
+ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8044\"
 ccflags-y += -DRDMA_PORT_LINK_LAYER_CHANGES -DHAS_SKB_ACCESS_FUNCTIONS
 ccflags-y += -DSCSI_STRUCT_CHANGES -DSCSI_TIMEOUT_CHANGES -DLLE
 ccflags-y += -DXG_FRAG_SIZE_PRESENT -DXG_FRAG_PAGE_PRESENT
index 31aa91e34845856d582145e345975cbc3697af35..34f1224c6a822ceee7a4bf596ef6bc9816fff97d 100644 (file)
@@ -1,7 +1,7 @@
 obj-$(CONFIG_INFINIBAND_XSVNIC) := xsvnic.o
 xsvnic-y := xsvnic_main.o xsvnic_stats.o
 
-ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8043\"
+ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8044\"
 ccflags-y += -DRDMA_PORT_LINK_LAYER_CHANGES -DHAS_SKB_ACCESS_FUNCTIONS
 ccflags-y += -DSCSI_STRUCT_CHANGES -DSCSI_TIMEOUT_CHANGES -DLLE
 ccflags-y += -DXG_FRAG_SIZE_PRESENT -DXG_FRAG_PAGE_PRESENT
index e1fba082ed07bd3c74937f778dc0793b837c1b9d..f8e95997213707c0a3a65019325b822b93f6cf62 100644 (file)
@@ -2,7 +2,7 @@ obj-$(CONFIG_INFINIBAND_XVE) := xve.o
 xve-y := xve_main.o xve_verbs.o xve_multicast.o xve_ib.o xve_tables.o \
         xve_ethtool.o xve_cm.o xve_stats.o
 
-ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8043\"
+ccflags-y += -DXSIGO_LOCAL_VERSION=\"6.0.r8044\"
 ccflags-y += -DRDMA_PORT_LINK_LAYER_CHANGES -DHAS_SKB_ACCESS_FUNCTIONS
 ccflags-y += -DSCSI_STRUCT_CHANGES -DSCSI_TIMEOUT_CHANGES -DLLE
 ccflags-y += -DXG_FRAG_SIZE_PRESENT -DXG_FRAG_PAGE_PRESENT
index baab637945280549f5112cc62864bd75b409d85b..be577da4db87d58296698f938fe542eda58ffb55 100644 (file)
@@ -1298,7 +1298,7 @@ static inline int xve_get_misc_info(void)
 
 static inline int xg_vlan_tx_tag_present(struct sk_buff *skb)
 {
-       struct vlan_ethhdr *veth = vlan_eth_hdr(skb);
+       struct vlan_ethhdr *veth = (struct vlan_ethhdr *)(skb->data);
 
        return veth->h_vlan_proto == htons(ETH_P_8021Q);
 }
index 24b2e336537eba9b26b7ce1aebd82ee98257f61a..77481dd0664a6bb1ceccff8c65090990d40dc0e5 100644 (file)
@@ -1257,7 +1257,7 @@ void handle_carrier_state(struct xve_dev_priv *priv, char state)
 struct sk_buff *xve_generate_query(struct xve_dev_priv *priv,
                                   struct sk_buff *skb)
 {
-       struct vlan_ethhdr *veth = vlan_eth_hdr(skb);
+       struct vlan_ethhdr *veth = (struct vlan_ethhdr *)(skb->data);
 
        if ((xg_vlan_tx_tag_present(skb)
             && veth->h_vlan_encapsulated_proto == htons(ETH_P_IP))
@@ -1302,7 +1302,7 @@ struct sk_buff *xve_create_arp(struct xve_dev_priv *priv,
                struct vlan_ethhdr *veth;
 
                vlan_get_tag(skb_pkt, &vlan_tci);
-               veth = vlan_eth_hdr(skb);
+               veth = (struct vlan_ethhdr *)(skb->data);
                veth->h_vlan_proto = htons(ETH_P_8021Q);
                /* now, the TCI */
                veth->h_vlan_TCI = htons(vlan_tci);
@@ -1432,7 +1432,7 @@ struct sk_buff *xve_create_ndp(struct xve_dev_priv *priv,
                struct vlan_ethhdr *veth;
 
                vlan_get_tag(skb_pkt, &vlan_tci);
-               veth = vlan_eth_hdr(skb);
+               veth = (struct vlan_ethhdr *)(skb->data);
                veth->h_vlan_proto = htons(ETH_P_8021Q);
                /* now, the TCI */
                veth->h_vlan_TCI = htons(vlan_tci);