Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1268074

Re: [PATCH] ip_tunnel: disable preemption when updating per-cpu tstats

From Hannes Frederic Sowa <hannes@stressinduktion.org>
Newsgroups linux.kernel
Subject Re: [PATCH] ip_tunnel: disable preemption when updating per-cpu tstats
Date 2015-11-12 17:30 +0100
Message-ID <qu2V3-2MB-1@gated-at.bofh.it> (permalink)
References <qu28G-2eq-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Nov 12, 2015, at 16:30, Jason A. Donenfeld wrote:
>  	if (err > 0) {
> -               struct pcpu_sw_netstats *tstats = this_cpu_ptr(stats);
> -
> +               struct pcpu_sw_netstats *tstats;
> +               preempt_disable();
> +               tstats = this_cpu_ptr(stats);

The canonical way is get_cpu_ptr(stats) / put_cpu_ptr.

Bye,
Hannes
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] ip_tunnel: disable preemption when updating per-cpu tstats "Jason A. Donenfeld" <Jason@zx2c4.com> - 2015-11-12 16:40 +0100
  Re: [PATCH] ip_tunnel: disable preemption when updating per-cpu tstats Hannes Frederic Sowa <hannes@stressinduktion.org> - 2015-11-12 17:30 +0100
    Re: [PATCH] ip_tunnel: disable preemption when updating per-cpu tstats "Jason A. Donenfeld" <Jason@zx2c4.com> - 2015-11-12 17:40 +0100
      Re: [PATCH] ip_tunnel: disable preemption when updating per-cpu tstats "Jason A. Donenfeld" <Jason@zx2c4.com> - 2015-11-12 18:00 +0100
  [PATCH v2] ip_tunnel: disable preemption when updating per-cpu tstats "Jason A. Donenfeld" <Jason@zx2c4.com> - 2015-11-12 17:40 +0100
    Re: [PATCH v2] ip_tunnel: disable preemption when updating per-cpu  tstats Hannes Frederic Sowa <hannes@stressinduktion.org> - 2015-11-16 11:10 +0100

csiph-web