• Sebastian Andrzej Siewior's avatar
    net: Use u64_stats_fetch_begin_irq() for stats fetch. · 278d3ba6
    Sebastian Andrzej Siewior authored
    On 32bit-UP u64_stats_fetch_begin() disables only preemption. If the
    reader is in preemptible context and the writer side
    (u64_stats_update_begin*()) runs in an interrupt context (IRQ or
    softirq) then the writer can update the stats during the read operation.
    This update remains undetected.
    
    Use u64_stats_fetch_begin_irq() to ensure the stats fetch on 32bit-UP
    are not interrupted by a writer. 32bit-SMP remains unaffected by this
    change.
    
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Catherine Sullivan <csully@google.com>
    Cc: David Awogbemila <awogbemila@google.com>
    Cc: Dimitris Michailidis <dmichail@fungible.com>
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
    Cc: Jakub Kicinski <kuba@kernel.org>
    Cc: Jeroen de Borst <jeroendb@google.com>
    Cc: Johannes Berg <johannes@sipsolutions.net>
    Cc: Linus Walleij <linus.walleij@linaro.org>
    Cc: Paolo Abeni <pabeni@redhat.com>
    Cc: Simon Horman <simon.horman@corigine.com>
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-wireless@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Cc: oss-drivers@corigine.com
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
    Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    278d3ba6
sta_info.c 75.5 KB