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: <4B1A6B28.2020501@gmail.com>
Date:	Sat, 05 Dec 2009 15:16:08 +0100
From:	Jiri Slaby <jirislaby@...il.com>
To:	Emese Revfy <re.emese@...il.com>
CC:	gregkh@...e.de, linux-kernel@...r.kernel.org,
	Alan Cox <alan@...rguk.ukuu.org.uk>
Subject: Re: [PATCH 11/31] Constify struct file_operations for 2.6.32 v1

On 12/05/2009 01:02 AM, Emese Revfy wrote:
> diff --git a/drivers/char/pty.c b/drivers/char/pty.c
> index 62f282e..d39c67b 100644
> --- a/drivers/char/pty.c
> +++ b/drivers/char/pty.c
> @@ -682,7 +682,18 @@ static int ptmx_open(struct inode *inode, struct file *filp)
>  	return ret;
>  }
>  
> -static struct file_operations ptmx_fops;
> +static const struct file_operations ptmx_fops = {
> +	.llseek		= no_llseek,
> +	.read		= tty_read,
> +	.write		= tty_write,
> +	.poll		= tty_poll,
> +	.unlocked_ioctl	= tty_ioctl,
> +	.compat_ioctl	= tty_compat_ioctl,
> +	.open		= ptmx_open,
> +	.release	= tty_release,
> +	.fasync		= tty_fasync,
> +};
> +
>  
>  static void __init unix98_pty_init(void)
>  {
> @@ -736,9 +747,6 @@ static void __init unix98_pty_init(void)
>  	register_sysctl_table(pty_root_table);
>  
>  	/* Now create the /dev/ptmx special device */
> -	tty_default_fops(&ptmx_fops);
> -	ptmx_fops.open = ptmx_open;
> -

Apart you CCed hundreds of people and mixed thousand things together
into one patch, this makes no sense.

I think the purpose was to not have the fops on multiple places. When
one changes tty_fops, he has to change even ptmx_fops from now on. Not
that I would say the current approach is clean, but this makes it worse IMO.

And as Greg pointed out, you made many functions global for no real income.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ