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: <20110331105811.5d989e86@bob.linux.org.uk>
Date:	Thu, 31 Mar 2011 10:58:11 +0100
From:	Alan Cox <alan@...ux.intel.com>
To:	Herton Ronaldo Krzesinski <herton.krzesinski@...onical.com>
Cc:	linux-kernel@...r.kernel.org, Greg Kroah-Hartman <gregkh@...e.de>
Subject: Re: [PATCH] vt: avoid BUG_ON in con_shutdown when con_open returns
 with error

O
> +static inline void con_ops_set_shutdown(void);
>  static int con_open(struct tty_struct *, struct file *);
>  static void vc_init(struct vc_data *vc, unsigned int rows,
>  		    unsigned int cols, int do_clear);
> @@ -2806,6 +2807,14 @@ static int con_open(struct tty_struct *tty,
> struct file *filp) tty->driver_data = vc;
>  			vc->port.tty = tty;
>  
> +			/* We must set shutdown only here, otherwise
> +			 * we returned from con_open with error,
> which
> +			 * will make tty core call tty_release, that
> +			 * in its call path makes con_shutdown being
> +			 * called without tty->driver_data being set,
> +			 * triggering the BUG_ON there */
> +			con_ops_set_shutdown();

No we cannot go around patching the tty_operations - they are not
locked for one.

Probably this is one case where making con_shutdown() check is the
right answer.
--
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