Module Name: src
Committed By: simonb
Date: Sat Jul 24 13:27:39 UTC 2021
Modified Files:
src/sys/kern: vfs_bio.c
Log Message:
Pad out the slop for kern.buf based on the passed in element size,
rather than a size of an unrelated struct.
To generate a diff of this commit:
cvs rdiff -u -r1.298 -r1.299 src/sys/kern/vfs_bio.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/kern/vfs_bio.c
diff -u src/sys/kern/vfs_bio.c:1.298 src/sys/kern/vfs_bio.c:1.299
--- src/sys/kern/vfs_bio.c:1.298 Thu Apr 1 06:25:59 2021
+++ src/sys/kern/vfs_bio.c Sat Jul 24 13:27:39 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_bio.c,v 1.298 2021/04/01 06:25:59 simonb Exp $ */
+/* $NetBSD: vfs_bio.c,v 1.299 2021/07/24 13:27:39 simonb Exp $ */
/*-
* Copyright (c) 2007, 2008, 2009, 2019, 2020 The NetBSD Foundation, Inc.
@@ -123,7 +123,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.298 2021/04/01 06:25:59 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.299 2021/07/24 13:27:39 simonb Exp $");
#ifdef _KERNEL_OPT
#include "opt_bufcache.h"
@@ -1850,7 +1850,7 @@ sysctl_dobuf(SYSCTLFN_ARGS)
*oldlenp = needed;
if (oldp == NULL)
- *oldlenp += KERN_BUFSLOP * sizeof(buf_t);
+ *oldlenp += KERN_BUFSLOP * elem_size;
return (error);
}