[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAD=FV=VUCH-6JKVciJ+wQKv1_4=xrgeqBm3QAmBB3fBktVP4eA@mail.gmail.com>
Date: Thu, 14 Nov 2024 14:37:22 -0800
From: Doug Anderson <dianders@...omium.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-usb@...r.kernel.org, stern@...land.harvard.edu,
linux-kernel@...r.kernel.org, Johan Hovold <johan@...nel.org>,
Grant Grundler <grundler@...omium.org>, Yajun Deng <yajun.deng@...ux.dev>,
Oliver Neukum <oneukum@...e.com>
Subject: Re: [PATCH v2 1/2] USB: make to_usb_driver() use container_of_const()
Hi,
On Wed, Nov 13, 2024 at 6:04 AM Greg Kroah-Hartman
<gregkh@...uxfoundation.org> wrote:
>
> Turns out that we have some const pointers being passed to
> to_usb_driver() but were not catching this. Change the macro to
> properly propagate the const-ness of the pointer so that we will notice
> when we try to write to memory that we shouldn't be writing to.
>
> This requires fixing up the usb_match_dynamic_id() function as well,
> because it can handle a const * to struct usb_driver.
>
> Cc: Johan Hovold <johan@...nel.org>
> Cc: Alan Stern <stern@...land.harvard.edu>
> Cc: Grant Grundler <grundler@...omium.org>
> Cc: Yajun Deng <yajun.deng@...ux.dev>
> Cc: Oliver Neukum <oneukum@...e.com>
> Cc: Douglas Anderson <dianders@...omium.org>
> Cc: linux-usb@...r.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> ---
> v2: reordered patches, goes on top of series submitted at https://lore.kernel.org/r/2024111322-kindly-finalist-d247@gregkh
>
> drivers/usb/core/driver.c | 4 ++--
> include/linux/usb.h | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
This looks reasonable to me. Assuming that there are no compiler
errors reported:
Reviewed-by: Douglas Anderson <dianders@...omium.org>
Powered by blists - more mailing lists