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: <YCwFb2X96fAaMICn@kroah.com>
Date:   Tue, 16 Feb 2021 18:48:31 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Maciej Kwapulinski <maciej.kwapulinski@...ux.intel.com>
Cc:     Arnd Bergmann <arnd@...db.de>, Jonathan Corbet <corbet@....net>,
        Derek Kiernan <derek.kiernan@...inx.com>,
        Dragan Cvetic <dragan.cvetic@...inx.com>,
        linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
        Tomasz Jankowski <tomasz1.jankowski@...el.com>,
        Savo Novakovic <savox.novakovic@...el.com>,
        Jianxun Zhang <jianxun.zhang@...ux.intel.com>
Subject: Re: [PATCH v1 12/12] gna: add a char device

On Tue, Feb 16, 2021 at 05:05:25PM +0100, Maciej Kwapulinski wrote:
> +static inline struct gna_private *inode_to_gna(struct inode *inode)
> +{
> +	return container_of(inode->i_cdev, struct gna_private, cdev);
> +}
> +
> +static int gna_open(struct inode *inode, struct file *f)
> +{
> +	struct gna_file_private *file_priv;
> +	struct gna_private *gna_priv;
> +
> +	gna_priv = inode_to_gna(inode);
> +	if (!gna_priv)
> +		return -ENODEV;

Why are you testing for things that is impossible to ever happen?

Please go read your own function for proof...

{sigh}

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ