Commit b0f6c9ac authored by Wander Lairson Costa's avatar Wander Lairson Costa Committed by David S. Miller

netpoll: don't require irqs disabled in rt kernels

write_msg(netconsole.c:836) calls netpoll_send_udp after a call to
spin_lock_irqsave, which normally disables interrupts; but in PREEMPT_RT
this call just locks an rt_mutex without disabling irqs. In this case,
netpoll_send_udp is called with interrupts enabled.
Signed-off-by: default avatarWander Lairson Costa <wander@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a20af95f
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <net/ip6_checksum.h> #include <net/ip6_checksum.h>
#include <asm/unaligned.h> #include <asm/unaligned.h>
#include <trace/events/napi.h> #include <trace/events/napi.h>
#include <linux/kconfig.h>
/* /*
* We maintain a small pool of fully-sized skbs, to make sure the * We maintain a small pool of fully-sized skbs, to make sure the
...@@ -389,7 +390,8 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len) ...@@ -389,7 +390,8 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
static atomic_t ip_ident; static atomic_t ip_ident;
struct ipv6hdr *ip6h; struct ipv6hdr *ip6h;
WARN_ON_ONCE(!irqs_disabled()); if (!IS_ENABLED(CONFIG_PREEMPT_RT))
WARN_ON_ONCE(!irqs_disabled());
udp_len = len + sizeof(*udph); udp_len = len + sizeof(*udph);
if (np->ipv6) if (np->ipv6)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment