Module Name: src Committed By: kamil Date: Sun Apr 15 03:25:25 UTC 2018
Modified Files: src/sys/compat/linux/common: linux_sched.c Log Message: Remove unused variable p from linux_sys_clone() After refactoring by <chs> in 2010 (r. 1.63) the p variable is no longer used. As noted by <Mateusz Guzik> its usage is also unsafe and might cause use-after-free scenarios. No functional change intended. Reference: http://mail-index.netbsd.org/tech-kern/2017/09/08/msg022267.html Sponsored by <The NetBSD Foundation> To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/sys/compat/linux/common/linux_sched.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/compat/linux/common/linux_sched.c diff -u src/sys/compat/linux/common/linux_sched.c:1.69 src/sys/compat/linux/common/linux_sched.c:1.70 --- src/sys/compat/linux/common/linux_sched.c:1.69 Fri Apr 21 15:10:34 2017 +++ src/sys/compat/linux/common/linux_sched.c Sun Apr 15 03:25:25 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_sched.c,v 1.69 2017/04/21 15:10:34 christos Exp $ */ +/* $NetBSD: linux_sched.c,v 1.70 2018/04/15 03:25:25 kamil Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.69 2017/04/21 15:10:34 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.70 2018/04/15 03:25:25 kamil Exp $"); #include <sys/param.h> #include <sys/mount.h> @@ -103,7 +103,6 @@ linux_sys_clone(struct lwp *l, const str syscallarg(void *) tls; syscallarg(void *) child_tidptr; } */ - struct proc *p; struct linux_emuldata *led; int flags, sig, error; @@ -159,7 +158,7 @@ linux_sys_clone(struct lwp *l, const str * that makes this adjustment is a noop. */ if ((error = fork1(l, flags, sig, SCARG(uap, stack), 0, - linux_child_return, NULL, retval, &p)) != 0) { + linux_child_return, NULL, retval, NULL)) != 0) { DPRINTF(("%s: fork1: error %d\n", __func__, error)); return error; }