# Re: \[PATCH 2/2\] iio: Fix unsafe buffer attributes

- From: Matti Vaittinen \<mazziesaccount@gmail.com\>
- Date: 2022-09-30 17:30:56 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2022/09/1952811
- Thread: https://ratatoskr.run/linux-iio/2022/09/1952811/t.md

```text
Hi dee Ho peeps,

On 9/30/22 17:17, kernel test robot wrote:
> Hi Matti,
>
> I love your patch! Yet something to improve:

Ouch.

I overlooked the fact that the buffer was also used by iio-dmaengine (which I had not configured to be compiled). Also the cros_ec_sensors_core.c evaded my grep.

Changing these to use iio_dev_attrs as well seems trivial - but I am afraid there may be other culprits if the pointers to those buffer attributes are memcpy()-ed somewhere else as well... (The attribute wrap function did this).

I will include cros_ec_sensors_core.c and industrialio-dmaengine.c changes and re-spin the series - but I guess I need to add [RFT] here...

Best regards
	-- Matti

-- 
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```
