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]
Date:   Mon, 3 Jun 2019 21:08:21 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Suzuki K Poulose <suzuki.poulose@....com>
Cc:     linux-kernel@...r.kernel.org, rafael@...nel.org,
        Mathieu Poirier <mathieu.poirier@...aro.org>
Subject: Re: [RFC PATCH 03/57] drivers: coresight: Drop device references
 found via bus_find_device

On Mon, Jun 03, 2019 at 04:49:29PM +0100, Suzuki K Poulose wrote:
> We must drop references to the device found via bus_find_device().
> 
> Cc: Mathieu Poirier <mathieu.poirier@...aro.org>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@....com>
> ---
>  drivers/hwtracing/coresight/coresight.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight.c b/drivers/hwtracing/coresight/coresight.c
> index 4b13028..37ccd67 100644
> --- a/drivers/hwtracing/coresight/coresight.c
> +++ b/drivers/hwtracing/coresight/coresight.c
> @@ -540,7 +540,7 @@ struct coresight_device *coresight_get_enabled_sink(bool deactivate)
>  
>  	dev = bus_find_device(&coresight_bustype, NULL, &deactivate,
>  			      coresight_enabled_sink);
> -
> +	put_device(dev);
>  	return dev ? to_coresight_device(dev) : NULL;

You drop the reference and then use the pointer?

Not good :(

>  }
>  
> @@ -581,7 +581,7 @@ struct coresight_device *coresight_get_sink_by_id(u32 id)
>  
>  	dev = bus_find_device(&coresight_bustype, NULL, &id,
>  			      coresight_sink_by_id);
> -
> +	put_device(dev);
>  	return dev ? to_coresight_device(dev) : NULL;

Same here, not good :(

Please fix this up and it can go in as a bugfix like any other normal
patch, outside of this huge series.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ