public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: DDD <Dongdong.deng@windriver.com>
To: David Miller <davem@davemloft.net>, mpm@selenic.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bruce.Ashfield@windriver.com, jason.wessel@windriver.com
Subject: Re: [PATCH] drivers/net: fixed drivers that support netpoll use ndo_start_xmit()
Date: Tue, 18 Aug 2009 13:59:26 +0800	[thread overview]
Message-ID: <1250575166.29401.183.camel@dengdd-desktop> (raw)
In-Reply-To: <20090814.163232.234331420.davem@davemloft.net>

On Fri, 2009-08-14 at 16:32 -0700, David Miller wrote:
> From: Matt Mackall <mpm@selenic.com>
> Date: Fri, 14 Aug 2009 10:33:39 -0500
> 
> > On Fri, 2009-08-14 at 13:12 +0800, DDD wrote:
> >> The NETPOLL API requires that interrupts remain disabled in
> >> netpoll_send_skb(). The use of spin_lock_irq() and
> spin_unlock_irq()
> >> in the NETPOLL API callbacks causes the interrupts to get enabled
> and
> >> can lead to kernel instability.
> >> 
> >> The solution is to use spin_lock_irqsave() and
> spin_unlock_restore()
> >> to prevent the irqs from getting enabled while in
> netpoll_send_skb().
> ...
> >> Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
> >> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
> >> Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>
> > 
> > Acked-by: Matt Mackall <mpm@selenic.com>
> 
> Applied, thanks everyone.
Thanks. :-)

> 
> > Perhaps we should also have a WARN_ONCE if start_xmit returns with
> > interrupts enabled?
> 
> Probably a good idea.
I think it is a good idea too, thanks for your suggestion, Matt.
I will do a tiny patch for it shortly.


Dongdong

      reply	other threads:[~2009-08-18  5:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-14  5:12 [PATCH] drivers/net: fixed drivers that support netpoll use ndo_start_xmit() DDD
2009-08-14 15:33 ` Matt Mackall
2009-08-14 23:32   ` David Miller
2009-08-18  5:59     ` DDD [this message]

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=1250575166.29401.183.camel@dengdd-desktop \
    --to=dongdong.deng@windriver.com \
    --cc=Bruce.Ashfield@windriver.com \
    --cc=davem@davemloft.net \
    --cc=jason.wessel@windriver.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=netdev@vger.kernel.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