Commit 3d965875 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: OTG: langwell_otg: fix up some sysfs attribute permissions

They should not be writable by any user.
Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Cc: Hao Wu <hao.wu@intel.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Alek Du <alek.du@intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e24d7ace
...@@ -1896,7 +1896,7 @@ set_a_bus_req(struct device *dev, struct device_attribute *attr, ...@@ -1896,7 +1896,7 @@ set_a_bus_req(struct device *dev, struct device_attribute *attr,
} }
return count; return count;
} }
static DEVICE_ATTR(a_bus_req, S_IRUGO | S_IWUGO, get_a_bus_req, set_a_bus_req); static DEVICE_ATTR(a_bus_req, S_IRUGO | S_IWUSR, get_a_bus_req, set_a_bus_req);
static ssize_t static ssize_t
get_a_bus_drop(struct device *dev, struct device_attribute *attr, char *buf) get_a_bus_drop(struct device *dev, struct device_attribute *attr, char *buf)
...@@ -1942,8 +1942,7 @@ set_a_bus_drop(struct device *dev, struct device_attribute *attr, ...@@ -1942,8 +1942,7 @@ set_a_bus_drop(struct device *dev, struct device_attribute *attr,
} }
return count; return count;
} }
static DEVICE_ATTR(a_bus_drop, S_IRUGO | S_IWUGO, static DEVICE_ATTR(a_bus_drop, S_IRUGO | S_IWUSR, get_a_bus_drop, set_a_bus_drop);
get_a_bus_drop, set_a_bus_drop);
static ssize_t static ssize_t
get_b_bus_req(struct device *dev, struct device_attribute *attr, char *buf) get_b_bus_req(struct device *dev, struct device_attribute *attr, char *buf)
...@@ -1988,7 +1987,7 @@ set_b_bus_req(struct device *dev, struct device_attribute *attr, ...@@ -1988,7 +1987,7 @@ set_b_bus_req(struct device *dev, struct device_attribute *attr,
} }
return count; return count;
} }
static DEVICE_ATTR(b_bus_req, S_IRUGO | S_IWUGO, get_b_bus_req, set_b_bus_req); static DEVICE_ATTR(b_bus_req, S_IRUGO | S_IWUSR, get_b_bus_req, set_b_bus_req);
static ssize_t static ssize_t
set_a_clr_err(struct device *dev, struct device_attribute *attr, set_a_clr_err(struct device *dev, struct device_attribute *attr,
...@@ -2012,7 +2011,7 @@ set_a_clr_err(struct device *dev, struct device_attribute *attr, ...@@ -2012,7 +2011,7 @@ set_a_clr_err(struct device *dev, struct device_attribute *attr,
} }
return count; return count;
} }
static DEVICE_ATTR(a_clr_err, S_IWUGO, NULL, set_a_clr_err); static DEVICE_ATTR(a_clr_err, S_IWUSR, NULL, set_a_clr_err);
static struct attribute *inputs_attrs[] = { static struct attribute *inputs_attrs[] = {
&dev_attr_a_bus_req.attr, &dev_attr_a_bus_req.attr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment