linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtmutex-tester: set correct permissions on sysfs files
@ 2013-03-20 15:58 Sasha Levin
  2013-04-02 17:09 ` Sasha Levin
  2013-04-10 13:53 ` [tip:core/locking] locking/rtmutex/tester: Set " tip-bot for Sasha Levin
  0 siblings, 2 replies; 3+ messages in thread
From: Sasha Levin @ 2013-03-20 15:58 UTC (permalink / raw)
  To: williams, mingo; +Cc: linux-kernel, Sasha Levin

sysfs started complaining about cases where permissions don't
match what's in the sysfs ops structure (such as allowing read
without a "show" callback).

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
 kernel/rtmutex-tester.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/rtmutex-tester.c b/kernel/rtmutex-tester.c
index 7890b10..1d96dd0 100644
--- a/kernel/rtmutex-tester.c
+++ b/kernel/rtmutex-tester.c
@@ -14,6 +14,7 @@
 #include <linux/spinlock.h>
 #include <linux/timer.h>
 #include <linux/freezer.h>
+#include <linux/stat.h>
 
 #include "rtmutex.h"
 
@@ -366,8 +367,8 @@ static ssize_t sysfs_test_status(struct device *dev, struct device_attribute *at
 	return curr - buf;
 }
 
-static DEVICE_ATTR(status, 0600, sysfs_test_status, NULL);
-static DEVICE_ATTR(command, 0600, NULL, sysfs_test_command);
+static DEVICE_ATTR(status, S_IRUSR, sysfs_test_status, NULL);
+static DEVICE_ATTR(command, S_IWUSR, NULL, sysfs_test_command);
 
 static struct bus_type rttest_subsys = {
 	.name = "rttest",
-- 
1.8.1.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] rtmutex-tester: set correct permissions on sysfs files
  2013-03-20 15:58 [PATCH] rtmutex-tester: set correct permissions on sysfs files Sasha Levin
@ 2013-04-02 17:09 ` Sasha Levin
  2013-04-10 13:53 ` [tip:core/locking] locking/rtmutex/tester: Set " tip-bot for Sasha Levin
  1 sibling, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2013-04-02 17:09 UTC (permalink / raw)
  To: Sasha Levin; +Cc: williams, mingo, linux-kernel, Thomas Gleixner

Ping?

On 03/20/2013 11:58 AM, Sasha Levin wrote:
> sysfs started complaining about cases where permissions don't
> match what's in the sysfs ops structure (such as allowing read
> without a "show" callback).
> 
> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
> ---
>  kernel/rtmutex-tester.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/rtmutex-tester.c b/kernel/rtmutex-tester.c
> index 7890b10..1d96dd0 100644
> --- a/kernel/rtmutex-tester.c
> +++ b/kernel/rtmutex-tester.c
> @@ -14,6 +14,7 @@
>  #include <linux/spinlock.h>
>  #include <linux/timer.h>
>  #include <linux/freezer.h>
> +#include <linux/stat.h>
>  
>  #include "rtmutex.h"
>  
> @@ -366,8 +367,8 @@ static ssize_t sysfs_test_status(struct device *dev, struct device_attribute *at
>  	return curr - buf;
>  }
>  
> -static DEVICE_ATTR(status, 0600, sysfs_test_status, NULL);
> -static DEVICE_ATTR(command, 0600, NULL, sysfs_test_command);
> +static DEVICE_ATTR(status, S_IRUSR, sysfs_test_status, NULL);
> +static DEVICE_ATTR(command, S_IWUSR, NULL, sysfs_test_command);
>  
>  static struct bus_type rttest_subsys = {
>  	.name = "rttest",
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:core/locking] locking/rtmutex/tester: Set correct permissions on sysfs files
  2013-03-20 15:58 [PATCH] rtmutex-tester: set correct permissions on sysfs files Sasha Levin
  2013-04-02 17:09 ` Sasha Levin
@ 2013-04-10 13:53 ` tip-bot for Sasha Levin
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Sasha Levin @ 2013-04-10 13:53 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, sasha.levin, hpa, mingo, tglx

Commit-ID:  8184004ed7a0bc9538f5e825615c29fc52466bab
Gitweb:     http://git.kernel.org/tip/8184004ed7a0bc9538f5e825615c29fc52466bab
Author:     Sasha Levin <sasha.levin@oracle.com>
AuthorDate: Wed, 20 Mar 2013 11:58:25 -0400
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 10 Apr 2013 14:48:37 +0200

locking/rtmutex/tester: Set correct permissions on sysfs files

sysfs started complaining about cases where permissions don't
match what's in the sysfs ops structure (such as allowing read
without a "show" callback).

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Cc: williams@redhat.com
Link: http://lkml.kernel.org/r/1363795105-5884-1-git-send-email-sasha.levin@oracle.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/rtmutex-tester.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/rtmutex-tester.c b/kernel/rtmutex-tester.c
index 7890b10..1d96dd0 100644
--- a/kernel/rtmutex-tester.c
+++ b/kernel/rtmutex-tester.c
@@ -14,6 +14,7 @@
 #include <linux/spinlock.h>
 #include <linux/timer.h>
 #include <linux/freezer.h>
+#include <linux/stat.h>
 
 #include "rtmutex.h"
 
@@ -366,8 +367,8 @@ static ssize_t sysfs_test_status(struct device *dev, struct device_attribute *at
 	return curr - buf;
 }
 
-static DEVICE_ATTR(status, 0600, sysfs_test_status, NULL);
-static DEVICE_ATTR(command, 0600, NULL, sysfs_test_command);
+static DEVICE_ATTR(status, S_IRUSR, sysfs_test_status, NULL);
+static DEVICE_ATTR(command, S_IWUSR, NULL, sysfs_test_command);
 
 static struct bus_type rttest_subsys = {
 	.name = "rttest",

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-10 13:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-20 15:58 [PATCH] rtmutex-tester: set correct permissions on sysfs files Sasha Levin
2013-04-02 17:09 ` Sasha Levin
2013-04-10 13:53 ` [tip:core/locking] locking/rtmutex/tester: Set " tip-bot for Sasha Levin

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).