aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorUrsula Braun <ursula.braun@de.ibm.com>2013-04-07 18:19:26 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-08 17:16:57 -0400
commitf9c41a62bba3f3f7ef3541b2a025e3371bcbba97 (patch)
tree39aa5a3b8a584cff0d1974e60d22015a26d04e41 /include
parent88c5b5ce5cb57af6ca2a7cf4d5715fa320448ff9 (diff)
af_iucv: fix recvmsg by replacing skb_pull() function
When receiving data messages, the "BUG_ON(skb->len < skb->data_len)" in the skb_pull() function triggers a kernel panic. Replace the skb_pull logic by a per skb offset as advised by Eric Dumazet. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com> Reviewed-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/iucv/af_iucv.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/iucv/af_iucv.h b/include/net/iucv/af_iucv.h
index cc7c19732389..714cc9a54a4c 100644
--- a/include/net/iucv/af_iucv.h
+++ b/include/net/iucv/af_iucv.h
@@ -130,6 +130,14 @@ struct iucv_sock {
130 enum iucv_tx_notify n); 130 enum iucv_tx_notify n);
131}; 131};
132 132
133struct iucv_skb_cb {
134 u32 class; /* target class of message */
135 u32 tag; /* tag associated with message */
136 u32 offset; /* offset for skb receival */
137};
138
139#define IUCV_SKB_CB(__skb) ((struct iucv_skb_cb *)&((__skb)->cb[0]))
140
133/* iucv socket options (SOL_IUCV) */ 141/* iucv socket options (SOL_IUCV) */
134#define SO_IPRMDATA_MSG 0x0080 /* send/recv IPRM_DATA msgs */ 142#define SO_IPRMDATA_MSG 0x0080 /* send/recv IPRM_DATA msgs */
135#define SO_MSGLIMIT 0x1000 /* get/set IUCV MSGLIMIT */ 143#define SO_MSGLIMIT 0x1000 /* get/set IUCV MSGLIMIT */