From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932388AbdDPIGu (ORCPT ); Sun, 16 Apr 2017 04:06:50 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57116 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932242AbdDPIGk (ORCPT ); Sun, 16 Apr 2017 04:06:40 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mike Marshall , Martin Brandenburg Subject: [PATCH 4.10 16/29] orangefs: fix buffer size mis-match between kernel space and user space. Date: Sun, 16 Apr 2017 10:04:33 +0200 Message-Id: <20170416080228.584930961@linuxfoundation.org> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170416080227.593797230@linuxfoundation.org> References: <20170416080227.593797230@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mike Marshall commit eb68d0324dc4d88ab0d6159bdcd98c247a3a8954 upstream. The deamon through which the kernel module communicates with the userspace part of Orangefs, the "client-core", sends initialization data to the kernel module with ioctl. The initialization data was built by the client-core in a 2k buffer and copy_from_user'd into a 1k buffer in the kernel module. When more than 1k of initialization data needed to be sent, some was lost, reducing the usability of the control by which debug levels are set. This patch sets the kernel side buffer to 2K to match the userspace side... Signed-off-by: Mike Marshall Signed-off-by: Martin Brandenburg Signed-off-by: Greg Kroah-Hartman --- fs/orangefs/orangefs-dev-proto.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/fs/orangefs/orangefs-dev-proto.h +++ b/fs/orangefs/orangefs-dev-proto.h @@ -50,8 +50,7 @@ * Misc constants. Please retain them as multiples of 8! * Otherwise 32-64 bit interactions will be messed up :) */ -#define ORANGEFS_MAX_DEBUG_STRING_LEN 0x00000400 -#define ORANGEFS_MAX_DEBUG_ARRAY_LEN 0x00000800 +#define ORANGEFS_MAX_DEBUG_STRING_LEN 0x00000800 /* * The maximum number of directory entries in a single request is 96.