[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZyNI3rQw6q4pkqpD@hovoldconsulting.com>
Date: Thu, 31 Oct 2024 10:07:42 +0100
From: Johan Hovold <johan@...nel.org>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] USB: serial: Fix use after free in debug printk
On Thu, Oct 31, 2024 at 09:59:10AM +0300, Dan Carpenter wrote:
> The dev_dbg() call dereferences "urb" but it was already freed on the
> previous line. Move the debug output earlier in the function.
Thanks for catching this, but please use a temporary variable for the
struct device pointer instead of changing the flow.
Also make sure to include the driver name in the patch summary prefix
(i.e. "USB: serial: io_edgeport: ..."):
> Fixes: 984f68683298 ("USB: serial: io_edgeport.c: remove dbg() usage")
> Cc: stable@...r.kernel.org
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
Johan
Powered by blists - more mailing lists