lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <74d2559e-eb27-f9e4-2287-66c857032652@intel.com>
Date:   Fri, 17 Mar 2023 10:33:11 -0700
From:   Dave Jiang <dave.jiang@...el.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org
Cc:     rafael@...nel.org, Fenghua Yu <fenghua.yu@...el.com>,
        Vinod Koul <vkoul@...nel.org>, dmaengine@...r.kernel.org
Subject: Re: [PATCH 32/36] dmaengine: idxd: use const struct bus_type *



On 3/13/23 11:29 AM, Greg Kroah-Hartman wrote:
> In the functions unbind_store() and bind_store(), a struct bus_type *
> should be a const one, as the driver core bus functions used by this
> variable are expecting the pointer to be constant, and these functions
> do not modify the pointer at all.
> 
> Cc: Fenghua Yu <fenghua.yu@...el.com>
> Cc: Dave Jiang <dave.jiang@...el.com>
> Cc: Vinod Koul <vkoul@...nel.org>
> Cc: dmaengine@...r.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

Acked-by: Dave Jiang <dave.jiang@...el.com>

> ---
> Note, this is a patch that is a prepatory cleanup as part of a larger
> series of patches that is working on resolving some old driver core
> design mistakes.  It will build and apply cleanly on top of 6.3-rc2 on
> its own, but I'd prefer if I could take it through my driver-core tree
> so that the driver core changes can be taken through there for 6.4-rc1.
> 
>   drivers/dma/idxd/compat.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/idxd/compat.c b/drivers/dma/idxd/compat.c
> index 3df21615f888..5fd38d1b9d28 100644
> --- a/drivers/dma/idxd/compat.c
> +++ b/drivers/dma/idxd/compat.c
> @@ -16,7 +16,7 @@ extern void device_driver_detach(struct device *dev);
>   
>   static ssize_t unbind_store(struct device_driver *drv, const char *buf, size_t count)
>   {
> -	struct bus_type *bus = drv->bus;
> +	const struct bus_type *bus = drv->bus;
>   	struct device *dev;
>   	int rc = -ENODEV;
>   
> @@ -32,7 +32,7 @@ static DRIVER_ATTR_IGNORE_LOCKDEP(unbind, 0200, NULL, unbind_store);
>   
>   static ssize_t bind_store(struct device_driver *drv, const char *buf, size_t count)
>   {
> -	struct bus_type *bus = drv->bus;
> +	const struct bus_type *bus = drv->bus;
>   	struct device *dev;
>   	struct device_driver *alt_drv = NULL;
>   	int rc = -ENODEV;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ