From: David Miller <davem@davemloft.net>
To: herbert@gondor.apana.org.au
Cc: adobriyan@gmail.com, den@openvz.org, 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 04:54:02 -0700 (PDT) [thread overview]
Message-ID: <20080822.045402.32679253.davem@davemloft.net> (raw)
In-Reply-To: <E1KW9c0-0002Kp-00@gondolin.me.apana.org.au>
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.
next prev parent reply other threads:[~2008-08-22 11:54 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 [this message]
2008-08-22 13:12 ` Denis V. Lunev
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=20080822.045402.32679253.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=adobriyan@gmail.com \
--cc=den@openvz.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).