[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4ab3854e-e7ca-5a3f-dca9-bd855d47e95b@redhat.com>
Date: Mon, 30 Mar 2020 09:09:32 -0400
From: Don Dutile <ddutile@...hat.com>
To: Bjorn Helgaas <helgaas@...nel.org>,
Kelsey <skunberg.kelsey@...il.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-pci@...r.kernel.org,
Kelsey Skunberg <kelsey.skunberg@...il.com>,
rbilovol@...co.com, stable <stable@...r.kernel.org>,
Ruslan Bilovol <ruslan.bilovol@...il.com>,
linux-kernel-mentees@...ts.linuxfoundation.org,
Bodong Wang <bodong@...lanox.com>
Subject: Re: [Linux-kernel-mentees] [PATCH v2] PCI: sysfs: Change bus_rescan
and dev_rescan to rescan
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@...nel.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
Powered by blists - more mailing lists