]> git.hungrycats.org Git - linux/commit
USB: serial: io_edgeport: fix use after free in debug printk
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 31 Oct 2024 09:48:30 +0000 (12:48 +0300)
committerJohan Hovold <johan@kernel.org>
Thu, 31 Oct 2024 13:18:51 +0000 (14:18 +0100)
commit37bb5628379295c1254c113a407cab03a0f4d0b4
treeee3e41700e389885f6fce4e699bfd21b3b15bfdb
parent3b05949ba39f305b585452d0e177470607842165
USB: serial: io_edgeport: fix use after free in debug printk

The "dev_dbg(&urb->dev->dev, ..." which happens after usb_free_urb(urb)
is a use after free of the "urb" pointer.  Store the "dev" pointer at the
start of the function to avoid this issue.

Fixes: 984f68683298 ("USB: serial: io_edgeport.c: remove dbg() usage")
Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/io_edgeport.c