Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH net] udp_tunnel: drop packets when hibernating
@ 2026-10-08 12:40 Jason A. Donenfeld
  2026-10-08 12:46 ` netdev-bot+sinfo
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Jason A. Donenfeld @ 2026-10-08 12:40 UTC (permalink / raw)
  To: rafael, lenb, pavel, willemdebruijn.kernel, kuba, pabeni,
	linux-pm, netdev, linux-kernel
  Cc: Jason A. Donenfeld, stable, Jérémy Jean

The kernel's various networking applications keep churning away after
userspace is frozen during hibernation, even as a memory snapshot is
being made. This can lead many network applications to an inconsistent
state, replaying packets and cryptographic state changes. For example,
on wireguard, there's the possibility of this sequence:

1) hibernating begins
2) handshake state cleared
3) keypairs cleared
4) new handshake round trip completes
5) machine memory is snapshotted
6) packet is sent using new keypair
7) machine is restored to state (5)
8) packet is sent using new keypair

The idea is to prevent (6) from happening, especially if (6) and (8)
contain different data, but the same key and nonce. Presumably the same
issue applies to other users of udp_tunnel too.

Fix this by just dropping sending and receiving packets during the
hibernation sequence.

Cc: stable@vger.kernel.org
Reported-by: Jérémy Jean <jeremy.jean@oss.cyber.gouv.fr>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
I wrote this patch in response to the issue Jérémy raised, but I'm not
actually super familiar with all of the hibernation mechanics. If
somebody working on PM would think about this matter too, I'd be much
obliged.

 include/linux/freezer.h    | 1 +
 net/ipv4/udp.c             | 5 +++++
 net/ipv4/udp_tunnel_core.c | 5 +++++
 net/ipv6/ip6_udp_tunnel.c  | 5 +++++
 net/ipv6/udp.c             | 5 +++++
 5 files changed, 21 insertions(+)

diff --git a/include/linux/freezer.h b/include/linux/freezer.h
index 0a8c6c4d1a82..21d708dc4092 100644
--- a/include/linux/freezer.h
+++ b/include/linux/freezer.h
@@ -76,6 +76,7 @@ static inline bool cgroup1_freezing(struct task_struct *task)
 #endif /* !CONFIG_CGROUP_FREEZER */
 
 #else /* !CONFIG_FREEZER */
+#define pm_freezing (false)
 static inline bool frozen(struct task_struct *p) { return false; }
 static inline bool freezing(struct task_struct *p) { return false; }
 static inline void __thaw_task(struct task_struct *t) {}
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index b090bd1f59e8..5021932ad9f1 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -95,6 +95,7 @@
 #include <linux/netdevice.h>
 #include <linux/slab.h>
 #include <linux/sock_diag.h>
+#include <linux/freezer.h>
 #include <net/tcp_states.h>
 #include <linux/skbuff.h>
 #include <linux/proc_fs.h>
@@ -2425,6 +2426,10 @@ static int udp_queue_rcv_one_skb(struct sock *sk, struct sk_buff *skb)
 		if (encap_rcv) {
 			int ret;
 
+			/* Drop if we're hibernating */
+			if (unlikely(pm_freezing))
+				goto drop;
+
 			/* Verify checksum before giving to encap */
 			if (udp_lib_checksum_complete(skb))
 				goto csum_error;
diff --git a/net/ipv4/udp_tunnel_core.c b/net/ipv4/udp_tunnel_core.c
index a128fe85620d..e3666ed96af7 100644
--- a/net/ipv4/udp_tunnel_core.c
+++ b/net/ipv4/udp_tunnel_core.c
@@ -3,6 +3,7 @@
 #include <linux/errno.h>
 #include <linux/socket.h>
 #include <linux/kernel.h>
+#include <linux/freezer.h>
 #include <net/dst_metadata.h>
 #include <net/flow.h>
 #include <net/udp.h>
@@ -172,6 +173,10 @@ void udp_tunnel_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb
 {
 	struct udphdr *uh;
 
+	/* Drop if we're hibernating */
+	if (unlikely(pm_freezing))
+		return;
+
 	__skb_push(skb, sizeof(*uh));
 	skb_reset_transport_header(skb);
 	uh = udp_hdr(skb);
diff --git a/net/ipv6/ip6_udp_tunnel.c b/net/ipv6/ip6_udp_tunnel.c
index 32525a051a6f..4a31e8cc8887 100644
--- a/net/ipv6/ip6_udp_tunnel.c
+++ b/net/ipv6/ip6_udp_tunnel.c
@@ -7,6 +7,7 @@
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/in6.h>
+#include <linux/freezer.h>
 #include <net/udp.h>
 #include <net/udp_tunnel.h>
 #include <net/net_namespace.h>
@@ -86,6 +87,10 @@ void udp_tunnel6_xmit_skb(struct dst_entry *dst, struct sock *sk,
 	struct udphdr *uh;
 	struct ipv6hdr *ip6h;
 
+	/* Drop if we're hibernating */
+	if (unlikely(pm_freezing))
+		return;
+
 	__skb_push(skb, sizeof(*uh));
 	skb_reset_transport_header(skb);
 	uh = udp_hdr(skb);
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 93478d1ad576..db9c2050887d 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -34,6 +34,7 @@
 #include <linux/slab.h>
 #include <linux/uaccess.h>
 #include <linux/indirect_call_wrapper.h>
+#include <linux/freezer.h>
 #include <trace/events/udp.h>
 
 #include <net/addrconf.h>
@@ -848,6 +849,10 @@ static int udpv6_queue_rcv_one_skb(struct sock *sk, struct sk_buff *skb)
 		if (encap_rcv) {
 			int ret;
 
+			/* Drop if we're hibernating */
+			if (unlikely(pm_freezing))
+				goto drop;
+
 			/* Verify checksum before giving to encap */
 			if (udp_lib_checksum_complete(skb))
 				goto csum_error;
-- 
2.56.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH net] udp_tunnel: drop packets when hibernating
  2026-10-08 12:40 [PATCH net] udp_tunnel: drop packets when hibernating Jason A. Donenfeld
@ 2026-10-08 12:46 ` netdev-bot+sinfo
  2026-10-08 12:47   ` Jason A. Donenfeld
  2026-10-08 18:37 ` Willem de Bruijn
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: netdev-bot+sinfo @ 2026-10-08 12:46 UTC (permalink / raw)
  To: Jason A. Donenfeld
  Cc: rafael, lenb, pavel, willemdebruijn.kernel, kuba, pabeni,
	linux-pm, netdev, linux-kernel, stable, Jérémy Jean

Hi!

This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:

 - Whether the issue was actually triggered, or is only theoretical
   (e.g. found by code inspection). If it was triggered please include
   the symptoms, like the stack trace or error messages.

Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account. If the series needs another revision for
other reasons, please include the information in the commit messages
then.

The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net] udp_tunnel: drop packets when hibernating
  2026-10-08 12:46 ` netdev-bot+sinfo
@ 2026-10-08 12:47   ` Jason A. Donenfeld
  2026-10-08 16:26     ` Jérémy Jean
  0 siblings, 1 reply; 9+ messages in thread
From: Jason A. Donenfeld @ 2026-10-08 12:47 UTC (permalink / raw)
  To: netdev-bot+sinfo
  Cc: rafael, lenb, pavel, willemdebruijn.kernel, kuba, pabeni,
	linux-pm, netdev, linux-kernel, stable, Jérémy Jean

On Thu, Oct 8, 2026 at 2:46 PM <netdev-bot+sinfo@kernel.org> wrote:
> This is an automated message. This series looks like a fix, but its
> commit messages seem to be missing some information:
>
>  - Whether the issue was actually triggered, or is only theoretical
>    (e.g. found by code inspection). If it was triggered please include
>    the symptoms, like the stack trace or error messages.

Yea, I really have no idea. That's for Jérémy to elucidate.

Jason

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net] udp_tunnel: drop packets when hibernating
  2026-10-08 12:47   ` Jason A. Donenfeld
@ 2026-10-08 16:26     ` Jérémy Jean
  0 siblings, 0 replies; 9+ messages in thread
From: Jérémy Jean @ 2026-10-08 16:26 UTC (permalink / raw)
  To: Jason A. Donenfeld
  Cc: netdev-bot+sinfo, rafael, lenb, pavel, willemdebruijn.kernel,
	kuba, pabeni, linux-pm, netdev, linux-kernel, stable

On 2026-10-08 14:47, Jason A. Donenfeld wrote:
> On Thu, Oct 8, 2026 at 2:46 PM <netdev-bot+sinfo@kernel.org> wrote:
>> This is an automated message. This series looks like a fix, but its
>> commit messages seem to be missing some information:
>> 
>>  - Whether the issue was actually triggered, or is only theoretical
>>    (e.g. found by code inspection). If it was triggered please include
>>    the symptoms, like the stack trace or error messages.
> 
> Yea, I really have no idea. That's for Jérémy to elucidate.
> 
> Jason

Yes, the bug was actually triggered.
It was found by code inspection with help from a LLM.

Jérémy

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net] udp_tunnel: drop packets when hibernating
  2026-10-08 12:40 [PATCH net] udp_tunnel: drop packets when hibernating Jason A. Donenfeld
  2026-10-08 12:46 ` netdev-bot+sinfo
@ 2026-10-08 18:37 ` Willem de Bruijn
  2026-10-08 19:58   ` Jason A. Donenfeld
  2026-10-09  1:57 ` kernel test robot
  2026-10-09  4:06 ` kernel test robot
  3 siblings, 1 reply; 9+ messages in thread
From: Willem de Bruijn @ 2026-10-08 18:37 UTC (permalink / raw)
  To: Jason A. Donenfeld, rafael, lenb, pavel, willemdebruijn.kernel,
	kuba, pabeni, linux-pm, netdev, linux-kernel
  Cc: Jason A. Donenfeld, stable, Jérémy Jean

Jason A. Donenfeld wrote:
> The kernel's various networking applications keep churning away after
> userspace is frozen during hibernation, even as a memory snapshot is
> being made. This can lead many network applications to an inconsistent
> state, replaying packets and cryptographic state changes. For example,
> on wireguard, there's the possibility of this sequence:
> 
> 1) hibernating begins
> 2) handshake state cleared
> 3) keypairs cleared
> 4) new handshake round trip completes
> 5) machine memory is snapshotted
> 6) packet is sent using new keypair
> 7) machine is restored to state (5)
> 8) packet is sent using new keypair
> 
> The idea is to prevent (6) from happening, especially if (6) and (8)
> contain different data, but the same key and nonce. Presumably the same
> issue applies to other users of udp_tunnel too.
> 
> Fix this by just dropping sending and receiving packets during the
> hibernation sequence.

A few high level questions:

If the issue is reuse of key + nonce during send, why include receive
side functions? Specifically tunnel (encap_rcv) functions.

Is this a problem specific to UDP tunnels?
 
> Cc: stable@vger.kernel.org
> Reported-by: Jérémy Jean <jeremy.jean@oss.cyber.gouv.fr>
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> ---
> I wrote this patch in response to the issue Jérémy raised, but I'm not
> actually super familiar with all of the hibernation mechanics. If
> somebody working on PM would think about this matter too, I'd be much
> obliged.
> 
>  include/linux/freezer.h    | 1 +
>  net/ipv4/udp.c             | 5 +++++
>  net/ipv4/udp_tunnel_core.c | 5 +++++
>  net/ipv6/ip6_udp_tunnel.c  | 5 +++++
>  net/ipv6/udp.c             | 5 +++++
>  5 files changed, 21 insertions(+)
> 
> diff --git a/include/linux/freezer.h b/include/linux/freezer.h
> index 0a8c6c4d1a82..21d708dc4092 100644
> --- a/include/linux/freezer.h
> +++ b/include/linux/freezer.h
> @@ -76,6 +76,7 @@ static inline bool cgroup1_freezing(struct task_struct *task)
>  #endif /* !CONFIG_CGROUP_FREEZER */
>  
>  #else /* !CONFIG_FREEZER */
> +#define pm_freezing (false)
>  static inline bool frozen(struct task_struct *p) { return false; }
>  static inline bool freezing(struct task_struct *p) { return false; }
>  static inline void __thaw_task(struct task_struct *t) {}
> diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
> index b090bd1f59e8..5021932ad9f1 100644
> --- a/net/ipv4/udp.c
> +++ b/net/ipv4/udp.c
> @@ -95,6 +95,7 @@
>  #include <linux/netdevice.h>
>  #include <linux/slab.h>
>  #include <linux/sock_diag.h>
> +#include <linux/freezer.h>
>  #include <net/tcp_states.h>
>  #include <linux/skbuff.h>
>  #include <linux/proc_fs.h>
> @@ -2425,6 +2426,10 @@ static int udp_queue_rcv_one_skb(struct sock *sk, struct sk_buff *skb)
>  		if (encap_rcv) {
>  			int ret;
>  
> +			/* Drop if we're hibernating */
> +			if (unlikely(pm_freezing))
> +				goto drop;
> +
>  			/* Verify checksum before giving to encap */
>  			if (udp_lib_checksum_complete(skb))
>  				goto csum_error;
> diff --git a/net/ipv4/udp_tunnel_core.c b/net/ipv4/udp_tunnel_core.c
> index a128fe85620d..e3666ed96af7 100644
> --- a/net/ipv4/udp_tunnel_core.c
> +++ b/net/ipv4/udp_tunnel_core.c
> @@ -3,6 +3,7 @@
>  #include <linux/errno.h>
>  #include <linux/socket.h>
>  #include <linux/kernel.h>
> +#include <linux/freezer.h>
>  #include <net/dst_metadata.h>
>  #include <net/flow.h>
>  #include <net/udp.h>
> @@ -172,6 +173,10 @@ void udp_tunnel_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb
>  {
>  	struct udphdr *uh;
>  
> +	/* Drop if we're hibernating */
> +	if (unlikely(pm_freezing))
> +		return;
> +
>  	__skb_push(skb, sizeof(*uh));
>  	skb_reset_transport_header(skb);
>  	uh = udp_hdr(skb);
> diff --git a/net/ipv6/ip6_udp_tunnel.c b/net/ipv6/ip6_udp_tunnel.c
> index 32525a051a6f..4a31e8cc8887 100644
> --- a/net/ipv6/ip6_udp_tunnel.c
> +++ b/net/ipv6/ip6_udp_tunnel.c
> @@ -7,6 +7,7 @@
>  #include <linux/types.h>
>  #include <linux/kernel.h>
>  #include <linux/in6.h>
> +#include <linux/freezer.h>
>  #include <net/udp.h>
>  #include <net/udp_tunnel.h>
>  #include <net/net_namespace.h>
> @@ -86,6 +87,10 @@ void udp_tunnel6_xmit_skb(struct dst_entry *dst, struct sock *sk,
>  	struct udphdr *uh;
>  	struct ipv6hdr *ip6h;
>  
> +	/* Drop if we're hibernating */
> +	if (unlikely(pm_freezing))
> +		return;
> +
>  	__skb_push(skb, sizeof(*uh));
>  	skb_reset_transport_header(skb);
>  	uh = udp_hdr(skb);
> diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
> index 93478d1ad576..db9c2050887d 100644
> --- a/net/ipv6/udp.c
> +++ b/net/ipv6/udp.c
> @@ -34,6 +34,7 @@
>  #include <linux/slab.h>
>  #include <linux/uaccess.h>
>  #include <linux/indirect_call_wrapper.h>
> +#include <linux/freezer.h>
>  #include <trace/events/udp.h>
>  
>  #include <net/addrconf.h>
> @@ -848,6 +849,10 @@ static int udpv6_queue_rcv_one_skb(struct sock *sk, struct sk_buff *skb)
>  		if (encap_rcv) {
>  			int ret;
>  
> +			/* Drop if we're hibernating */
> +			if (unlikely(pm_freezing))
> +				goto drop;
> +
>  			/* Verify checksum before giving to encap */
>  			if (udp_lib_checksum_complete(skb))
>  				goto csum_error;
> -- 
> 2.56.0
> 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net] udp_tunnel: drop packets when hibernating
  2026-10-08 18:37 ` Willem de Bruijn
@ 2026-10-08 19:58   ` Jason A. Donenfeld
  2026-10-08 21:03     ` Willem de Bruijn
  0 siblings, 1 reply; 9+ messages in thread
From: Jason A. Donenfeld @ 2026-10-08 19:58 UTC (permalink / raw)
  To: Willem de Bruijn
  Cc: rafael, lenb, pavel, kuba, pabeni, linux-pm, netdev, linux-kernel,
	stable, Jérémy Jean

Hi Willem,

On Thu, Oct 8, 2026 at 8:37 PM Willem de Bruijn
<willemdebruijn.kernel@gmail.com> wrote:
> Jason A. Donenfeld wrote:
> > The kernel's various networking applications keep churning away after
> > userspace is frozen during hibernation, even as a memory snapshot is
> > being made. This can lead many network applications to an inconsistent
> > state, replaying packets and cryptographic state changes. For example,
> > on wireguard, there's the possibility of this sequence:
> >
> > 1) hibernating begins
> > 2) handshake state cleared
> > 3) keypairs cleared
> > 4) new handshake round trip completes
> > 5) machine memory is snapshotted
> > 6) packet is sent using new keypair
> > 7) machine is restored to state (5)
> > 8) packet is sent using new keypair
> >
> > The idea is to prevent (6) from happening, especially if (6) and (8)
> > contain different data, but the same key and nonce. Presumably the same
> > issue applies to other users of udp_tunnel too.
> >
> > Fix this by just dropping sending and receiving packets during the
> > hibernation sequence.
>
> A few high level questions:
>
> If the issue is reuse of key + nonce during send, why include receive
> side functions? Specifically tunnel (encap_rcv) functions.

Because I suppose (4) probably shouldn't be possible after (1). I
explicitly clear the result of (4) in a PM notifier. It seems wrong
for that to then be violated after. Similarly, userspace doesn't get
packets after that point either.

> Is this a problem specific to UDP tunnels?

The stateless nature makes it more poignant there.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net] udp_tunnel: drop packets when hibernating
  2026-10-08 19:58   ` Jason A. Donenfeld
@ 2026-10-08 21:03     ` Willem de Bruijn
  0 siblings, 0 replies; 9+ messages in thread
From: Willem de Bruijn @ 2026-10-08 21:03 UTC (permalink / raw)
  To: Jason A. Donenfeld
  Cc: rafael, lenb, pavel, kuba, pabeni, linux-pm, netdev, linux-kernel,
	stable, Jérémy Jean

On Thu, Oct 8, 2026 at 3:58 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
>
> Hi Willem,
>
> On Thu, Oct 8, 2026 at 8:37 PM Willem de Bruijn
> <willemdebruijn.kernel@gmail.com> wrote:
> > Jason A. Donenfeld wrote:
> > > The kernel's various networking applications keep churning away after
> > > userspace is frozen during hibernation, even as a memory snapshot is
> > > being made. This can lead many network applications to an inconsistent
> > > state, replaying packets and cryptographic state changes. For example,
> > > on wireguard, there's the possibility of this sequence:
> > >
> > > 1) hibernating begins
> > > 2) handshake state cleared
> > > 3) keypairs cleared
> > > 4) new handshake round trip completes
> > > 5) machine memory is snapshotted
> > > 6) packet is sent using new keypair
> > > 7) machine is restored to state (5)
> > > 8) packet is sent using new keypair
> > >
> > > The idea is to prevent (6) from happening, especially if (6) and (8)
> > > contain different data, but the same key and nonce. Presumably the same
> > > issue applies to other users of udp_tunnel too.
> > >
> > > Fix this by just dropping sending and receiving packets during the
> > > hibernation sequence.
> >
> > A few high level questions:
> >
> > If the issue is reuse of key + nonce during send, why include receive
> > side functions? Specifically tunnel (encap_rcv) functions.
>
> Because I suppose (4) probably shouldn't be possible after (1). I
> explicitly clear the result of (4) in a PM notifier. It seems wrong
> for that to then be violated after. Similarly, userspace doesn't get
> packets after that point either.

Since this is an issue specific with security protocols and reuse of
their state across freeze and restore, is that the more suitable
location for this check? Drop transmit of packets with that risk
(unique for that connection nonce) only, if freezing.

> > Is this a problem specific to UDP tunnels?
>
> The stateless nature makes it more poignant there.

udp_queue_rcv_one_skb is the UDP hot path. Since it touches all
packets, the last resort for adding checks that are relevant too only
a small subset of packets.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net] udp_tunnel: drop packets when hibernating
  2026-10-08 12:40 [PATCH net] udp_tunnel: drop packets when hibernating Jason A. Donenfeld
  2026-10-08 12:46 ` netdev-bot+sinfo
  2026-10-08 18:37 ` Willem de Bruijn
@ 2026-10-09  1:57 ` kernel test robot
  2026-10-09  4:06 ` kernel test robot
  3 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2026-10-09  1:57 UTC (permalink / raw)
  To: Jason A. Donenfeld, rafael, lenb, pavel, willemdebruijn.kernel,
	kuba, pabeni, linux-pm, netdev, linux-kernel
  Cc: oe-kbuild-all, Jason A. Donenfeld, stable, Jérémy Jean

Hi Jason,

kernel test robot noticed the following build errors:

[auto build test ERROR on net/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Jason-A-Donenfeld/udp_tunnel-drop-packets-when-hibernating/20261008-144021
base:   net/main
patch link:    https://lore.kernel.org/r/20261008124106.665014-1-Jason%40zx2c4.com
patch subject: [PATCH net] udp_tunnel: drop packets when hibernating
config: parisc-randconfig-1000-20261009 (https://download.01.org/0day-ci/archive/20261009/202610090909.eskhKpxA-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261009/202610090909.eskhKpxA-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610090909.eskhKpxA-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from include/linux/list.h:11,
                    from include/linux/kobject.h:19,
                    from include/linux/cdev.h:5,
                    from drivers/char/virtio_console.c:7:
   drivers/char/virtio_console.c: In function '__send_to_port':
>> include/linux/freezer.h:79:21: error: expected identifier before '(' token
    #define pm_freezing (false)
                        ^
   arch/parisc/include/asm/barrier.h:66:18: note: in definition of macro '__smp_load_acquire'
     union { typeof(*p) __val; char __c[1]; } __u;   \
                     ^
   drivers/char/virtio_console.c:636:6: note: in expansion of macro 'smp_load_acquire'
     if (smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
         ^~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:636:33: note: in expansion of macro 'pm_freezing'
     if (smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
                                    ^~~~~~~~~~~
>> include/linux/freezer.h:79:21: error: expected identifier before '(' token
    #define pm_freezing (false)
                        ^
   arch/parisc/include/asm/barrier.h:67:9: note: in definition of macro '__smp_load_acquire'
     typeof(p) __p = (p);      \
            ^
   drivers/char/virtio_console.c:636:6: note: in expansion of macro 'smp_load_acquire'
     if (smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
         ^~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:636:33: note: in expansion of macro 'pm_freezing'
     if (smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
                                    ^~~~~~~~~~~
>> include/linux/freezer.h:79:21: error: expected identifier before '(' token
    #define pm_freezing (false)
                        ^
   arch/parisc/include/asm/barrier.h:67:19: note: in definition of macro '__smp_load_acquire'
     typeof(p) __p = (p);      \
                      ^
   drivers/char/virtio_console.c:636:6: note: in expansion of macro 'smp_load_acquire'
     if (smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
         ^~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:636:33: note: in expansion of macro 'pm_freezing'
     if (smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
                                    ^~~~~~~~~~~
   In file included from <command-line>:
>> include/linux/freezer.h:79:21: error: expected identifier before '(' token
    #define pm_freezing (false)
                        ^
   include/linux/compiler_types.h:682:9: note: in definition of macro '__compiletime_assert'
      if (!(condition))     \
            ^~~~~~~~~
   include/linux/compiler_types.h:702:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:705:2: note: in expansion of macro 'compiletime_assert'
     compiletime_assert(__native_word(t),    \
     ^~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:705:21: note: in expansion of macro '__native_word'
     compiletime_assert(__native_word(t),    \
                        ^~~~~~~~~~~~~
   arch/parisc/include/asm/barrier.h:68:2: note: in expansion of macro 'compiletime_assert_atomic_type'
     compiletime_assert_atomic_type(*p);    \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/barrier.h:176:29: note: in expansion of macro '__smp_load_acquire'
    #define smp_load_acquire(p) __smp_load_acquire(p)
                                ^~~~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:636:6: note: in expansion of macro 'smp_load_acquire'
     if (smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
         ^~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:636:33: note: in expansion of macro 'pm_freezing'
     if (smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
                                    ^~~~~~~~~~~
>> include/linux/freezer.h:79:21: error: expected identifier before '(' token
    #define pm_freezing (false)
                        ^
   include/linux/compiler_types.h:682:9: note: in definition of macro '__compiletime_assert'
      if (!(condition))     \
            ^~~~~~~~~
   include/linux/compiler_types.h:702:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:705:2: note: in expansion of macro 'compiletime_assert'
     compiletime_assert(__native_word(t),    \
     ^~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:705:21: note: in expansion of macro '__native_word'
     compiletime_assert(__native_word(t),    \
                        ^~~~~~~~~~~~~
   arch/parisc/include/asm/barrier.h:68:2: note: in expansion of macro 'compiletime_assert_atomic_type'
     compiletime_assert_atomic_type(*p);    \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/barrier.h:176:29: note: in expansion of macro '__smp_load_acquire'
    #define smp_load_acquire(p) __smp_load_acquire(p)
                                ^~~~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:636:6: note: in expansion of macro 'smp_load_acquire'
     if (smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
         ^~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:636:33: note: in expansion of macro 'pm_freezing'
     if (smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
                                    ^~~~~~~~~~~
>> include/linux/freezer.h:79:21: error: expected identifier before '(' token
    #define pm_freezing (false)
                        ^
   include/linux/compiler_types.h:682:9: note: in definition of macro '__compiletime_assert'
      if (!(condition))     \
            ^~~~~~~~~
   include/linux/compiler_types.h:702:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:705:2: note: in expansion of macro 'compiletime_assert'
     compiletime_assert(__native_word(t),    \
     ^~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:705:21: note: in expansion of macro '__native_word'
     compiletime_assert(__native_word(t),    \
                        ^~~~~~~~~~~~~
   arch/parisc/include/asm/barrier.h:68:2: note: in expansion of macro 'compiletime_assert_atomic_type'
     compiletime_assert_atomic_type(*p);    \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/barrier.h:176:29: note: in expansion of macro '__smp_load_acquire'
    #define smp_load_acquire(p) __smp_load_acquire(p)
                                ^~~~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:636:6: note: in expansion of macro 'smp_load_acquire'
     if (smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
         ^~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:636:33: note: in expansion of macro 'pm_freezing'
     if (smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
                                    ^~~~~~~~~~~
>> include/linux/freezer.h:79:21: error: expected identifier before '(' token
    #define pm_freezing (false)
                        ^
   include/linux/compiler_types.h:682:9: note: in definition of macro '__compiletime_assert'
      if (!(condition))     \
            ^~~~~~~~~
   include/linux/compiler_types.h:702:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:705:2: note: in expansion of macro 'compiletime_assert'
     compiletime_assert(__native_word(t),    \
     ^~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:705:21: note: in expansion of macro '__native_word'
     compiletime_assert(__native_word(t),    \
                        ^~~~~~~~~~~~~
   arch/parisc/include/asm/barrier.h:68:2: note: in expansion of macro 'compiletime_assert_atomic_type'
     compiletime_assert_atomic_type(*p);    \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/barrier.h:176:29: note: in expansion of macro '__smp_load_acquire'
    #define smp_load_acquire(p) __smp_load_acquire(p)
                                ^~~~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:636:6: note: in expansion of macro 'smp_load_acquire'
     if (smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
         ^~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:636:33: note: in expansion of macro 'pm_freezing'
     if (smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
                                    ^~~~~~~~~~~
   In file included from include/linux/list.h:11,
                    from include/linux/kobject.h:19,
                    from include/linux/cdev.h:5,
                    from drivers/char/virtio_console.c:7:
>> include/linux/freezer.h:79:21: error: expected identifier before '(' token
    #define pm_freezing (false)
                        ^
   arch/parisc/include/asm/barrier.h:69:18: note: in definition of macro '__smp_load_acquire'
     switch (sizeof(*p)) {      \
                     ^
   drivers/char/virtio_console.c:636:6: note: in expansion of macro 'smp_load_acquire'
     if (smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
         ^~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:636:33: note: in expansion of macro 'pm_freezing'
     if (smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
                                    ^~~~~~~~~~~
   drivers/char/virtio_console.c: In function 'put_chars':
>> include/linux/freezer.h:79:21: error: expected identifier before '(' token
    #define pm_freezing (false)
                        ^
   arch/parisc/include/asm/barrier.h:66:18: note: in definition of macro '__smp_load_acquire'
     union { typeof(*p) __val; char __c[1]; } __u;   \
                     ^
   drivers/char/virtio_console.c:1173:6: note: in expansion of macro 'smp_load_acquire'
         smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
         ^~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:1173:33: note: in expansion of macro 'pm_freezing'
         smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
                                    ^~~~~~~~~~~
>> include/linux/freezer.h:79:21: error: expected identifier before '(' token
    #define pm_freezing (false)
                        ^
   arch/parisc/include/asm/barrier.h:67:9: note: in definition of macro '__smp_load_acquire'
     typeof(p) __p = (p);      \
            ^
   drivers/char/virtio_console.c:1173:6: note: in expansion of macro 'smp_load_acquire'
         smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
         ^~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:1173:33: note: in expansion of macro 'pm_freezing'
         smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
                                    ^~~~~~~~~~~
>> include/linux/freezer.h:79:21: error: expected identifier before '(' token
    #define pm_freezing (false)
                        ^
   arch/parisc/include/asm/barrier.h:67:19: note: in definition of macro '__smp_load_acquire'
     typeof(p) __p = (p);      \
                      ^
   drivers/char/virtio_console.c:1173:6: note: in expansion of macro 'smp_load_acquire'
         smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
         ^~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:1173:33: note: in expansion of macro 'pm_freezing'
         smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
                                    ^~~~~~~~~~~
   In file included from <command-line>:
>> include/linux/freezer.h:79:21: error: expected identifier before '(' token
    #define pm_freezing (false)
                        ^
   include/linux/compiler_types.h:682:9: note: in definition of macro '__compiletime_assert'
      if (!(condition))     \
            ^~~~~~~~~
   include/linux/compiler_types.h:702:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:705:2: note: in expansion of macro 'compiletime_assert'
     compiletime_assert(__native_word(t),    \
     ^~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:705:21: note: in expansion of macro '__native_word'
     compiletime_assert(__native_word(t),    \
                        ^~~~~~~~~~~~~
   arch/parisc/include/asm/barrier.h:68:2: note: in expansion of macro 'compiletime_assert_atomic_type'
     compiletime_assert_atomic_type(*p);    \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/barrier.h:176:29: note: in expansion of macro '__smp_load_acquire'
    #define smp_load_acquire(p) __smp_load_acquire(p)
                                ^~~~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:1173:6: note: in expansion of macro 'smp_load_acquire'
         smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
         ^~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:1173:33: note: in expansion of macro 'pm_freezing'
         smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
                                    ^~~~~~~~~~~
>> include/linux/freezer.h:79:21: error: expected identifier before '(' token
    #define pm_freezing (false)
                        ^
   include/linux/compiler_types.h:682:9: note: in definition of macro '__compiletime_assert'
      if (!(condition))     \
            ^~~~~~~~~
   include/linux/compiler_types.h:702:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:705:2: note: in expansion of macro 'compiletime_assert'
     compiletime_assert(__native_word(t),    \
     ^~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:705:21: note: in expansion of macro '__native_word'
     compiletime_assert(__native_word(t),    \
                        ^~~~~~~~~~~~~
   arch/parisc/include/asm/barrier.h:68:2: note: in expansion of macro 'compiletime_assert_atomic_type'
     compiletime_assert_atomic_type(*p);    \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/barrier.h:176:29: note: in expansion of macro '__smp_load_acquire'
    #define smp_load_acquire(p) __smp_load_acquire(p)
                                ^~~~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:1173:6: note: in expansion of macro 'smp_load_acquire'
         smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
         ^~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:1173:33: note: in expansion of macro 'pm_freezing'
         smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
                                    ^~~~~~~~~~~
>> include/linux/freezer.h:79:21: error: expected identifier before '(' token
    #define pm_freezing (false)
                        ^
   include/linux/compiler_types.h:682:9: note: in definition of macro '__compiletime_assert'
      if (!(condition))     \
            ^~~~~~~~~
   include/linux/compiler_types.h:702:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:705:2: note: in expansion of macro 'compiletime_assert'
     compiletime_assert(__native_word(t),    \
     ^~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:705:21: note: in expansion of macro '__native_word'
     compiletime_assert(__native_word(t),    \
                        ^~~~~~~~~~~~~
   arch/parisc/include/asm/barrier.h:68:2: note: in expansion of macro 'compiletime_assert_atomic_type'
     compiletime_assert_atomic_type(*p);    \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/barrier.h:176:29: note: in expansion of macro '__smp_load_acquire'
    #define smp_load_acquire(p) __smp_load_acquire(p)
                                ^~~~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:1173:6: note: in expansion of macro 'smp_load_acquire'
         smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
         ^~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:1173:33: note: in expansion of macro 'pm_freezing'
         smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
                                    ^~~~~~~~~~~
>> include/linux/freezer.h:79:21: error: expected identifier before '(' token
    #define pm_freezing (false)
                        ^
   include/linux/compiler_types.h:682:9: note: in definition of macro '__compiletime_assert'
      if (!(condition))     \
            ^~~~~~~~~
   include/linux/compiler_types.h:702:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:705:2: note: in expansion of macro 'compiletime_assert'
     compiletime_assert(__native_word(t),    \
     ^~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:705:21: note: in expansion of macro '__native_word'
     compiletime_assert(__native_word(t),    \
                        ^~~~~~~~~~~~~
   arch/parisc/include/asm/barrier.h:68:2: note: in expansion of macro 'compiletime_assert_atomic_type'
     compiletime_assert_atomic_type(*p);    \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/barrier.h:176:29: note: in expansion of macro '__smp_load_acquire'
    #define smp_load_acquire(p) __smp_load_acquire(p)
                                ^~~~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:1173:6: note: in expansion of macro 'smp_load_acquire'
         smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
         ^~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:1173:33: note: in expansion of macro 'pm_freezing'
         smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
                                    ^~~~~~~~~~~
   In file included from include/linux/list.h:11,
                    from include/linux/kobject.h:19,
                    from include/linux/cdev.h:5,
                    from drivers/char/virtio_console.c:7:
>> include/linux/freezer.h:79:21: error: expected identifier before '(' token
    #define pm_freezing (false)
                        ^
   arch/parisc/include/asm/barrier.h:69:18: note: in definition of macro '__smp_load_acquire'
     switch (sizeof(*p)) {      \
                     ^
   drivers/char/virtio_console.c:1173:6: note: in expansion of macro 'smp_load_acquire'
         smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
         ^~~~~~~~~~~~~~~~
   drivers/char/virtio_console.c:1173:33: note: in expansion of macro 'pm_freezing'
         smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
                                    ^~~~~~~~~~~
   In file included from drivers/char/virtio_console.c:12:
   drivers/char/virtio_console.c: In function 'virtcons_probe':
>> include/linux/freezer.h:79:21: error: expected identifier before '(' token
    #define pm_freezing (false)
                        ^
   drivers/char/virtio_console.c:2071:11: note: in expansion of macro 'pm_freezing'
     portdev->pm_freezing = false;
              ^~~~~~~~~~~


vim +79 include/linux/freezer.h

    77	
    78	#else /* !CONFIG_FREEZER */
  > 79	#define pm_freezing (false)
    80	static inline bool frozen(struct task_struct *p) { return false; }
    81	static inline bool freezing(struct task_struct *p) { return false; }
    82	static inline void __thaw_task(struct task_struct *t) {}
    83	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net] udp_tunnel: drop packets when hibernating
  2026-10-08 12:40 [PATCH net] udp_tunnel: drop packets when hibernating Jason A. Donenfeld
                   ` (2 preceding siblings ...)
  2026-10-09  1:57 ` kernel test robot
@ 2026-10-09  4:06 ` kernel test robot
  3 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2026-10-09  4:06 UTC (permalink / raw)
  To: Jason A. Donenfeld, rafael, lenb, pavel, willemdebruijn.kernel,
	kuba, pabeni, linux-pm, netdev, linux-kernel
  Cc: llvm, oe-kbuild-all, Jason A. Donenfeld, stable,
	Jérémy Jean

Hi Jason,

kernel test robot noticed the following build errors:

[auto build test ERROR on net/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Jason-A-Donenfeld/udp_tunnel-drop-packets-when-hibernating/20261008-144021
base:   net/main
patch link:    https://lore.kernel.org/r/20261008124106.665014-1-Jason%40zx2c4.com
patch subject: [PATCH net] udp_tunnel: drop packets when hibernating
config: s390-randconfig-1000-20261009 (https://download.01.org/0day-ci/archive/20261009/202610091149.zThf8fez-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261009/202610091149.zThf8fez-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610091149.zThf8fez-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/char/virtio_console.c:636:33: error: expected identifier
     636 |         if (smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
         |                                        ^
   include/linux/freezer.h:79:21: note: expanded from macro 'pm_freezing'
      79 | #define pm_freezing (false)
         |                     ^
>> drivers/char/virtio_console.c:636:33: error: expected identifier
   include/linux/freezer.h:79:21: note: expanded from macro 'pm_freezing'
      79 | #define pm_freezing (false)
         |                     ^
>> drivers/char/virtio_console.c:636:33: error: expected identifier
   include/linux/freezer.h:79:21: note: expanded from macro 'pm_freezing'
      79 | #define pm_freezing (false)
         |                     ^
>> drivers/char/virtio_console.c:636:33: error: expected identifier
   include/linux/freezer.h:79:21: note: expanded from macro 'pm_freezing'
      79 | #define pm_freezing (false)
         |                     ^
>> drivers/char/virtio_console.c:636:33: error: expected identifier
   include/linux/freezer.h:79:21: note: expanded from macro 'pm_freezing'
      79 | #define pm_freezing (false)
         |                     ^
>> drivers/char/virtio_console.c:636:33: error: expected identifier
   include/linux/freezer.h:79:21: note: expanded from macro 'pm_freezing'
      79 | #define pm_freezing (false)
         |                     ^
>> drivers/char/virtio_console.c:636:33: error: expected identifier
   include/linux/freezer.h:79:21: note: expanded from macro 'pm_freezing'
      79 | #define pm_freezing (false)
         |                     ^
>> drivers/char/virtio_console.c:636:33: error: expected identifier
   include/linux/freezer.h:79:21: note: expanded from macro 'pm_freezing'
      79 | #define pm_freezing (false)
         |                     ^
>> drivers/char/virtio_console.c:636:33: error: expected identifier
   include/linux/freezer.h:79:21: note: expanded from macro 'pm_freezing'
      79 | #define pm_freezing (false)
         |                     ^
>> drivers/char/virtio_console.c:636:33: error: expected identifier
   include/linux/freezer.h:79:21: note: expanded from macro 'pm_freezing'
      79 | #define pm_freezing (false)
         |                     ^
>> drivers/char/virtio_console.c:636:33: error: expected identifier
   include/linux/freezer.h:79:21: note: expanded from macro 'pm_freezing'
      79 | #define pm_freezing (false)
         |                     ^
>> drivers/char/virtio_console.c:636:33: error: expected identifier
   include/linux/freezer.h:79:21: note: expanded from macro 'pm_freezing'
      79 | #define pm_freezing (false)
         |                     ^
   drivers/char/virtio_console.c:1173:33: error: expected identifier
    1173 |             smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
         |                                        ^
   include/linux/freezer.h:79:21: note: expanded from macro 'pm_freezing'
      79 | #define pm_freezing (false)
         |                     ^
   drivers/char/virtio_console.c:1173:33: error: expected identifier
   include/linux/freezer.h:79:21: note: expanded from macro 'pm_freezing'
      79 | #define pm_freezing (false)
         |                     ^
   drivers/char/virtio_console.c:1173:33: error: expected identifier
   include/linux/freezer.h:79:21: note: expanded from macro 'pm_freezing'
      79 | #define pm_freezing (false)
         |                     ^
   drivers/char/virtio_console.c:1173:33: error: expected identifier
   include/linux/freezer.h:79:21: note: expanded from macro 'pm_freezing'
      79 | #define pm_freezing (false)
         |                     ^
   drivers/char/virtio_console.c:1173:33: error: expected identifier
   include/linux/freezer.h:79:21: note: expanded from macro 'pm_freezing'
      79 | #define pm_freezing (false)
         |                     ^
   drivers/char/virtio_console.c:1173:33: error: expected identifier
   include/linux/freezer.h:79:21: note: expanded from macro 'pm_freezing'
      79 | #define pm_freezing (false)
         |                     ^
   drivers/char/virtio_console.c:1173:33: error: expected identifier
   include/linux/freezer.h:79:21: note: expanded from macro 'pm_freezing'
      79 | #define pm_freezing (false)
         |                     ^
   fatal error: too many errors emitted, stopping now [-ferror-limit=]
   20 errors generated.


vim +636 drivers/char/virtio_console.c

cdfadfc1adb87fc Amit Shah          2010-05-19  608  
eb5e89fc70bb3f1 Masami Hiramatsu   2012-08-09  609  static ssize_t __send_to_port(struct port *port, struct scatterlist *sg,
eb5e89fc70bb3f1 Masami Hiramatsu   2012-08-09  610  			      int nents, size_t in_count,
fc220d6be3c7e48 Sungho Bae         2026-06-04  611  			      struct port_buffer *buf, bool nonblock)
f997f00bf8c3ddf Amit Shah          2009-12-21  612  {
f997f00bf8c3ddf Amit Shah          2009-12-21  613  	struct virtqueue *out_vq;
589575a23562b58 Rusty Russell      2012-10-16  614  	int err;
cdfadfc1adb87fc Amit Shah          2010-05-19  615  	unsigned long flags;
f997f00bf8c3ddf Amit Shah          2009-12-21  616  	unsigned int len;
a616ad344d9f7fe Sungho Bae         2026-06-04  617  	struct ports_device *portdev;
f997f00bf8c3ddf Amit Shah          2009-12-21  618  
cdfadfc1adb87fc Amit Shah          2010-05-19  619  	spin_lock_irqsave(&port->outvq_lock, flags);
cdfadfc1adb87fc Amit Shah          2010-05-19  620  
a616ad344d9f7fe Sungho Bae         2026-06-04  621  	portdev = READ_ONCE(port->portdev);
a616ad344d9f7fe Sungho Bae         2026-06-04  622  
a616ad344d9f7fe Sungho Bae         2026-06-04  623  	if (!portdev) {
a616ad344d9f7fe Sungho Bae         2026-06-04  624  		in_count = 0;
a616ad344d9f7fe Sungho Bae         2026-06-04  625  		goto free_and_done;
a616ad344d9f7fe Sungho Bae         2026-06-04  626  	}
a616ad344d9f7fe Sungho Bae         2026-06-04  627  
b187532ac6dba56 Sungho Bae         2026-06-04  628  	/*
b187532ac6dba56 Sungho Bae         2026-06-04  629  	 * Check freeze flag under the lock so that the flag check and
b187532ac6dba56 Sungho Bae         2026-06-04  630  	 * virtqueue_add_outbuf() are atomic with respect to
b187532ac6dba56 Sungho Bae         2026-06-04  631  	 * remove_port_data() which also takes outvq_lock.  This
b187532ac6dba56 Sungho Bae         2026-06-04  632  	 * guarantees that once remove_port_data() returns, no new
b187532ac6dba56 Sungho Bae         2026-06-04  633  	 * buffers can be added before remove_vqs() tears down the vq.
b187532ac6dba56 Sungho Bae         2026-06-04  634  	 * Pairs with smp_store_release() in virtcons_freeze/restore.
b187532ac6dba56 Sungho Bae         2026-06-04  635  	 */
b187532ac6dba56 Sungho Bae         2026-06-04 @636  	if (smp_load_acquire(&portdev->pm_freezing)) /* pairs with freeze/restore */
b187532ac6dba56 Sungho Bae         2026-06-04  637  		goto free_and_done;
b187532ac6dba56 Sungho Bae         2026-06-04  638  
a616ad344d9f7fe Sungho Bae         2026-06-04  639  	out_vq = port->out_vq;
a616ad344d9f7fe Sungho Bae         2026-06-04  640  
cdfadfc1adb87fc Amit Shah          2010-05-19  641  	reclaim_consumed_buffers(port);
cdfadfc1adb87fc Amit Shah          2010-05-19  642  
fc220d6be3c7e48 Sungho Bae         2026-06-04  643  	err = virtqueue_add_outbuf(out_vq, sg, nents, buf, GFP_ATOMIC);
f997f00bf8c3ddf Amit Shah          2009-12-21  644  
f997f00bf8c3ddf Amit Shah          2009-12-21  645  	/* Tell Host to go! */
505b0451c47699c Michael S. Tsirkin 2010-04-12  646  	virtqueue_kick(out_vq);
f997f00bf8c3ddf Amit Shah          2009-12-21  647  
589575a23562b58 Rusty Russell      2012-10-16  648  	if (err) {
9ff4cfab82d27e9 Rusty Russell      2010-04-08  649  		in_count = 0;
fc220d6be3c7e48 Sungho Bae         2026-06-04  650  		goto free_and_done;
f997f00bf8c3ddf Amit Shah          2009-12-21  651  	}
f997f00bf8c3ddf Amit Shah          2009-12-21  652  
589575a23562b58 Rusty Russell      2012-10-16  653  	if (out_vq->num_free == 0)
cdfadfc1adb87fc Amit Shah          2010-05-19  654  		port->outvq_full = true;
cdfadfc1adb87fc Amit Shah          2010-05-19  655  
cdfadfc1adb87fc Amit Shah          2010-05-19  656  	if (nonblock)
cdfadfc1adb87fc Amit Shah          2010-05-19  657  		goto done;
cdfadfc1adb87fc Amit Shah          2010-05-19  658  
cdfadfc1adb87fc Amit Shah          2010-05-19  659  	/*
cdfadfc1adb87fc Amit Shah          2010-05-19  660  	 * Wait till the host acknowledges it pushed out the data we
531295e63be8c2b Amit Shah          2010-10-20  661  	 * sent.  This is done for data from the hvc_console; the tty
531295e63be8c2b Amit Shah          2010-10-20  662  	 * operations are performed with spinlocks held so we can't
531295e63be8c2b Amit Shah          2010-10-20  663  	 * sleep here.  An alternative would be to copy the data to a
531295e63be8c2b Amit Shah          2010-10-20  664  	 * buffer and relax the spinning requirement.  The downside is
531295e63be8c2b Amit Shah          2010-10-20  665  	 * we need to kmalloc a GFP_ATOMIC buffer each time the
531295e63be8c2b Amit Shah          2010-10-20  666  	 * console driver writes something out.
fc220d6be3c7e48 Sungho Bae         2026-06-04  667  	 *
fc220d6be3c7e48 Sungho Bae         2026-06-04  668  	 * Spin until host returns the buffer.
fc220d6be3c7e48 Sungho Bae         2026-06-04  669  	 * Capture the returned buf so we can free it.
fc220d6be3c7e48 Sungho Bae         2026-06-04  670  	 * If broken, buf == NULL and buf stays in the vq;
fc220d6be3c7e48 Sungho Bae         2026-06-04  671  	 * remove_vqs() will call virtqueue_detach_unused_buf() -> free_buf().
cdfadfc1adb87fc Amit Shah          2010-05-19  672  	 */
fc220d6be3c7e48 Sungho Bae         2026-06-04  673  	while (!(buf = virtqueue_get_buf(out_vq, &len))
40e4dc530118dbb Heinz Graalfs      2013-10-29  674  		&& !virtqueue_is_broken(out_vq))
f997f00bf8c3ddf Amit Shah          2009-12-21  675  		cpu_relax();
fc220d6be3c7e48 Sungho Bae         2026-06-04  676  
fc220d6be3c7e48 Sungho Bae         2026-06-04  677  free_and_done:
fc220d6be3c7e48 Sungho Bae         2026-06-04  678  	if (buf)
fc220d6be3c7e48 Sungho Bae         2026-06-04  679  		free_buf(buf, false);
cdfadfc1adb87fc Amit Shah          2010-05-19  680  done:
cdfadfc1adb87fc Amit Shah          2010-05-19  681  	spin_unlock_irqrestore(&port->outvq_lock, flags);
17e5b4f20adbe28 Amit Shah          2011-09-14  682  
17e5b4f20adbe28 Amit Shah          2011-09-14  683  	port->stats.bytes_sent += in_count;
cdfadfc1adb87fc Amit Shah          2010-05-19  684  	/*
cdfadfc1adb87fc Amit Shah          2010-05-19  685  	 * We're expected to return the amount of data we wrote -- all
cdfadfc1adb87fc Amit Shah          2010-05-19  686  	 * of it
cdfadfc1adb87fc Amit Shah          2010-05-19  687  	 */
9ff4cfab82d27e9 Rusty Russell      2010-04-08  688  	return in_count;
f997f00bf8c3ddf Amit Shah          2009-12-21  689  }
f997f00bf8c3ddf Amit Shah          2009-12-21  690  

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-10-09  4:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-08 12:40 [PATCH net] udp_tunnel: drop packets when hibernating Jason A. Donenfeld
2026-10-08 12:46 ` netdev-bot+sinfo
2026-10-08 12:47   ` Jason A. Donenfeld
2026-10-08 16:26     ` Jérémy Jean
2026-10-08 18:37 ` Willem de Bruijn
2026-10-08 19:58   ` Jason A. Donenfeld
2026-10-08 21:03     ` Willem de Bruijn
2026-10-09  1:57 ` kernel test robot
2026-10-09  4:06 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox