Messages in this thread | | | Date | Fri, 11 Jan 2019 00:11:57 +0100 | From | Wolfram Sang <> | Subject | Re: [PATCH v3] i2c: dev: prevent adapter retries and timeout being set as minus value |
| |
On Wed, Jan 09, 2019 at 03:33:07PM +0800, Yi Zeng wrote: > If set adapter->retries to minus value from user space via ioctl, > will make __i2c_transfer and __i2c_smbus_xfer jump the calling to > adapter->algo->master_xfer and adapter->algo->smbus_xfer that > registered by the underlying bus drivers, and return value 0 to > all the callers. The bus driver will never be accessed anymore by > all users, besides, the users may still get successful return value > without any error or information log print out. > > If set adapter->timeout to minus value from user space via ioctl, > will make the retrying loop in __i2c_transfer and __i2c_smbus_xfer > always break after the the first try, due to the time_after always > returns true. > > Signed-off-by: Yi Zeng <yizeng@asrmicro.com>
Applied to for-current, thanks!
[unhandled content-type:application/pgp-signature] | |