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: <8760en5es2.fsf@free-electrons.com>
Date:   Thu, 20 Jul 2017 17:06:21 +0200
From:   Gregory CLEMENT <gregory.clement@...e-electrons.com>
To:     Rob Herring <robh@...nel.org>
Cc:     Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
        netdev@...r.kernel.org, devicetree@...r.kernel.org,
        Frank Rowand <frowand.list@...il.com>,
        Marcin Wojtas <mw@...ihalf.com>
Subject: Re: [PATCH 1/2] net: mvneta: remove bogus use of

Hi Rob,
 
 On jeu., juil. 20 2017, Rob Herring <robh@...nel.org> wrote:

(Adding Marcin in CC who wrote this part of code)

> Nothing sets ever sets data, so it is always NULL. Remove it as this is
> the only user of data ptr in the whole kernel, and it is going to be
> removed from struct device_node.

Actually the use of device_node.data ptr is not bogus and it is set in
mvneta_bm_probe:
http://elixir.free-electrons.com/linux/latest/source/drivers/net/ethernet/marvell/mvneta_bm.c#L433

Your patch will break the BM support on this driver. So if you need to
remove this data ptr, then you have to offer an alternative for it.

Thanks,

Gregory

>
> Cc: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
> Signed-off-by: Rob Herring <robh@...nel.org>
> ---
> Probably there's a better fix here to actually enable the h/w buffer 
> manager.
>
> I intend to take this thru the DT tree as patch 2 is dependent on this.
>
> Rob
>
>  drivers/net/ethernet/marvell/mvneta.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
> index 0aab74c2a209..5624f4b49f9d 100644
> --- a/drivers/net/ethernet/marvell/mvneta.c
> +++ b/drivers/net/ethernet/marvell/mvneta.c
> @@ -4296,8 +4296,8 @@ static int mvneta_probe(struct platform_device *pdev)
>  
>  	/* Obtain access to BM resources if enabled and already initialized */
>  	bm_node = of_parse_phandle(dn, "buffer-manager", 0);
> -	if (bm_node && bm_node->data) {
> -		pp->bm_priv = bm_node->data;
> +	if (bm_node) {
> +		pp->bm_priv = NULL;
>  		err = mvneta_bm_port_init(pdev, pp);
>  		if (err < 0) {
>  			dev_info(&pdev->dev, "use SW buffer management\n");
> -- 
> 2.11.0
>

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ