Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/common don't call MODULE_HOOK_SET(), if exec_sigc...



details:   https://anonhg.NetBSD.org/src/rev/e9b8c5282b11
branches:  trunk
changeset: 1026597:e9b8c5282b11
user:      ryo <ryo%NetBSD.org@localhost>
date:      Thu Dec 02 04:26:09 2021 +0000

description:
don't call MODULE_HOOK_SET(), if exec_sigcode_alloc() fails.

diffstat:

 sys/compat/common/kern_sig_16.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 9060013a8e5d -r e9b8c5282b11 sys/compat/common/kern_sig_16.c
--- a/sys/compat/common/kern_sig_16.c   Wed Dec 01 23:56:29 2021 +0000
+++ b/sys/compat/common/kern_sig_16.c   Thu Dec 02 04:26:09 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sig_16.c,v 1.7 2021/11/26 08:06:11 ryo Exp $      */
+/*     $NetBSD: kern_sig_16.c,v 1.8 2021/12/02 04:26:09 ryo Exp $      */
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sig_16.c,v 1.7 2021/11/26 08:06:11 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig_16.c,v 1.8 2021/12/02 04:26:09 ryo Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -161,10 +161,12 @@
                emul_netbsd.e_sigobject = NULL;
        }
        rw_exit(&exec_lock);
+       if (error)
+               return error;
        MODULE_HOOK_SET(sendsig_sigcontext_16_hook, sendsig_sigcontext);
 #endif
 
-       return error;
+       return 0;
 }
 
 int



Home | Main Index | Thread Index | Old Index