Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp903357ybb; Sat, 28 Mar 2020 13:01:49 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtK5tqk6t0RLaERL7KBlFdyhJ23PniXMXRaTy4bWVhMNsKpVa9qvWbdoKtooWpIALECkg9P X-Received: by 2002:a4a:d052:: with SMTP id x18mr4401748oor.13.1585425709790; Sat, 28 Mar 2020 13:01:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585425709; cv=none; d=google.com; s=arc-20160816; b=c9f/Mq+IMqKQhTcNke4A5OyfXFtqIIDyWsLFEm4Jfxjhm2oOJISgW8DOuov+krsMsq Wpkyj5QZSyXkJUND1YyC5HKz3rmcK1S9vOcIWPv8d2IGNOvZr4YHjziq4vw/V79R/Mqv KgPX9NvOAGSMi/b7exF3BcSNehcW+GRxvFFHYOsPqSR4/7Gn/mcas72GWfVnnJVjmbep TSbWxq8IFw8EcUNBhUiuBzIph219en/4na6a/URf5UVyfvdEc0wnfWHGVY9NE86PxaT5 l8Wli2yRYF2HcXrr79z41oFlXecgy53oKIX8sTcdHtW4NzzM6TDgz4Oofz4D5k5uO8QL 7+UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=C+sQfWcX3Vi2X0znLfY/6IFEEEtUl/+KEs7rFPYwPCk=; b=zxe6uXyKOcSjsdlQiFn6c1p2ONWzHPcC+msF8gvF8D36Yv+BwMnuQMo6Qp+6MgOS10 iskBu/OP74O7CpgZwBqknFsvFWFVgYKclhl7VbllMs/Oal8s3A9bsOfK+9nUvtooMi+E NAWMTV2oEdoHu8YplfePr6cO//MGOs3G9EUi/FmSlTk368FogYL8t5/M8+4e0g6IyRR6 cvvXh2iQGxRTt1+2/Ryn8bh19QW1dHaCIZsd9KPjllKWoBGU5gAln3RX/A2gtTYjWry7 7+8g+IKlH6eqmnaqCVxHMk94RaMPFzF6h8BWaOpy65bLViCJMWdpY+/6sut8QrA5/Jve 9T6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="ram8R/hV"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n21si4669808otf.130.2020.03.28.13.01.36; Sat, 28 Mar 2020 13:01:49 -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; dkim=pass header.i=@kernel.org header.s=default header.b="ram8R/hV"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727484AbgC1T7f (ORCPT + 99 others); Sat, 28 Mar 2020 15:59:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:52586 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726981AbgC1T7f (ORCPT ); Sat, 28 Mar 2020 15:59:35 -0400 Received: from localhost (mobile-166-175-186-165.mycingular.net [166.175.186.165]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 19A06206E6; Sat, 28 Mar 2020 19:59:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585425574; bh=Qj/IrxEUrTlO01aVKjX/HLCY5OaDZhl6OPgn/ojV58k=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=ram8R/hVH3t8q4JC9mluTDr9CBxoglo0di72qnNIZtRoirOglWN8O6nWs7oK2JgiC nRbgMGdqri5yFMz0cvwDUcDyRinRKWUeNG286NCjrV6yP7aS9Gmaaz7U8x9f/vomgX Kj+VnbjVWjPKMiQbdf7WIt6hXEhiYwjMBuKKpUQw= Date: Sat, 28 Mar 2020 14:59:32 -0500 From: Bjorn Helgaas To: Kelsey Cc: Linux Kernel Mailing List , linux-pci@vger.kernel.org, Kelsey Skunberg , rbilovol@cisco.com, stable , Don Dutile , Ruslan Bilovol , linux-kernel-mentees@lists.linuxfoundation.org, Bodong Wang Subject: Re: [Linux-kernel-mentees] [PATCH v2] PCI: sysfs: Change bus_rescan and dev_rescan to rescan Message-ID: <20200328195932.GA96482@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 26, 2020 at 12:29:11AM -0600, Kelsey wrote: > On Wed, Mar 25, 2020 at 4:10 PM Bjorn Helgaas wrote: > > Thanks for taking care of this! Two questions: > > > > 1) You supplied permissions of 0220, but DEVICE_ATTR_WO() > > uses__ATTR_WO(), which uses 0200. Shouldn't we keep 0200? > > > > Good catch. Before changing to DEVICE_ATTR_WO(), the permissions used > was (S_IWUSR | S_IWGRP), which would be 0220. This means the > permissions were mistakenly changed from 0220 to 0200 in the same > patch: > > commit 4e2b79436e4f ("PCI: sysfs: Change DEVICE_ATTR() to DEVICE_ATTR_WO()") > > To verify DEVICE_ATTR_WO() is using __ATTR_WO() can be seen in > /include/linux/device.h > To verify permissions for __ATTR_WO() is 0200 can be seen in > /inlcude/linux/sysfs.h > > These attributes had permissions 0220 when first being introduced and > before the above mentioned patch, so I'm on the side to believe that > 0220 should be used. I'm not sure it was a mistake that 4e2b79436e4f changed from 0220 to 200 or not. I'd say __ATTR_WO (0200) is the "standard" one, and we should have a special reason to use 0220.