All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Denis V. Lunev" <den@openvz.org>
To: David Miller <davem@davemloft.net>
Cc: herbert@gondor.apana.org.au, adobriyan@gmail.com,
	dlezcano@fr.ibm.com, netdev@vger.kernel.org
Subject: Re: 2.6.27-rc4: icmp_sk() uses smp_processor_id() in preemptible code
Date: Fri, 22 Aug 2008 17:12:37 +0400	[thread overview]
Message-ID: <1219410757.31440.1.camel@iris.sw.ru> (raw)
In-Reply-To: <20080822.045402.32679253.davem@davemloft.net>

On Fri, 2008-08-22 at 04:54 -0700, David Miller wrote:
> From: Herbert Xu <herbert@gondor.apana.org.au>
> Date: Thu, 21 Aug 2008 22:50:00 +1000
> 
> > adobriyan@gmail.com wrote:
> > > Steps to reproduce:
> > > 
> > >        CONFIG_PREEMPT=y
> > >        CONFIG_DEBUG_PREEMPT=y
> > >        tracepath <something>
> > > 
> > > icmp6_sk() is similar (I haven't checked at runtime, though).
> > > 
> > > BUG: using smp_processor_id() in preemptible [00000000] code: tracepath/3205
> > > caller is icmp_sk+0x15/0x30
> > > Pid: 3205, comm: tracepath Not tainted 2.6.27-rc4 #1
> > > 
> > > Call Trace:
> > > [<ffffffff8031af14>] debug_smp_processor_id+0xe4/0xf0
> > > [<ffffffff80409405>] icmp_sk+0x15/0x30
> > > [<ffffffff8040a17b>] icmp_send+0x4b/0x3f0
> > 
> > Caused by:
> > 
> > commit 405666db84b984b68fc75794069f424c02e5796c
> > Author: Denis V. Lunev <den@openvz.org>
> > Date:   Fri Feb 29 11:16:46 2008 -0800
> > 
> >     [ICMP]: Pass proper ICMP socket into icmp(v6)_xmit_(un)lock.
> > 
> > We need to disable preemption (was provided by disabling BH) before
> > getting the per-cpu ICMP socket.
> 
> Denis, please fix this.
> 
> The icmp_sk was always evaluated inside of icmp*_xmit_lock()
> exactly because we needed the BH disabling in order for the
> smp_processor_id() evaluation to be safe.
> 
> It's probably better to pass the namespace into the lock and
> unlock routines.

for sure. I am sorry for the delay, I am ill and at home.

I'll try to do my best and cook the patch today.


  reply	other threads:[~2008-08-22 13:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-21 12:20 2.6.27-rc4: icmp_sk() uses smp_processor_id() in preemptible code adobriyan
2008-08-21 12:50 ` Herbert Xu
2008-08-22 11:54   ` David Miller
2008-08-22 13:12     ` Denis V. Lunev [this message]
2008-08-22 13:54 ` [PATCH 1/1] icmp: icmp_sk() should not use " Denis V. Lunev
2008-08-22 23:15   ` Daniel Lezcano
2008-08-23  0:48     ` Herbert Xu
2008-08-23  9:12       ` Daniel Lezcano
2008-08-22 23:21   ` adobriyan
2008-08-23 11:45   ` David Miller

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=1219410757.31440.1.camel@iris.sw.ru \
    --to=den@openvz.org \
    --cc=adobriyan@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dlezcano@fr.ibm.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.