netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: idosch@mellanox.com
Cc: netdev@vger.kernel.org, nikolay@cumulusnetworks.com, mlxsw@mellanox.com
Subject: Re: [PATCH net] ip6mr: Do not call __IP6_INC_STATS() from preemptible context
Date: Mon, 04 Mar 2019 10:56:26 -0800 (PST)	[thread overview]
Message-ID: <20190304.105626.1023614167952594956.davem@davemloft.net> (raw)
In-Reply-To: <20190303073330.10698-1-idosch@mellanox.com>

From: Ido Schimmel <idosch@mellanox.com>
Date: Sun, 3 Mar 2019 07:34:57 +0000

> Similar to commit 44f49dd8b5a6 ("ipmr: fix possible race resulting from
> improper usage of IP_INC_STATS_BH() in preemptible context."), we cannot
> assume preemption is disabled when incrementing the counter and
> accessing a per-CPU variable.
> 
> Preemption can be enabled when we add a route in process context that
> corresponds to packets stored in the unresolved queue, which are then
> forwarded using this route [1].
> 
> Fix this by using IP6_INC_STATS() which takes care of disabling
> preemption on architectures where it is needed.
 ...
> Fixes: 0912ea38de61 ("[IPV6] MROUTE: Add stats in multicast routing module method ip6_mr_forward().")
> Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> Reported-by: Amit Cohen <amitc@mellanox.com>

Applied and queued up for -stable, thanks.

      reply	other threads:[~2019-03-04 18:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-03  7:34 [PATCH net] ip6mr: Do not call __IP6_INC_STATS() from preemptible context Ido Schimmel
2019-03-04 18:56 ` David Miller [this message]

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=20190304.105626.1023614167952594956.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=idosch@mellanox.com \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    /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).