Messages in this thread | | | Date | Tue, 26 Nov 2019 17:50:59 +0200 | From | Heikki Krogerus <> | Subject | Re: [PATCH] usb: roles: fix a potential use after free |
| |
On Tue, Nov 26, 2019 at 05:49:17PM +0200, Heikki Krogerus wrote: > On Sun, Nov 24, 2019 at 10:22:36PM +0800, Wen Yang wrote: > > Free the sw structure only after we are done using it. > > This patch just moves the put_device() down a bit to avoid the > > use after free. > > > > Fixes: 5c54fcac9a9d ("usb: roles: Take care of driver module reference counting") > > Signed-off-by: Wen Yang <wenyang@linux.alibaba.com> > > Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com> > > Cc: Hans de Goede <hdegoede@redhat.com> > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > Cc: Chunfeng Yun <chunfeng.yun@mediatek.com> > > Cc: Suzuki K Poulose <suzuki.poulose@arm.com> > > Cc: linux-usb@vger.kernel.org > > Cc: linux-kernel@vger.kernel.org
Ups, sorry. I meant:
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
thanks,
-- heikki
| |