public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: DDD <Dongdong.deng@windriver.com>
Cc: David Miller <davem@davemloft.net>, Nicolas Pitre <nico@cam.org>,
	lkml <linux-kernel@vger.kernel.org>,
	netdev@vger.kernel.org, Jason Wessel <jason.wessel@windriver.com>
Subject: Re: [PATCH 2/2] drivers/net: fixed drivers that support netpoll use ndo_start_xmit()
Date: Fri, 21 Aug 2009 10:26:19 -0500	[thread overview]
Message-ID: <1250868379.3937.279.camel@calx> (raw)
In-Reply-To: <1250861693.24178.22.camel@dengdd-desktop>

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 <dongdong.deng@windriver.com>

Both of these look good to me, thanks.

Acked-by: Matt Mackall <mpm@selenic.com>

-- 
http://selenic.com : development and support for Mercurial and Linux

  reply	other threads:[~2009-08-21 15:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-21 13:33 [PATCH 1/2] netpoll: warning for ndo_start_xmit returns with interrupts enabled DDD
2009-08-21 13:34 ` [PATCH 2/2] drivers/net: fixed drivers that support netpoll use ndo_start_xmit() DDD
2009-08-21 15:26   ` Matt Mackall [this message]
2009-08-24  2:50   ` David Miller
2009-08-21 13:40 ` [RFC][PATCH] smc91x: let smc91x work well with netpoll DDD
2009-08-21 17:13   ` Nicolas Pitre
2009-08-24  3:42     ` [PATCH] [net] smc91x: let smc91x work well under netpoll DDD
2009-08-24  5:59       ` David Miller
2009-08-24  2:50 ` [PATCH 1/2] netpoll: warning for ndo_start_xmit returns with interrupts enabled David Miller

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=1250868379.3937.279.camel@calx \
    --to=mpm@selenic.com \
    --cc=Dongdong.deng@windriver.com \
    --cc=davem@davemloft.net \
    --cc=jason.wessel@windriver.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nico@cam.org \
    /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