From: Ursula Braun Date: Tue, 13 May 2014 12:38:02 +0000 (+0200) Subject: af_iucv: wrong mapping of sent and confirmed skbs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f6e39ac6156b2b46584d2dbbd4c2ead95e883552;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git af_iucv: wrong mapping of sent and confirmed skbs commit f5738e2ef88070ef1372e6e718124d88e9abe4ac upstream. When sending data through IUCV a MESSAGE COMPLETE interrupt signals that sent data memory can be freed or reused again. With commit f9c41a62bba3f3f7ef3541b2a025e3371bcbba97 "af_iucv: fix recvmsg by replacing skb_pull() function" the MESSAGE COMPLETE callback iucv_callback_txdone() identifies the wrong skb as being confirmed, which leads to data corruption. This patch fixes the skb mapping logic in iucv_callback_txdone(). Signed-off-by: Ursula Braun Signed-off-by: Frank Blaschka Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index 276aa86f366b..215e9b008db6 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c @@ -1829,7 +1829,7 @@ static void iucv_callback_txdone(struct iucv_path *path, spin_lock_irqsave(&list->lock, flags); while (list_skb != (struct sk_buff *)list) { - if (msg->tag != IUCV_SKB_CB(list_skb)->tag) { + if (msg->tag == IUCV_SKB_CB(list_skb)->tag) { this = list_skb; break; }