mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
22ccb0a1c5
Attributes of iio providers are exposed via sysfs. Typically, providers pass attribute values to the iio core, which handles formatting and printing to sysfs. However, some attributes, such as labels or extended info, are directly formatted and printed to sysfs by provider drivers using sysfs_emit() and sysfs_emit_at(). These helpers assume the read buffer, allocated by sysfs fop, is page-aligned. When these attributes are accessed by consumer drivers, the read buffer is allocated by the consumer and may not be page-aligned, leading to failures in the provider's callback that utilizes sysfs_emit*. Add a check to ensure that read buffers for labels and external info attributes are page-aligned. Update the prototype documentation as well. Signed-off-by: Matteo Martelli <matteomartelli3@gmail.com> Link: https://patch.msgid.link/20241202-iio-kmalloc-align-v1-1-aa9568c03937@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> |
||
---|---|---|
.. | ||
accel | ||
adc | ||
afe | ||
common | ||
dac | ||
frequency | ||
gyro | ||
imu | ||
timer | ||
backend.h | ||
buffer_impl.h | ||
buffer-dma.h | ||
buffer-dmaengine.h | ||
buffer.h | ||
configfs.h | ||
consumer.h | ||
driver.h | ||
events.h | ||
hw-consumer.h | ||
iio-gts-helper.h | ||
iio-opaque.h | ||
iio.h | ||
kfifo_buf.h | ||
machine.h | ||
sw_device.h | ||
sw_trigger.h | ||
sysfs.h | ||
trigger_consumer.h | ||
trigger.h | ||
triggered_buffer.h | ||
triggered_event.h | ||
types.h |