Received: by 10.213.65.68 with SMTP id h4csp225044imn; Fri, 23 Mar 2018 03:18:26 -0700 (PDT) X-Google-Smtp-Source: AG47ELu5luVtozDBx2N+ZTelN0cJtXHacRQrKZ5drY9HdZMl4xLUEdBOcccCzAJFzPwHyjY0QVDp X-Received: by 10.98.66.203 with SMTP id h72mr20187185pfd.156.1521800306559; Fri, 23 Mar 2018 03:18:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521800306; cv=none; d=google.com; s=arc-20160816; b=vwk0wunrFyKlFW+2WOxuFIyYj1RA4oj8FH/tcOK+rdEOk418hNPZq1Xoybx8wOrmUa 4A0P9nJaj6lCyE8HmgTAngWuFoIb2I+39TDu8ap/2OP+Zm1OQFmR2EEK+TAvgm33rQ/z sIpC95BIGbWn9bpBEnM7CxGx3DrTyz8OQaSF5e3YYIEJ+ru8QfhhTSAVsmtyA8ZFPHux mV5hjsdew/VsmNYHAUGyBbuDwkHDDmO8CfVcqqj1h4+fyJNl6+5g1tl8zdXPBLZ4+/cq 2lEPGCn0DdzNRrEgRKSHKcAH8vE+Krt80CkYFYUtfKqA8m37t0hJ6mVZe2ydv4FYQ/vi +z1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=rm8aRQ3B0l5wriZ3QBLTlYRD5lzchp7S7Fj8OAhXFxA=; b=rJarL/2pE56eaEmpvMdfPRHPR/DbU0mjAlJkDCQez/UdYkd6rkXPixG9zNpM9955Vp asF+R186MGrMdald0hmJ7tEMVpqTJsBpyFKx2XKdiLvtMscK7dnaxD/2sNsAI6ZxWAfJ Jy5D5gemiCzkquTOUOPM6sJ6HX4UaSxPAEIBB10NBbsqpClO8YkJCiwANDUPcLl4VsXW UgvbKSSFfNgr7h8rDS2/8CuboVBjJyxTwEddAMsF7jznUfM2dTv8QiVptFwqnwxeEk95 gw4tO2BetDmLyWe9ywff98dcrzfybDJv5UIDZ6EpNgOtw6lH0tSU0+ysGXRJY5VPRJ6p H1vA== 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 t66si6484298pfk.215.2018.03.23.03.18.11; Fri, 23 Mar 2018 03:18:26 -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 S933769AbeCWKRM (ORCPT + 99 others); Fri, 23 Mar 2018 06:17:12 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47020 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933726AbeCWKRI (ORCPT ); Fri, 23 Mar 2018 06:17:08 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 180DED09; Fri, 23 Mar 2018 10:17:07 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Anton Vasilyev , Selvin Xavier , Jason Gunthorpe , Sasha Levin Subject: [PATCH 4.4 93/97] RDMA/ocrdma: Fix permissions for OCRDMA_RESET_STATS Date: Fri, 23 Mar 2018 10:55:20 +0100 Message-Id: <20180323094202.680504261@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323094157.535925724@linuxfoundation.org> References: <20180323094157.535925724@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ 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 Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/hw/ocrdma/ocrdma_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 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->reset_stats.type = OCRDMA_RESET_STATS; dev->reset_stats.dev = 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;