Re: WARNING: at net/ipv4/tcp_input.c:2927 tcp_ack+0xd55/0x1991()

From: Jonathan Corbet
Date: Mon Mar 30 2009 - 10:02:15 EST


On Mon, 30 Mar 2009 08:51:07 +0000
Jarek Poplawski <jarkao2@xxxxxxxxx> wrote:

> Probably I miss something, but generally in a case like this "a_lock"
> doesn't have to be taken in IRQ mode to be dangerous. Eg. if one cpu
> is trying to take this lock after fasync_lock (with IRQs disabled),
> while another cpu is waiting for fasync_lock in IRQ, which preempted
> such "a_lock".

The possibility exists, I guess, yes.

> Could you give some details of this fix?

I just reverse the order of lock acquisition in fasync_helper(). Patch
is attached. I'll be sending up a pull request shortly.

jon