Module Name:    src
Committed By:   bouyer
Date:           Thu Sep  1 16:25:18 UTC 2022

Modified Files:
        src/sys/arch/xen/xenbus: xenbus_xs.c

Log Message:
process_msg() is called from thread context, so malloc() can wait for
memory. Should avoids occasional ENOMEM reading messages


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/xen/xenbus/xenbus_xs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/xenbus/xenbus_xs.c
diff -u src/sys/arch/xen/xenbus/xenbus_xs.c:1.27 src/sys/arch/xen/xenbus/xenbus_xs.c:1.28
--- src/sys/arch/xen/xenbus/xenbus_xs.c:1.27	Wed May  6 16:50:13 2020
+++ src/sys/arch/xen/xenbus/xenbus_xs.c	Thu Sep  1 16:25:18 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: xenbus_xs.c,v 1.27 2020/05/06 16:50:13 bouyer Exp $ */
+/* $NetBSD: xenbus_xs.c,v 1.28 2022/09/01 16:25:18 bouyer Exp $ */
 /******************************************************************************
  * xenbus_xs.c
  *
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xenbus_xs.c,v 1.27 2020/05/06 16:50:13 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xenbus_xs.c,v 1.28 2022/09/01 16:25:18 bouyer Exp $");
 
 #if 0
 #define DPRINTK(fmt, args...) \
@@ -719,7 +719,7 @@ process_msg(void)
 	char *body;
 	int err;
 
-	msg = malloc(sizeof(*msg), M_DEVBUF, M_NOWAIT);
+	msg = malloc(sizeof(*msg), M_DEVBUF, M_WAITOK);
 	if (msg == NULL)
 		return ENOMEM;
 

Reply via email to