* [PATCH -stable 3.18, backport] ipmr: fix possible race resulting from improper usage of IP_INC_STATS_BH() in preemptible context.
@ 2015-11-03 0:40 Ani Sinha
2015-11-03 0:50 ` Eric Dumazet
0 siblings, 1 reply; 5+ messages in thread
From: Ani Sinha @ 2015-11-03 0:40 UTC (permalink / raw)
To: Sasha Levin, stable, netdev; +Cc: Eric Dumazet
[ Upstream commit 44f49dd8b5a606870a1f2 ]
Fixes the following kernel BUG :
BUG: using __this_cpu_add() in preemptible [00000000] code: bash/2758
caller is __this_cpu_preempt_check+0x13/0x15
CPU: 0 PID: 2758 Comm: bash Tainted: P O 3.18.19 #2
ffffffff8170eaca ffff880110d1b788 ffffffff81482b2a 0000000000000000
0000000000000000 ffff880110d1b7b8 ffffffff812010ae ffff880007cab800
ffff88001a060800 ffff88013a899108 ffff880108b84240 ffff880110d1b7c8
Call Trace:
[<ffffffff81482b2a>] dump_stack+0x52/0x80
[<ffffffff812010ae>] check_preemption_disabled+0xce/0xe1
[<ffffffff812010d4>] __this_cpu_preempt_check+0x13/0x15
[<ffffffff81419d60>] ipmr_queue_xmit+0x647/0x70c
[<ffffffff8141a154>] ip_mr_forward+0x32f/0x34e
[<ffffffff8141af76>] ip_mroute_setsockopt+0xe03/0x108c
[<ffffffff810553fc>] ? get_parent_ip+0x11/0x42
[<ffffffff810e6974>] ? pollwake+0x4d/0x51
[<ffffffff81058ac0>] ? default_wake_function+0x0/0xf
[<ffffffff810553fc>] ? get_parent_ip+0x11/0x42
[<ffffffff810613d9>] ? __wake_up_common+0x45/0x77
[<ffffffff81486ea9>] ? _raw_spin_unlock_irqrestore+0x1d/0x32
[<ffffffff810618bc>] ? __wake_up_sync_key+0x4a/0x53
[<ffffffff8139a519>] ? sock_def_readable+0x71/0x75
[<ffffffff813dd226>] do_ip_setsockopt+0x9d/0xb55
[<ffffffff81429818>] ? unix_seqpacket_sendmsg+0x3f/0x41
[<ffffffff813963fe>] ? sock_sendmsg+0x6d/0x86
[<ffffffff813959d4>] ? sockfd_lookup_light+0x12/0x5d
[<ffffffff8139650a>] ? SyS_sendto+0xf3/0x11b
[<ffffffff810d5738>] ? new_sync_read+0x82/0xaa
[<ffffffff813ddd19>] compat_ip_setsockopt+0x3b/0x99
[<ffffffff813fb24a>] compat_raw_setsockopt+0x11/0x32
[<ffffffff81399052>] compat_sock_common_setsockopt+0x18/0x1f
[<ffffffff813c4d05>] compat_SyS_setsockopt+0x1a9/0x1cf
[<ffffffff813c4149>] compat_SyS_socketcall+0x180/0x1e3
[<ffffffff81488ea1>] cstar_dispatch+0x7/0x1e
Signed-off-by: Ani Sinha <ani@arista.com>
---
net/ipv4/ipmr.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index c803458..a1fc97a 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -1674,8 +1674,8 @@ static inline int ipmr_forward_finish(struct sk_buff *skb)
{
struct ip_options *opt = &(IPCB(skb)->opt);
- IP_INC_STATS_BH(dev_net(skb_dst(skb)->dev), IPSTATS_MIB_OUTFORWDATAGRAMS);
- IP_ADD_STATS_BH(dev_net(skb_dst(skb)->dev), IPSTATS_MIB_OUTOCTETS, skb->len);
+ IP_INC_STATS(dev_net(skb_dst(skb)->dev), IPSTATS_MIB_OUTFORWDATAGRAMS);
+ IP_ADD_STATS(dev_net(skb_dst(skb)->dev), IPSTATS_MIB_OUTOCTETS, skb->len);
if (unlikely(opt->optlen))
ip_forward_options(skb);
@@ -1737,7 +1737,7 @@ static void ipmr_queue_xmit(struct net *net, struct mr_table *mrt,
* to blackhole.
*/
- IP_INC_STATS_BH(dev_net(dev), IPSTATS_MIB_FRAGFAILS);
+ IP_INC_STATS(dev_net(dev), IPSTATS_MIB_FRAGFAILS);
ip_rt_put(rt);
goto out_free;
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH -stable 3.18, backport] ipmr: fix possible race resulting from improper usage of IP_INC_STATS_BH() in preemptible context.
2015-11-03 0:40 [PATCH -stable 3.18, backport] ipmr: fix possible race resulting from improper usage of IP_INC_STATS_BH() in preemptible context Ani Sinha
@ 2015-11-03 0:50 ` Eric Dumazet
2015-11-03 1:21 ` Ani Sinha
2015-11-03 3:32 ` Ani Sinha
0 siblings, 2 replies; 5+ messages in thread
From: Eric Dumazet @ 2015-11-03 0:50 UTC (permalink / raw)
To: Ani Sinha; +Cc: Sasha Levin, stable, netdev, Eric Dumazet
On Mon, 2015-11-02 at 16:40 -0800, Ani Sinha wrote:
> [ Upstream commit 44f49dd8b5a606870a1f2 ]
Please carefully read Documentation/networking/netdev-FAQ.txt
A: Normally Greg Kroah-Hartman collects stable commits himself, but
for networking, Dave collects up patches he deems critical for the
networking subsystem, and then hands them off to Greg.
There is a patchworks queue that you can see here:
http://patchwork.ozlabs.org/bundle/davem/stable/?state=*
It contains the patches which Dave has selected, but not yet handed
off to Greg. If Greg already has the patch, then it will be here:
http://git.kernel.org/cgit/linux/kernel/git/stable/stable-queue.git
A quick way to find whether the patch is in this stable-queue is
to simply clone the repo, and then git grep the mainline commit ID, e.g.
stable-queue$ git grep -l 284041ef21fdf2e
releases/3.0.84/ipv6-fix-possible-crashes-in-ip6_cork_release.patch
releases/3.4.51/ipv6-fix-possible-crashes-in-ip6_cork_release.patch
releases/3.9.8/ipv6-fix-possible-crashes-in-ip6_cork_release.patch
stable/stable-queue$
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -stable 3.18, backport] ipmr: fix possible race resulting from improper usage of IP_INC_STATS_BH() in preemptible context.
2015-11-03 0:50 ` Eric Dumazet
@ 2015-11-03 1:21 ` Ani Sinha
2015-11-03 3:32 ` Ani Sinha
1 sibling, 0 replies; 5+ messages in thread
From: Ani Sinha @ 2015-11-03 1:21 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Sasha Levin, stable, netdev@vger.kernel.org, Eric Dumazet
On Mon, Nov 2, 2015 at 4:50 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Mon, 2015-11-02 at 16:40 -0800, Ani Sinha wrote:
>> [ Upstream commit 44f49dd8b5a606870a1f2 ]
>
> Please carefully read Documentation/networking/netdev-FAQ.txt
>
> A: Normally Greg Kroah-Hartman collects stable commits himself, but
> for networking, Dave collects up patches he deems critical for the
> networking subsystem, and then hands them off to Greg.
>
> There is a patchworks queue that you can see here:
> http://patchwork.ozlabs.org/bundle/davem/stable/?state=*
>
> It contains the patches which Dave has selected, but not yet handed
> off to Greg. If Greg already has the patch, then it will be here:
> http://git.kernel.org/cgit/linux/kernel/git/stable/stable-queue.git
>
> A quick way to find whether the patch is in this stable-queue is
> to simply clone the repo, and then git grep the mainline commit ID, e.g.
>
> stable-queue$ git grep -l 284041ef21fdf2e
> releases/3.0.84/ipv6-fix-possible-crashes-in-ip6_cork_release.patch
> releases/3.4.51/ipv6-fix-possible-crashes-in-ip6_cork_release.patch
> releases/3.9.8/ipv6-fix-possible-crashes-in-ip6_cork_release.patch
> stable/stable-queue$
Ah cool! Thanks for the pointer. Seems its already queued up for other
stable kernel version trains :-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -stable 3.18, backport] ipmr: fix possible race resulting from improper usage of IP_INC_STATS_BH() in preemptible context.
2015-11-03 0:50 ` Eric Dumazet
2015-11-03 1:21 ` Ani Sinha
@ 2015-11-03 3:32 ` Ani Sinha
2015-11-03 3:48 ` Sasha Levin
1 sibling, 1 reply; 5+ messages in thread
From: Ani Sinha @ 2015-11-03 3:32 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Sasha Levin, stable, netdev@vger.kernel.org, Eric Dumazet
On Mon, Nov 2, 2015 at 4:50 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Mon, 2015-11-02 at 16:40 -0800, Ani Sinha wrote:
>> [ Upstream commit 44f49dd8b5a606870a1f2 ]
>
> Please carefully read Documentation/networking/netdev-FAQ.txt
I don't see any recent releases of 3.18 version series in Greg KH's
tree. Is the 3.18 stable train being maintained by Sasha here?
http://git.kernel.org/cgit/linux/kernel/git/sashal/linux-stable.git/
If that is the case, should 3.18 specific backport patches be sent
directly to him ?
>
> A: Normally Greg Kroah-Hartman collects stable commits himself, but
> for networking, Dave collects up patches he deems critical for the
> networking subsystem, and then hands them off to Greg.
>
> There is a patchworks queue that you can see here:
> http://patchwork.ozlabs.org/bundle/davem/stable/?state=*
>
> It contains the patches which Dave has selected, but not yet handed
> off to Greg. If Greg already has the patch, then it will be here:
> http://git.kernel.org/cgit/linux/kernel/git/stable/stable-queue.git
>
> A quick way to find whether the patch is in this stable-queue is
> to simply clone the repo, and then git grep the mainline commit ID, e.g.
>
> stable-queue$ git grep -l 284041ef21fdf2e
> releases/3.0.84/ipv6-fix-possible-crashes-in-ip6_cork_release.patch
> releases/3.4.51/ipv6-fix-possible-crashes-in-ip6_cork_release.patch
> releases/3.9.8/ipv6-fix-possible-crashes-in-ip6_cork_release.patch
> stable/stable-queue$
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -stable 3.18, backport] ipmr: fix possible race resulting from improper usage of IP_INC_STATS_BH() in preemptible context.
2015-11-03 3:32 ` Ani Sinha
@ 2015-11-03 3:48 ` Sasha Levin
0 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2015-11-03 3:48 UTC (permalink / raw)
To: Ani Sinha, Eric Dumazet; +Cc: stable, netdev@vger.kernel.org, Eric Dumazet
On 11/02/2015 10:32 PM, Ani Sinha wrote:
> On Mon, Nov 2, 2015 at 4:50 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>> > On Mon, 2015-11-02 at 16:40 -0800, Ani Sinha wrote:
>>> >> [ Upstream commit 44f49dd8b5a606870a1f2 ]
>> >
>> > Please carefully read Documentation/networking/netdev-FAQ.txt
> I don't see any recent releases of 3.18 version series in Greg KH's
> tree. Is the 3.18 stable train being maintained by Sasha here?
>
> http://git.kernel.org/cgit/linux/kernel/git/sashal/linux-stable.git/
>
> If that is the case, should 3.18 specific backport patches be sent
> directly to him ?
The documentation is a bit lacking here. I follow the same procedure
as Greg: Dave sends us backports for patches he picks for -stable and
I apply them.
The only difference is that my (currently empty) queue is located elsewhere:
https://git.kernel.org/cgit/linux/kernel/git/sashal/linux-stable.git/log/?h=linux-3.18.y-queue
To sum it up, no need to send anything regarding -stable net/ to anyone,
Dave does all the heavy lifting there (thanks Dave!).
Thanks,
Sasha
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-11-03 3:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-03 0:40 [PATCH -stable 3.18, backport] ipmr: fix possible race resulting from improper usage of IP_INC_STATS_BH() in preemptible context Ani Sinha
2015-11-03 0:50 ` Eric Dumazet
2015-11-03 1:21 ` Ani Sinha
2015-11-03 3:32 ` Ani Sinha
2015-11-03 3:48 ` Sasha Levin
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).