The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: "Beauchemin, Mark" <Mark.Beauchemin@sycamorenet.com>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu,
	David Miller <davem@davemloft.net>
Subject: RE: [PATCH -rt] Preemption problem in kernel RT Patch
Date: Sat, 23 Jun 2007 16:26:06 +0200	[thread overview]
Message-ID: <1182608766.20203.208.camel@chaos> (raw)
In-Reply-To: <77B279EC7347F341A6AE891AA6AD68E9314252@ranchero.sycamorenet.com>

Mark,

On Sat, 2007-06-23 at 10:08 -0400, Beauchemin, Mark wrote:
> 	Thanks for straightening me out.  I was reading the function 
> try_to_take_rt_mutex wrong...  The problem makes more sense now.  The tunnel 
> code encapsulates the current packet in a new packet and calls ip_output 
> to get it to the destination.  If the routing table is changing(which 
> I'm doing when this happens) it could be called recursively.  The tunnel
> code tries to handle recursion at the top of ipip_tunnel_xmit:
> 
> 	if (tunnel->recursion++) {
> 		tunnel->stat.collisions++;
> 		goto tx_error;
> 	} 
> 
> 	The problem is it tries to take dev->lock which it already owns in 
> dev_queue_xmit before the check for recursion.

Hmm, this sounds scary. On a vanilla kernel (with debugging disabled),
this code will simply deadlock.

Do you have a test case? If you need more help, please contact the
netdev folks (netdev@vger.kernel.org).

> 	Unfortunately, every time I put in debug to see the routing 
> changes which cause the bug, it doesn't happen.  I'll certainly try to 
> reproduce it with CONFIG_PROVE_LOCKING on, but it won't be till end of next 
> week as we have a release going out.

Well, you won't see much more than you already debugged. You see the
place where the lock was taken and the call trace of the function in the
same way you have seen it with the BUG_ON().

	tglx



  reply	other threads:[~2007-06-23 14:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-21 19:39 [PATCH -rt] Preemption problem in kernel RT Patch Beauchemin, Mark
2007-06-22  8:03 ` Thomas Gleixner
2007-06-23 14:08   ` Beauchemin, Mark
2007-06-23 14:26     ` Thomas Gleixner [this message]
2007-07-24 15:48       ` Beauchemin, Mark
2007-07-24 19:15         ` Ingo Molnar
2007-07-24 19:36           ` Beauchemin, Mark
2007-08-01 14:15           ` Beauchemin, Mark
2007-08-01 14:22             ` Beauchemin, Mark
2007-08-06  7:13               ` Ingo Molnar
2007-08-07 19:41                 ` Beauchemin, Mark
2007-09-17 13:03                   ` Beauchemin, Mark
2007-09-17 13:59                     ` Ingo Molnar
2009-10-14 12:55 ` dtslinux
2009-10-14 15:38   ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1182608766.20203.208.camel@chaos \
    --to=tglx@linutronix.de \
    --cc=Mark.Beauchemin@sycamorenet.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox