lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1250678596.3937.182.camel@calx>
Date:	Wed, 19 Aug 2009 05:43:16 -0500
From:	Matt Mackall <mpm@...enic.com>
To:	DDD <Dongdong.deng@...driver.com>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH] netpoll: WARN_ONCE for start_xmit returns with
 interrupts enabled

On Wed, 2009-08-19 at 18:43 +0800, DDD wrote:
> The NETPOLL API requires that interrupts remain disabled in
> netpoll_send_skb().
> 
> Add a WARN_ONCE when ndo_start_xmit returns with interrupts enabled
> in netpoll_send_skb().
> 
> Signed-off-by: Dongdong Deng <dongdong.deng@...driver.com>
> ---
>  net/core/netpoll.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/net/core/netpoll.c b/net/core/netpoll.c
> index df30feb..d38103f 100644
> --- a/net/core/netpoll.c
> +++ b/net/core/netpoll.c
> @@ -319,6 +319,12 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
>  
>  			udelay(USEC_PER_POLL);
>  		}
> +
> +		WARN_ONCE(!irqs_disabled(),
> +			KERN_WARNING "netpoll_send_skb(): [net driver %s]"
> +			"ndo_start_xmit() shouldn't return with interrupts"
> +			"enabled!", dev->name);

Hmm, perhaps:

"netpoll_send_skb(): %s enabled interrupts in poll (%pF)\n",
dev->name, ops->ndo_start_xmit

That'll give us a real function name and maybe even a module name.

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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ