From nobody Fri Sep 20 20:36:26 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9E74C77B7A for ; Fri, 26 May 2023 02:21:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234136AbjEZCVi (ORCPT ); Thu, 25 May 2023 22:21:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbjEZCVf (ORCPT ); Thu, 25 May 2023 22:21:35 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4A75B2 for ; Thu, 25 May 2023 19:21:34 -0700 (PDT) X-UUID: 05b73692fb6c11edb20a276fd37b9834-20230526 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=h85S7n4ra7y6C6Ku/nwotPpHkHNjrVtbzbA/qOuBRO0=; b=c+9P3LcYRj61RuKVEOYVXyvfd8Rq71Kbz+WqnPm2go/+419inVbWXOGVuJ18kEi+yrnX5nWRxsUWuYcMLxs+bnQUpDVj2zLmysMNwd+ZaNsdkZxvQJIaDDeUJwf+xvBVHCxHL30aWlRP+ToZUXcKTyT77djtf/pDea3hOVK0YWo=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.25,REQID:6b182a7c-d1c2-4651-a9c9-c6b374eb8e91,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:d5b0ae3,CLOUDID:133f0c6d-2f20-4998-991c-3b78627e4938,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-UUID: 05b73692fb6c11edb20a276fd37b9834-20230526 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2029102729; Fri, 26 May 2023 10:21:28 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 26 May 2023 10:21:27 +0800 Received: from mszsdtlt102.gcn.mediatek.inc (10.16.4.142) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 26 May 2023 10:21:27 +0800 From: Haibo Li To: CC: Andrew Morton , Matthias Brugger , AngeloGioacchino Del Regno , , , , , Haibo Li Subject: [PATCH] mm/gup_test:fix ioctl fail for compat task Date: Fri, 26 May 2023 10:21:25 +0800 Message-ID: <20230526022125.175728-1-haibo.li@mediatek.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" When tools/testing/selftests/mm/gup_test.c is compiled as 32bit, then run on arm64 kernel, it reports "ioctl: Inappropriate ioctl for device". Fix it by filling compat_ioctl in gup_test_fops Signed-off-by: Haibo Li Acked-by: David Hildenbrand --- mm/gup_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/gup_test.c b/mm/gup_test.c index 8ae7307a1bb6..c0421b786dcd 100644 --- a/mm/gup_test.c +++ b/mm/gup_test.c @@ -381,6 +381,7 @@ static int gup_test_release(struct inode *inode, struct= file *file) static const struct file_operations gup_test_fops =3D { .open =3D nonseekable_open, .unlocked_ioctl =3D gup_test_ioctl, + .compat_ioctl =3D compat_ptr_ioctl, .release =3D gup_test_release, }; =20 --=20 2.25.1