Re: [PATCH 16/22] gpiolib: cdev: add V2 uAPI implementation to parity with V1 (fwd)

2020-06-23 Thread Kent Gibson
On Tue, Jun 23, 2020 at 07:11:49PM +0200, Julia Lawall wrote: > It looks like the put_device (line 891) should be one line earlier. > Yikes - thanks for that. I'll be sure to coccinelle my code before submitting from now on. Cheers, Kent.

Re: [PATCH 16/22] gpiolib: cdev: add V2 uAPI implementation to parity with V1

2020-06-23 Thread Kent Gibson
On Tue, Jun 23, 2020 at 08:44:38PM +0300, Dan Carpenter wrote: > [ The copy_to_user() overflow code is weird. Why do we need to do a > atomic_read()? That suggests that there is a potential time of check > time of use bug where we do: > It is weird, but you conveniently left out the guard

Re: [PATCH 16/22] gpiolib: cdev: add V2 uAPI implementation to parity with V1

2020-06-23 Thread Dan Carpenter
[ The copy_to_user() overflow code is weird. Why do we need to do a atomic_read()? That suggests that there is a potential time of check time of use bug where we do: if (atomic_read(>watch_abi_version) == 2) // <<-- time of check event_size = sizeof(struct

Re: [PATCH 16/22] gpiolib: cdev: add V2 uAPI implementation to parity with V1 (fwd)

2020-06-23 Thread Julia Lawall
It looks like the put_device (line 891) should be one line earlier. julia -- Forwarded message -- Date: Tue, 23 Jun 2020 15:26:47 +0800 From: kernel test robot To: kbu...@lists.01.org Cc: l...@intel.com, Julia Lawall Subject: Re: [PATCH 16/22] gpiolib: cdev: add V2 uAPI

[PATCH 16/22] gpiolib: cdev: add V2 uAPI implementation to parity with V1

2020-06-22 Thread Kent Gibson
Add implementation of the V2 uAPI up to parity with V1. Signed-off-by: Kent Gibson --- This patch only covers the V2 functionality that is a direct analogue of the V1. New V2 functionality is added in subsequent patches. The core of the implementation is the struct line, which is drawn from