linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Don Dutile <ddutile@redhat.com>
To: Bjorn Helgaas <helgaas@kernel.org>, Kelsey <skunberg.kelsey@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-pci@vger.kernel.org,
	Kelsey Skunberg <kelsey.skunberg@gmail.com>,
	rbilovol@cisco.com, stable <stable@vger.kernel.org>,
	Ruslan Bilovol <ruslan.bilovol@gmail.com>,
	linux-kernel-mentees@lists.linuxfoundation.org,
	Bodong Wang <bodong@mellanox.com>
Subject: Re: [Linux-kernel-mentees] [PATCH v2] PCI: sysfs: Change bus_rescan and dev_rescan to rescan
Date: Mon, 30 Mar 2020 09:09:32 -0400	[thread overview]
Message-ID: <4ab3854e-e7ca-5a3f-dca9-bd855d47e95b@redhat.com> (raw)
In-Reply-To: <20200328195932.GA96482@google.com>

On 3/28/20 3:59 PM, Bjorn Helgaas wrote:
> On Thu, Mar 26, 2020 at 12:29:11AM -0600, Kelsey wrote:
>> On Wed, Mar 25, 2020 at 4:10 PM Bjorn Helgaas <helgaas@kernel.org> 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.
> 
Bjorn,
Thanks for verifying the 0200 vs 0220 permissions.
I had recalled that discussion thread on the permissions when the original ATTR patch was proposed, but hadn't had time to dig it up.
Apologies for the delay, thanks for the (final?) cleanup.
- Don


  parent reply	other threads:[~2020-03-30 13:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25 15:17 [PATCH v2] PCI: sysfs: Change bus_rescan and dev_rescan to rescan Kelsey Skunberg
2020-03-25 16:31 ` Ruslan Bilovol
2020-03-25 22:10 ` [Linux-kernel-mentees] " Bjorn Helgaas
2020-03-26  6:29   ` Kelsey
2020-03-28 19:59     ` Bjorn Helgaas
2020-03-29  7:20       ` Kelsey
2020-03-30 13:09       ` Don Dutile [this message]
2020-03-26  6:35   ` Greg KH
2020-03-28 20:06     ` Bjorn Helgaas
2020-03-29  7:33       ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ab3854e-e7ca-5a3f-dca9-bd855d47e95b@redhat.com \
    --to=ddutile@redhat.com \
    --cc=bodong@mellanox.com \
    --cc=helgaas@kernel.org \
    --cc=kelsey.skunberg@gmail.com \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rbilovol@cisco.com \
    --cc=ruslan.bilovol@gmail.com \
    --cc=skunberg.kelsey@gmail.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).