Re: [PATCH] staging: comedi: Fix comedi_device refcnt leak in comedi_open

2020-04-20 Thread Ian Abbott
On 20/04/2020 06:44, Xiyu Yang wrote: comedi_open() invokes comedi_dev_get_from_minor(), which returns a reference of the COMEDI device to "dev" with increased refcount. When comedi_open() returns, "dev" becomes invalid, so the refcount should be decreased to keep refcount balanced. The

[PATCH] staging: comedi: Fix comedi_device refcnt leak in comedi_open

2020-04-20 Thread Xiyu Yang
comedi_open() invokes comedi_dev_get_from_minor(), which returns a reference of the COMEDI device to "dev" with increased refcount. When comedi_open() returns, "dev" becomes invalid, so the refcount should be decreased to keep refcount balanced. The reference counting issue happens in one