diff options
author | Chris Wright <chrisw@sous-sol.org> | 2010-05-12 21:28:57 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-21 12:37:31 -0400 |
commit | 2c3c8bea608866d8bd9dcf92657d57fdcac011c5 (patch) | |
tree | f509b958d0a65c46c831dbdd447a81e706dd995a /drivers/pci/hotplug | |
parent | 68d75ed4b84a0806ecd4bc14da4759713b23a532 (diff) |
sysfs: add struct file* to bin_attr callbacks
This allows bin_attr->read,write,mmap callbacks to check file specific data
(such as inode owner) as part of any privilege validation.
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_ibm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c index 6ecbfb27db9d..e525263210ee 100644 --- a/drivers/pci/hotplug/acpiphp_ibm.c +++ b/drivers/pci/hotplug/acpiphp_ibm.c | |||
@@ -108,7 +108,7 @@ static int ibm_set_attention_status(struct hotplug_slot *slot, u8 status); | |||
108 | static int ibm_get_attention_status(struct hotplug_slot *slot, u8 *status); | 108 | static int ibm_get_attention_status(struct hotplug_slot *slot, u8 *status); |
109 | static void ibm_handle_events(acpi_handle handle, u32 event, void *context); | 109 | static void ibm_handle_events(acpi_handle handle, u32 event, void *context); |
110 | static int ibm_get_table_from_acpi(char **bufp); | 110 | static int ibm_get_table_from_acpi(char **bufp); |
111 | static ssize_t ibm_read_apci_table(struct kobject *kobj, | 111 | static ssize_t ibm_read_apci_table(struct file *filp, struct kobject *kobj, |
112 | struct bin_attribute *bin_attr, | 112 | struct bin_attribute *bin_attr, |
113 | char *buffer, loff_t pos, size_t size); | 113 | char *buffer, loff_t pos, size_t size); |
114 | static acpi_status __init ibm_find_acpi_device(acpi_handle handle, | 114 | static acpi_status __init ibm_find_acpi_device(acpi_handle handle, |
@@ -351,6 +351,7 @@ read_table_done: | |||
351 | 351 | ||
352 | /** | 352 | /** |
353 | * ibm_read_apci_table - callback for the sysfs apci_table file | 353 | * ibm_read_apci_table - callback for the sysfs apci_table file |
354 | * @filp: the open sysfs file | ||
354 | * @kobj: the kobject this binary attribute is a part of | 355 | * @kobj: the kobject this binary attribute is a part of |
355 | * @bin_attr: struct bin_attribute for this file | 356 | * @bin_attr: struct bin_attribute for this file |
356 | * @buffer: the kernel space buffer to fill | 357 | * @buffer: the kernel space buffer to fill |
@@ -364,7 +365,7 @@ read_table_done: | |||
364 | * things get really tricky here... | 365 | * things get really tricky here... |
365 | * our solution is to only allow reading the table in all at once. | 366 | * our solution is to only allow reading the table in all at once. |
366 | */ | 367 | */ |
367 | static ssize_t ibm_read_apci_table(struct kobject *kobj, | 368 | static ssize_t ibm_read_apci_table(struct file *filp, struct kobject *kobj, |
368 | struct bin_attribute *bin_attr, | 369 | struct bin_attribute *bin_attr, |
369 | char *buffer, loff_t pos, size_t size) | 370 | char *buffer, loff_t pos, size_t size) |
370 | { | 371 | { |