Received: by 10.223.185.116 with SMTP id b49csp5885851wrg; Wed, 7 Mar 2018 21:02:31 -0800 (PST) X-Google-Smtp-Source: AG47ELuk/CI5bjr8YBQP4/MrSQ1rqWer/tYx0CBEQFH2FJV09pbuU2evC7HWdsnHWFdr/LW+5P8i X-Received: by 2002:a17:902:3a3:: with SMTP id d32-v6mr22843530pld.219.1520485351455; Wed, 07 Mar 2018 21:02:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520485351; cv=none; d=google.com; s=arc-20160816; b=ICaZTszzLWl0A/w4aknSvY92Ntx9eXoQlVJeNnV8j2C6Q8CR/YNPCuKGaHNzARKH9Z PU/me2gTxjJLpmwZtPorMp4/XZyxlQKBx0+YTI4Zu7LP6t0V1d1kf/BDrchT+wKWS38K Km4vuidqeCVCBWa5SmpuwN/HTUosviNgD8BrFhtbi5KSGEf56v/RM3/Qp8khT7GvuAki 7Ot9RyxhraLfyie3oKg/neG7l2mMH7rIAaA9rj1IhRRdHO0IVHzAJevu3Ai3IhmBmpZH W4kn/AykBgv0moJXCI1/Jq7/x/yDZbMsIjm+lwC0yvJbqADecrJZfQGiHTYYypWk7xtV LZjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=ZTQrLjMeSZ0TMQT8Q1sL693JK7GIcyVjnxomnFMssW0=; b=BbE2Q8MlfRZ6yWlYb3Hbk3HAAmHhWxUWXhaRK7qjjZ2osAaOvymVSmAiBiBRQxKWz9 RezwFAxH4zRYESySfQU0+oAMr/gxqH6g4vzGKS3pLz9JLLg9mJkKsbvMIdgYcNXpWcWI RTnroOeokgD4y4+4+YSlqgTttI5YDPEdHS7HhWvZZCb/IQGwzlNFIM3NkR/zHIUj6NBG XknCQsMdyTb8iOdTjiMivbx/hZ9Ivhy10X9WQCtli2Xa5P6tt1EqSm3XY1gug1fcCsn9 S3Sa1HFwZOQPTPrKWSJmc+/jnV+kUQnjzgNP6EXTQf/asPbV81stoChLZb8ntx9BJ3Xw qxlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=cVHwGSPX; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l14si12445712pgc.615.2018.03.07.21.02.17; Wed, 07 Mar 2018 21:02:31 -0800 (PST) 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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=cVHwGSPX; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965394AbeCHE7W (ORCPT + 99 others); Wed, 7 Mar 2018 23:59:22 -0500 Received: from mail-co1nam03on0126.outbound.protection.outlook.com ([104.47.40.126]:14720 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S964807AbeCHE7R (ORCPT ); Wed, 7 Mar 2018 23:59:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ZTQrLjMeSZ0TMQT8Q1sL693JK7GIcyVjnxomnFMssW0=; b=cVHwGSPXMdLuGLJpFhzlQen3wOriWaIQQZSJNcU7qJ32LnEFqPu9Oa1UeJCRY+6F6jPJsKmNqF3DzoaEE1NTVjuTCo01aybKxhLS81yMyGgarO/PL8ZSwblMeqEVapH8jpFd346lANWDDdtRRkPmH64/Rz5b1s9kOxz5MefRn5U= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0999.namprd21.prod.outlook.com (52.132.133.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.588.7; Thu, 8 Mar 2018 04:59:12 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0588.008; Thu, 8 Mar 2018 04:59:12 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Anton Vasilyev , Jason Gunthorpe , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 59/67] RDMA/ocrdma: Fix permissions for OCRDMA_RESET_STATS Thread-Topic: [PATCH AUTOSEL for 4.14 59/67] RDMA/ocrdma: Fix permissions for OCRDMA_RESET_STATS Thread-Index: AQHTtpoGzKQ1OuAIdkWTEds3uxXaKw== Date: Thu, 8 Mar 2018 04:57:58 +0000 Message-ID: <20180308045641.7814-59-alexander.levin@microsoft.com> References: <20180308045641.7814-1-alexander.levin@microsoft.com> In-Reply-To: <20180308045641.7814-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0999;20:qhnJAwYcbFQE9DNA+liHQtp6pPjUcgJkiySNzMST0dzsdmFlIW6P/Cwtljvo+VVgGIXG4lk3W86eVfUkjQ/mm+439QhDoj7+FwDMRY9FRhLSDFGztuKmqM32OiML6ADEJitQ7h8sTbtS2cv+3qG3+bhoklvOpMtbAWSpJPhSO38= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 5e3a966c-01d5-4a09-b433-08d584b155ca x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0999; x-ms-traffictypediagnostic: DM5PR2101MB0999: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231220)(944501244)(52105095)(6055026)(61426038)(61427038)(6041288)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR2101MB0999;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0999; x-forefront-prvs: 060503E79B x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(39860400002)(39380400002)(376002)(396003)(346002)(189003)(199004)(72206003)(3846002)(4477795004)(106356001)(8676002)(6116002)(1076002)(6512007)(14454004)(81156014)(66066001)(2906002)(3660700001)(478600001)(10290500003)(8936002)(6486002)(305945005)(7736002)(36756003)(2900100001)(81166006)(4326008)(25786009)(6436002)(5250100002)(105586002)(54906003)(22452003)(76176011)(5660300001)(10090500001)(110136005)(316002)(6506007)(86362001)(186003)(2950100002)(97736004)(3280700002)(102836004)(99286004)(107886003)(59450400001)(68736007)(86612001)(53936002)(26005)(6666003)(2501003)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0999;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 3rPMicUns3rO+Fx+G/tLejVDtxGM+sKnn9JDlliJFtEj8J8MXC0RrXNY76jYxXFenBQgCequxp1G+7zsDVbOAv3YctJgw8WuMtmqvOZ43vokL7oTR2V2m34qlVpRu3FzCy2C/fZVpVyGWnyTPGPPHEr1VRENvwFo69dvJdr8f4QdZxhGXvQ92GAnv5ulsofIKVQRKf0ci9fzabphW3sd4DBbXLG1/d76/QpIY0NQY8BWNHFwOSe6FamI8+Z5TANnWH1Hq+HCpsu4343gf9TL+hfojPHygnjYNlQSrKE3Vb0aSEJd5F3dQbm7lCNoZIPT7RvXwGB7L0qSVGHJuHoCYA== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e3a966c-01d5-4a09-b433-08d584b155ca X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2018 04:57:58.1154 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0999 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anton Vasilyev [ Upstream commit 744820869166c8c78be891240cf5f66e8a333694 ] Debugfs file reset_stats is created with S_IRUSR permissions, but ocrdma_dbgfs_ops_read() doesn't support OCRDMA_RESET_STATS, whereas ocrdma_dbgfs_ops_write() supports only OCRDMA_RESET_STATS. The patch fixes misstype with permissions. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev Acked-by: Selvin Xavier Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/ocrdma/ocrdma_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_stats.c b/drivers/infiniba= nd/hw/ocrdma/ocrdma_stats.c index 66056f9a9700..48a49f8a5014 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_stats.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_stats.c @@ -834,7 +834,7 @@ void ocrdma_add_port_stats(struct ocrdma_dev *dev) =20 dev->reset_stats.type =3D OCRDMA_RESET_STATS; dev->reset_stats.dev =3D dev; - if (!debugfs_create_file("reset_stats", S_IRUSR, dev->dir, + if (!debugfs_create_file("reset_stats", 0200, dev->dir, &dev->reset_stats, &ocrdma_dbg_ops)) goto err; =20 --=20 2.14.1