Re: IPv4 BUG: held lock freed!

2012-08-19 Thread Julian Anastasov
Hello, On Sun, 19 Aug 2012, Eric Dumazet wrote: > Hmm, this looks like sk_reset_timer() is called on a socket, and timer > triggers _before_ the sock_hold() > > So the timer handler decrements sk_refcnt to 0 and calls sk_free() > > Its probably a bug introduced (or uncovered) by commit

Re: IPv4 BUG: held lock freed!

2012-08-19 Thread Eric Dumazet
On Sun, 2012-08-19 at 23:05 +0800, Lin Ming wrote: > On Sun, Aug 19, 2012 at 10:45 PM, Eric Dumazet wrote: > > On Sun, 2012-08-19 at 22:15 +0800, Lin Ming wrote: > > > >> Will it still has problem if code goes here without sock_hold(sk)? > > > > Not sure of what you mean. > > See my comments in t

Re: IPv4 BUG: held lock freed!

2012-08-19 Thread Lin Ming
On Sun, Aug 19, 2012 at 10:45 PM, Eric Dumazet wrote: > On Sun, 2012-08-19 at 22:15 +0800, Lin Ming wrote: > >> Will it still has problem if code goes here without sock_hold(sk)? > > Not sure of what you mean. See my comments in the function. Is that a potential problem? static void tcp_write_ti

Re: IPv4 BUG: held lock freed!

2012-08-19 Thread Eric Dumazet
On Sun, 2012-08-19 at 22:15 +0800, Lin Ming wrote: > Will it still has problem if code goes here without sock_hold(sk)? Not sure of what you mean. At the time tcp_write_timer() runs, we own one reference on the socket. (this reference was taken in sk_reset_timer()) On old kernels, if we found t

Re: IPv4 BUG: held lock freed!

2012-08-19 Thread Lin Ming
On Sun, Aug 19, 2012 at 8:51 PM, Eric Dumazet wrote: > Hi Fengguang, thanks for this report. > > Hmm, this looks like sk_reset_timer() is called on a socket, and timer > triggers _before_ the sock_hold() > > So the timer handler decrements sk_refcnt to 0 and calls sk_free() > > Its probably a bug

Re: IPv4 BUG: held lock freed!

2012-08-19 Thread Fengguang Wu
> Could you test following patch ? Yes, sure. Thanks for the quick fix! I should have reported it earlier (so as to get it fixed earlier) once find the bisect will be time consuming.. Please be patient -- it will take 1-2 days to confirm the bug fix. Thanks, Fengguang -- To unsubscribe from thi

Re: IPv4 BUG: held lock freed!

2012-08-19 Thread Eric Dumazet
On Sat, 2012-08-18 at 10:19 +0800, Fengguang Wu wrote: > Hi David, > > The bug should be introduced somewhere between 3.5 and 3.6-rc1. > > [ 2866.131281] IPv4: Attempt to release TCP socket in state 1 880019ec > [ 2866.131726] > [ 2866.132188] = > [ 2866.132281] [