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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090206160555.b95e02bc.akpm@linux-foundation.org>
Date:	Fri, 6 Feb 2009 16:05:55 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Bryan Wu <cooloney@...nel.org>
Cc:	alan@...rguk.ukuu.org.uk, linux-kernel@...r.kernel.org,
	sonic.zhang@...log.com, cooloney@...nel.org
Subject: Re: [PATCH] tty: fix bug - kernel can't be pinged through when
 bootargs console=null

On Fri,  6 Feb 2009 16:27:57 +0800
Bryan Wu <cooloney@...nel.org> wrote:

> From: Sonic Zhang <sonic.zhang@...log.com>
> 
> when pass bootargs console=null into kernel from u-boot, the booted up
> kernel can't be pinged through. This happens after the kernel is upgraded
> to 2.6.28.
> 
> Should check if tty_driver is NULL before call kref_get() in tty_driver_kref_get().
> 
> Signed-off-by: Sonic Zhang <sonic.zhang@...log.com>
> Signed-off-by: Bryan Wu <cooloney@...nel.org>
> ---
>  include/linux/tty_driver.h |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
> index 08e0883..2a602a8 100644
> --- a/include/linux/tty_driver.h
> +++ b/include/linux/tty_driver.h
> @@ -312,7 +312,8 @@ extern struct tty_driver *tty_find_polling_driver(char *name, int *line);
>  extern void tty_driver_kref_put(struct tty_driver *driver);
>  extern inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d)
>  {
> -	kref_get(&d->kref);
> +	if (d)
> +		kref_get(&d->kref);
>  	return d;
>  }
>  

Did any earlier kernel versions handle this situation OK?

If so, we might need to be back-compatible with buggy userspace :(
--
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