Re: [PATCH v9 2/2] uio: Fix uio driver to refcount device

2015-06-08 Thread Brian Russell
> On 8 Jun 2015, at 20:25, Guenter Roeck wrote: > >> On Tue, Mar 24, 2015 at 12:59:22PM +, Brian Russell wrote: >> >> >>> On 23/03/15 20:41, Greg Kroah-Hartman wrote: >>>> On Fri, Mar 20, 2015 at 02:54:44PM +, Brian Russell wrote: >>&

Re: [PATCH v9 2/2] uio: Fix uio driver to refcount device

2015-03-24 Thread Brian Russell
On 23/03/15 20:41, Greg Kroah-Hartman wrote: > On Fri, Mar 20, 2015 at 02:54:44PM +0000, Brian Russell wrote: >> Protect uio driver from its owner being unplugged while there are open fds. >> Embed struct device in struct uio_device, use refcounting on device, free >>

Re: [PATCH 2/2] uio: Fix uio driver to refcount device

2015-03-20 Thread Brian Russell
On 20/03/15 12:18, Greg Kroah-Hartman wrote: > On Thu, Mar 19, 2015 at 05:55:28PM +0000, Brian Russell wrote: >> Protect uio driver from its owner being unplugged while there are open fds. >> Embed struct device in struct uio_device, use refcounting on device, free >>

[PATCH v9 0/2] uio: Fix uio hotplug issues

2015-03-20 Thread Brian Russell
Protect uio driver from crashing when its owner is unplugged while there are open fds. Brian Russell (2): uio: Request/free irq separate from dev lifecycle uio: Fix uio driver to refcount device v9: remove line wrap from 2/2 v8: break out irq change into separate patch v7: use

[PATCH v9 2/2] uio: Fix uio driver to refcount device

2015-03-20 Thread Brian Russell
check accesses. Signed-off-by: Brian Russell --- drivers/uio/uio.c | 58 +++--- include/linux/uio_driver.h | 2 +- 2 files changed, 40 insertions(+), 20 deletions(-) diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 65bf067..4629421 100644

[PATCH 2/2] uio: Fix uio driver to refcount device

2015-03-19 Thread Brian Russell
check accesses. Signed-off-by: Brian Russell --- drivers/uio/uio.c | 58 +++--- include/linux/uio_driver.h | 2 +- 2 files changed, 40 insertions(+), 20 deletions(-) diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 65bf067..4629421 100644

[PATCH v8 0/2] uio: Fix uio hotplug issues

2015-03-19 Thread Brian Russell
Protect uio driver from crashing when its owner is unplugged while there are open fds. Brian Russell (2): uio: Request/free irq separate from dev lifecycle uio: Fix uio driver to refcount device v8: break out irq change into separate patch v7: use dev_set_name and fix error path

[PATCH 1/2] uio: Request/free irq separate from dev lifecycle

2015-03-19 Thread Brian Russell
ilure to do so results in a BUG_ON(), leaving the device with MSI enabled and thus leaking its vector." So we need to separately free the irq at unregister to allow the device to be kept around in the case of it still having open FDs. Signed-off-by: Brian Russell --- drivers/uio/uio.c | 12 ++

Re: [PATCH v6] uio: Fix uio driver to refcount device

2015-03-19 Thread Brian Russell
On 19/03/15 15:14, Greg Kroah-Hartman wrote: > On Thu, Mar 19, 2015 at 02:49:21PM +0000, Brian Russell wrote: >> On 19/03/15 14:23, Greg Kroah-Hartman wrote: >>> On Thu, Mar 19, 2015 at 02:11:19PM +0000, Brian Russell wrote: >>>>if (info->ir

Re: [PATCH v6] uio: Fix uio driver to refcount device

2015-03-19 Thread Brian Russell
On 19/03/15 15:14, Greg Kroah-Hartman wrote: > On Thu, Mar 19, 2015 at 02:49:21PM +0000, Brian Russell wrote: >> On 19/03/15 14:23, Greg Kroah-Hartman wrote: >>> On Thu, Mar 19, 2015 at 02:11:19PM +0000, Brian Russell wrote: >>>>if (info->ir

[PATCH v7] uio: Fix uio driver to refcount device

2015-03-19 Thread Brian Russell
check accesses. Signed-off-by: Brian Russell --- drivers/uio/uio.c | 60 ++ include/linux/uio_driver.h | 2 +- 2 files changed, 41 insertions(+), 21 deletions(-) v7: use dev_set_name and fix error path in uio_register_device v6: ... and put

Re: [PATCH v6] uio: Fix uio driver to refcount device

2015-03-19 Thread Brian Russell
On 19/03/15 14:23, Greg Kroah-Hartman wrote: > On Thu, Mar 19, 2015 at 02:11:19PM +0000, Brian Russell wrote: >> Protect uio driver from its owner being unplugged while there are open fds. >> Embed struct device in struct uio_device, use refcounting on device, free >>

Re: [PATCH v5] uio: Fix uio driver to refcount device

2015-03-19 Thread Brian Russell
On 19/03/15 14:05, Greg Kroah-Hartman wrote: > On Thu, Mar 19, 2015 at 01:40:39PM +0000, Brian Russell wrote: >> Protect uio driver from its owner being unplugged while there are open fds. >> >> v5: add patch version changes >> >> v4: info struct passed in ui

[PATCH v6] uio: Fix uio driver to refcount device

2015-03-19 Thread Brian Russell
check accesses. Signed-off-by: Brian Russell --- drivers/uio/uio.c | 63 +++--- include/linux/uio_driver.h | 2 +- 2 files changed, 44 insertions(+), 21 deletions(-) v6: ... and put them in the right place v5: add patch version changes v4: info

[PATCH v5] uio: Fix uio driver to refcount device

2015-03-19 Thread Brian Russell
uio_device, use refcounting on device, free uio_device on release. v2: Add blank line to header Signed-off-by: Brian Russell --- drivers/uio/uio.c | 63 +++--- include/linux/uio_driver.h | 2 +- 2 files changed, 44 insertions(+), 21 deletions(-) diff

[PATCH v4] uio: Fix uio driver to refcount device

2015-03-19 Thread Brian Russell
check accesses. Signed-off-by: Brian Russell --- drivers/uio/uio.c | 63 +++--- include/linux/uio_driver.h | 2 +- 2 files changed, 44 insertions(+), 21 deletions(-) diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 6276f13..394cae0 100644

[PATCH v3] uio: Fix uio driver to refcount device

2015-03-19 Thread Brian Russell
Protect uio driver from crashing if its owner being unplugged while there are open fds. Embed struct device in struct uio_device, use refcounting on device, free uio_device on release. Signed-off-by: Brian Russell --- drivers/uio/uio.c | 54

Re: [PATCH v2] uio: Fix uio driver to refcount device

2015-03-18 Thread Brian Russell
Responding to myself ... On 13/03/15 10:17, Brian Russell wrote: > Protect uio driver from crashing if its owner is hot unplugged while there > are open fds. > > Signed-off-by: Brian Russell > --- > drivers/uio/uio.c | 8 +++- > 1 file changed, 7 insertions(+), 1

[PATCH v2] uio: Fix uio driver to refcount device

2015-03-13 Thread Brian Russell
Protect uio driver from crashing if its owner is hot unplugged while there are open fds. Signed-off-by: Brian Russell --- drivers/uio/uio.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 6276f13..70ce015 100644 --- a

Re: [PATCH] uio: Fix uio driver to refcount device

2015-03-11 Thread Brian Russell
On 11/03/15 16:02, Greg Kroah-Hartman wrote: > On Wed, Mar 11, 2015 at 03:59:36PM +0000, Brian Russell wrote: >> >> >> On 11/03/15 15:43, Greg Kroah-Hartman wrote: >>> On Wed, Mar 11, 2015 at 03:31:42PM +, Brian Russell wrote: >>>> Protect ui

Re: [PATCH] uio: Fix uio driver to refcount device

2015-03-11 Thread Brian Russell
On 11/03/15 15:43, Greg Kroah-Hartman wrote: > On Wed, Mar 11, 2015 at 03:31:42PM +0000, Brian Russell wrote: >> Protect uio driver from crashing if its owner is hot unplugged while there >> are open fds. >> Signed-off-by: Brian Russell > > Minor nit, you need a b

[PATCH] uio: Fix uio driver to refcount device

2015-03-11 Thread Brian Russell
Protect uio driver from crashing if its owner is hot unplugged while there are open fds. Signed-off-by: Brian Russell --- drivers/uio/uio.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 6276f13..70ce015 100644 --- a/drivers