From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755488AbZHUP1H (ORCPT ); Fri, 21 Aug 2009 11:27:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754822AbZHUP1G (ORCPT ); Fri, 21 Aug 2009 11:27:06 -0400 Received: from waste.org ([173.11.57.241]:55324 "EHLO waste.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754660AbZHUP1F (ORCPT ); Fri, 21 Aug 2009 11:27:05 -0400 Subject: Re: [PATCH 2/2] drivers/net: fixed drivers that support netpoll use ndo_start_xmit() From: Matt Mackall To: DDD Cc: David Miller , Nicolas Pitre , lkml , netdev@vger.kernel.org, Jason Wessel In-Reply-To: <1250861693.24178.22.camel@dengdd-desktop> References: <1250861616.24178.20.camel@dengdd-desktop> <1250861693.24178.22.camel@dengdd-desktop> Content-Type: text/plain Date: Fri, 21 Aug 2009 10:26:19 -0500 Message-Id: <1250868379.3937.279.camel@calx> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2009-08-21 at 21:34 +0800, DDD wrote: > The NETPOLL API requires that interrupts remain disabled in > netpoll_send_skb(). The use of "A functions set" in the NETPOLL API > callbacks causes the interrupts to get enabled and can lead to kernel > instability. > > The solution is to use "B functions set" to prevent the irqs from > getting enabled while in netpoll_send_skb(). > > A functions set: > local_irq_disable()/local_irq_enable() > spin_lock_irq()/spin_unlock_irq() > spin_trylock_irq()/spin_unlock_irq() > > B functions set: > local_irq_save()/local_irq_restore() > spin_lock_irqsave()/spin_unlock_irqrestore() > spin_trylock_irqsave()/spin_unlock_irqrestore() > > Signed-off-by: Dongdong Deng Both of these look good to me, thanks. Acked-by: Matt Mackall -- http://selenic.com : development and support for Mercurial and Linux