[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1250575166.29401.183.camel@dengdd-desktop>
Date: Tue, 18 Aug 2009 13:59:26 +0800
From: DDD <Dongdong.deng@...driver.com>
To: David Miller <davem@...emloft.net>, mpm@...enic.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Bruce.Ashfield@...driver.com, jason.wessel@...driver.com
Subject: Re: [PATCH] drivers/net: fixed drivers that support netpoll use
ndo_start_xmit()
On Fri, 2009-08-14 at 16:32 -0700, David Miller wrote:
> From: Matt Mackall <mpm@...enic.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@...driver.com>
> >> Signed-off-by: Jason Wessel <jason.wessel@...driver.com>
> >> Acked-by: Bruce Ashfield <bruce.ashfield@...driver.com>
> >
> > Acked-by: Matt Mackall <mpm@...enic.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists