]> git.baikalelectronics.ru Git - kernel.git/commit
pci-sysfs: use proper file capability helper function
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 14 Apr 2016 19:00:21 +0000 (12:00 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 14 Apr 2016 19:56:09 +0000 (12:56 -0700)
commitaa2ba73bd5eb28565269131a2aa07bfb32db31f8
tree087b6c1be81d9312d12011d4eee852a740b25f16
parentf975c0153f5fafb53b04c1dabb163854633b8bdf
pci-sysfs: use proper file capability helper function

The PCI config access checked the file capabilities correctly, but used
the itnernal security capability check rather than the helper function
that is actually meant for that.

The security_capable() has unusual return values and is not meant to be
used elsewhere (the only other use is in the capability checking
functions that we actually intend people to use, and this odd PCI usage
really stood out when looking around the capability code.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/pci/pci-sysfs.c