Re: [PATCH net] inet: fix potential deadlock in reqsk_queue_unlink()

2015-08-18 Thread Eric Dumazet
On Tue, 2015-08-18 at 13:57 +, David Laight wrote: > s the purpose of del_timer_sync() > > I wasn't worried about del_timer_sync(). > The problem is the call to timer_pending(). > > If the timer has just expired, and the timeout function is running > (on another cpu) then timer_pending() will

RE: [PATCH net] inet: fix potential deadlock in reqsk_queue_unlink()

2015-08-18 Thread David Laight
From: Eric Dumazet > Sent: 18 August 2015 14:37 > On Tue, 2015-08-18 at 11:04 +, David Laight wrote: > > From: Eric Dumazet > > > Sent: 13 August 2015 23:45 > > > When replacing del_timer() with del_timer_sync(), I introduced > > > a deadlock condition : > > > > > > reqsk_queue_unlink() is cal

Re: [PATCH net] inet: fix potential deadlock in reqsk_queue_unlink()

2015-08-18 Thread Eric Dumazet
On Tue, 2015-08-18 at 11:04 +, David Laight wrote: > From: Eric Dumazet > > Sent: 13 August 2015 23:45 > > When replacing del_timer() with del_timer_sync(), I introduced > > a deadlock condition : > > > > reqsk_queue_unlink() is called from inet_csk_reqsk_queue_drop() > > > > inet_csk_reqsk_q

RE: [PATCH net] inet: fix potential deadlock in reqsk_queue_unlink()

2015-08-18 Thread David Laight
From: Eric Dumazet > Sent: 13 August 2015 23:45 > When replacing del_timer() with del_timer_sync(), I introduced > a deadlock condition : > > reqsk_queue_unlink() is called from inet_csk_reqsk_queue_drop() > > inet_csk_reqsk_queue_drop() can be called from many contexts, > one being the timer han

Re: [PATCH net] inet: fix potential deadlock in reqsk_queue_unlink()

2015-08-13 Thread David Miller
From: Eric Dumazet Date: Thu, 13 Aug 2015 15:44:51 -0700 > From: Eric Dumazet > > When replacing del_timer() with del_timer_sync(), I introduced > a deadlock condition : > > reqsk_queue_unlink() is called from inet_csk_reqsk_queue_drop() > > inet_csk_reqsk_queue_drop() can be called from many

[PATCH net] inet: fix potential deadlock in reqsk_queue_unlink()

2015-08-13 Thread Eric Dumazet
From: Eric Dumazet When replacing del_timer() with del_timer_sync(), I introduced a deadlock condition : reqsk_queue_unlink() is called from inet_csk_reqsk_queue_drop() inet_csk_reqsk_queue_drop() can be called from many contexts, one being the timer handler itself (reqsk_timer_handler()). In