RE: [PATCH v2] driver: uio: fix possible memory leak and use-after-free in __uio_register_device

2019-01-07 Thread liujian (CE)
er: uio: fix possible memory leak and > use-after-free > in __uio_register_device > > On Fri, Jan 04, 2019 at 10:19:08PM +0800, liujian wrote: > > 'idev' is malloced in __uio_register_device() and leak free it before > > leaving from the uio_get_minor() error handin

Re: [PATCH v2] driver: uio: fix possible memory leak and use-after-free in __uio_register_device

2019-01-07 Thread Greg KH
On Fri, Jan 04, 2019 at 10:19:08PM +0800, liujian wrote: > 'idev' is malloced in __uio_register_device() and leak free it before > leaving from the uio_get_minor() error handing case, it will cause > memory leak. > > Also, in uio_dev_add_attributes() error handing case, idev is used after > device

Re: [PATCH v2] driver: uio: fix possible memory leak and use-after-free in __uio_register_device

2019-01-06 Thread Hamish Martin
On Fri, 2019-01-04 at 22:19 +0800, liujian wrote: > 'idev' is malloced in __uio_register_device() and leak free it before > leaving from the uio_get_minor() error handing case, it will cause > memory leak. > > Also, in uio_dev_add_attributes() error handing case, idev is used > after > device_unre