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: <20220516110803.zzpb6kwjovnfsshi@skbuf>
Date:   Mon, 16 May 2022 14:08:03 +0300
From:   Vladimir Oltean <olteanv@...il.com>
To:     Arun Ramadoss <arun.ramadoss@...rochip.com>
Cc:     linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        Russell King <linux@...linux.org.uk>,
        Woojung Huh <woojung.huh@...rochip.com>,
        UNGLinuxDriver@...rochip.com, Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Oleksij Rempel <linux@...pel-privat.de>,
        Marek Vasut <marex@...x.de>,
        Michael Grzeschik <m.grzeschik@...gutronix.de>,
        Eric Dumazet <edumazet@...gle.com>
Subject: Re: [RFC Patch net-next v2 3/9] net: dsa: microchip: perform the
 compatibility check for dev probed

On Fri, May 13, 2022 at 03:52:13PM +0530, Arun Ramadoss wrote:
> +static int ksz_check_device_id(struct ksz_device *dev)
> +{
> +	const struct ksz_chip_data *dt_chip_data;
> +
> +	dt_chip_data = of_device_get_match_data(dev->dev);

And one other comment. You haven't converted ksz8863_smi.c to put
anything in struct of_device_id :: data, so that driver will dereference
NULL here.

> +
> +	/* Check for Device Tree and Chip ID */
> +	if (dt_chip_data->chip_id != dev->chip_id) {
> +		dev_err(dev->dev,
> +			"Device tree specifies chip %s but found %s, please fix it!\n",
> +			dt_chip_data->dev_name, dev->info->dev_name);
> +		return -ENODEV;
> +	}
> +
> +	return 0;
> +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ