linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kelsey <skunberg.kelsey@gmail.com>
To: Bjorn Helgaas <helgaas@kernel.org>
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>,
	Don Dutile <ddutile@redhat.com>,
	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: Sun, 29 Mar 2020 01:20:42 -0600	[thread overview]
Message-ID: <CAFVqi1Td3kE0Gd6S43F5xs3br=UBd1ssZu-1xkoO+Z9EYRQR=w@mail.gmail.com> (raw)
In-Reply-To: <20200328195932.GA96482@google.com>

On Sat, Mar 28, 2020 at 1:59 PM Bjorn Helgaas <helgaas@kernel.org> 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.

Sounds good. I didn't find any information or reason stating the
permissions needed to be 0220. So sounds like 0200 will be the winner.

Appreciate the help and you checking this over!

- Kelsey

  reply	other threads:[~2020-03-29  7:20 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 [this message]
2020-03-30 13:09       ` Don Dutile
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='CAFVqi1Td3kE0Gd6S43F5xs3br=UBd1ssZu-1xkoO+Z9EYRQR=w@mail.gmail.com' \
    --to=skunberg.kelsey@gmail.com \
    --cc=bodong@mellanox.com \
    --cc=ddutile@redhat.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=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).