From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752954AbcLGJhO (ORCPT ); Wed, 7 Dec 2016 04:37:14 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:42273 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752588AbcLGJhL (ORCPT ); Wed, 7 Dec 2016 04:37:11 -0500 Date: Wed, 7 Dec 2016 10:10:40 +0100 From: Sebastian Andrzej Siewior To: Steven Rostedt Cc: LKML , linux-rt-users , Thomas Gleixner , Clark Williams , "Luis Claudio R. Goncalves" , John Kacur Subject: Re: [PATCH RT] net: Have __napi_schedule_irqoff() disable interrupts on RT Message-ID: <20161207091040.qnx3znzpffobli7c@linutronix.de> References: <20161206175030.636989f0@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20161206175030.636989f0@gandalf.local.home> User-Agent: NeoMutt/20161126 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016-12-06 17:50:30 [-0500], Steven Rostedt wrote: > A customer hit a crash where the napi sd->poll_list became corrupted. > The customer had the bnx2x driver, which does a > __napi_schedule_irqoff() in its interrupt handler. Unfortunately, when > running with CONFIG_PREEMPT_RT_FULL, this interrupt handler is run as a > thread and is preemptable. The call to ____napi_schedule() must be done > with interrupts disabled to protect the per cpu softnet_data's > poll_list, which is protected by disabling interrupts (disabling > preemption is enough when all interrupts are threaded and > local_bh_disable() can't preempt). > > As bnx2x isn't the only driver that does this, the safest thing to do > is to make __napi_schedule_irqoff() call __napi_schedule() instead when > CONFIG_PREEMPT_RT_FULL is enabled, which will call local_irq_save() > before calling ____napi_schedule(). It would work RT wise. But don't have the same problem if you boot the kernel with threadirqs ? Sebastian