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] [day] [month] [year] [list]
Message-ID: <20120417161455.GB4382@osiris.boeblingen.de.ibm.com>
Date:	Tue, 17 Apr 2012 18:14:55 +0200
From:	Heiko Carstens <heiko.carstens@...ibm.com>
To:	Paul Gortmaker <paul.gortmaker@...driver.com>
Cc:	linux-kernel@...r.kernel.org, Jiri Slaby <jslaby@...e.cz>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux390@...ibm.com, linux-s390@...r.kernel.org
Subject: Re: [PATCH] s390: fix build failure in con3215.c tty wakeup tasklet

On Tue, Apr 17, 2012 at 12:07:09PM -0400, Paul Gortmaker wrote:
> Commit 86b26007a37d81e7aca242bb5b649473f8f81297 (tty-next)
> 
>     "TTY: con3215, use tty from tty_port"
> 
> removed the tty struct from the raw struct, causing:
> 
>   CC      drivers/s390/char/con3215.o
> drivers/s390/char/con3215.c: In function 'raw3215_wakeup':
> drivers/s390/char/con3215.c:339:16: error: 'struct raw3215_info' has no member named 'tty'
> make[2]: *** [drivers/s390/char/con3215.o] Error 1

...

> diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c
> index e928e04..759c43c 100644
> --- a/drivers/s390/char/con3215.c
> +++ b/drivers/s390/char/con3215.c
> @@ -336,7 +336,13 @@ static inline void raw3215_try_io(struct raw3215_info *raw)
>  static void raw3215_wakeup(unsigned long data)
>  {
>  	struct raw3215_info *raw = (struct raw3215_info *) data;
> -	tty_wakeup(raw->tty);
> +	struct tty_struct *tty = tty_port_tty_get(&raw->port);
> +
> +	if (tty == NULL)
> +		return;
> +
> +	tty_wakeup(tty);
> +	tty_kref_put(tty);

Yep, I posted a similar patch earlier:
http://marc.info/?l=linux-next&m=133466152209052&w=2

The NULL check is not necessary, because "it cannot happen" ;)

Thanks,
Heiko

--
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