[PATCH 2/2] iio: Fix unsafe buffer attributes

Matti Vaittinen mazziesaccount at gmail.com
Fri Sep 30 10:30:03 PDT 2022


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! ~~




More information about the linux-arm-kernel mailing list