diff mbox

Kernel Oops in __inet_twsk_kill()

Message ID loom.20150803T035445-326@post.gmane.org
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

charley Aug. 3, 2015, 2:19 a.m. UTC
Phani <pgargey <at> yahoo.com> writes:

> 
> 
> > 
> > > The problem has been fixed. It is introduced by a third party patch,
> > > which decreases the refcnt of timewait socket.
> >
> 
> What is the fix?
> pl share the gerrit.
> 
> 

Here you go.

https://android.googlesource.com/kernel/common/+/android-
3.14/net/netfilter/xt_qtaguid.c


	}

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/netfilter/xt_qtaguid.c b/net/netfilter/xt_qtaguid.c
--- a/net/netfilter/xt_qtaguid.c
+++ b/net/netfilter/xt_qtaguid.c
@@ -1605,7 +1605,8 @@  static struct sock 
*qtaguid_find_sk(const struct sk_buff *skb,
 		 * "struct inet_timewait_sock" which is missing fields.
		 */
		if (sk->sk_state  == TCP_TIME_WAIT) {
-			sock_gen_put(sk);
+                      if (sk != skb-sk)
+			    sock_gen_put(sk);
			sk = NULL;
		}