From 35ba8bce412aeba9e48d1a6038cb527e70425c26 Mon Sep 17 00:00:00 2001 From: jhb Date: Thu, 21 May 2009 16:18:45 +0000 Subject: Only use the ABI compat shim for vfs.bufspace if the old buffer is smaller than a long. PR: amd64/134786 Submitted by: Emil Mikulic emikulic| gmail MFC after: 3 days --- sys/kern/vfs_bio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/kern/vfs_bio.c') diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 16df889..a3c3e97 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -293,7 +293,7 @@ sysctl_bufspace(SYSCTL_HANDLER_ARGS) long lvalue; int ivalue; - if (sizeof(int) == sizeof(long) || req->oldlen == sizeof(long)) + if (sizeof(int) == sizeof(long) || req->oldlen >= sizeof(long)) return (sysctl_handle_long(oidp, arg1, arg2, req)); lvalue = *(long *)arg1; if (lvalue > INT_MAX) -- cgit v1.1