Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3145184ybd; Fri, 28 Jun 2019 03:41:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSbGv9fRcVy6WH4akFwxbUvuJRdcu5KPVMH7XPJXlkZqf0nbaohJVxM/WMWqDiyDClTDZv X-Received: by 2002:a17:90a:b00b:: with SMTP id x11mr12416855pjq.120.1561718479798; Fri, 28 Jun 2019 03:41:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561718479; cv=none; d=google.com; s=arc-20160816; b=oJ8VxFZ4cCmZyLWGhx4Tw8rrWtw7w9j566hWRk95wc+EusR4rmzGmaKz23QvlpoMiT wkWEcOHQyhTMKvWUF1KR6FmcLat/2pRIHK58Vnb7WE5pwj8sVWqCrYBp12sHhIs+uryc 9DcM0Ae1d7gthD/NQl5I/uHa7LS4vTgunih2G3KFTGiMUtVKGUd8f3YwIIX9g/nUqel/ jivJyl19aakrC34fW+RApdtJE18ulq0Rb5MU6XE3DrDGHd6H3Xvrbr4n/blbKd6XYQM/ wd8AJ3h2ujRt7+xwJ9hcTz4yaFJNbRBzzZceaeDk/Z7hz1irGqv8GP0boLG8BwKp/j1I 0nSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=kImcAoU0RwTBNjcgSEvQppC506wCUmjoPlq1zNA+Q2c=; b=z7bm3k+j4Cz3bT9hTdC9xgqL3xmQQP0sq+icuM/gvkomHC2VTk5zbnZEb3niwaWm2z 7KxUdfyIwhaox+dlFFpX46BGMIwkviW6uRUBg0rNTuOH/xDY76d+fzfE/vXH37V7x7RB Hho675fyaMC9vDLvuQbxSOmeQdA7g+qNNxIhnCQvwaDPQKUvKDKlloN3BVEl43zkx4CX 86cn3vZ2bBxR925iQThYTJ8k88n9iKqj+OG7Ur3iMkHXh1YCd4tsVTe3CuNV+dq31BAp qAm3LUr0qKXMzwwe8fMvgYc2nbpLZim3elvf5Q2ncnAd4MF5DwgOo9yLjTrBDorjQCmz KtIQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k16si1381505pfi.174.2019.06.28.03.41.03; Fri, 28 Jun 2019 03:41:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726864AbfF1Kke (ORCPT + 99 others); Fri, 28 Jun 2019 06:40:34 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:43775 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726484AbfF1Kke (ORCPT ); Fri, 28 Jun 2019 06:40:34 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1Mqrjz-1iJykT2h0L-00mrot; Fri, 28 Jun 2019 12:40:08 +0200 From: Arnd Bergmann To: Jaegeuk Kim , Chao Yu Cc: Arnd Bergmann , Qiuyang Sun , Sahitya Tummala , Eric Biggers , Wang Shilong , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH] f2fs: fix 32-bit linking Date: Fri, 28 Jun 2019 12:39:52 +0200 Message-Id: <20190628104007.2721479-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:i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vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Not all architectures support get_user() with a 64-bit argument: ERROR: "__get_user_bad" [fs/f2fs/f2fs.ko] undefined! Use copy_from_user() here, this will always work. Fixes: d2ae7494d043 ("f2fs: ioctl for removing a range from F2FS") Signed-off-by: Arnd Bergmann --- fs/f2fs/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 998affe31419..465853029b8e 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -3066,7 +3066,8 @@ static int f2fs_ioc_resize_fs(struct file *filp, unsigned long arg) if (f2fs_readonly(sbi->sb)) return -EROFS; - if (get_user(block_count, (__u64 __user *)arg)) + if (copy_from_user(&block_count, (void __user *)arg, + sizeof(block_count))) return -EFAULT; ret = f2fs_resize_fs(sbi, block_count); -- 2.20.0