From: Bryan Wu <cooloney@kernel.org>
To: alan@lxorguk.ukuu.org.uk
Cc: linux-kernel@vger.kernel.org,
Sonic Zhang <sonic.zhang@analog.com>,
Bryan Wu <cooloney@kernel.org>
Subject: [PATCH] tty: fix bug - kernel can't be pinged through when bootargs console=null
Date: Fri, 6 Feb 2009 16:27:57 +0800 [thread overview]
Message-ID: <1233908877-7729-1-git-send-email-cooloney@kernel.org> (raw)
From: Sonic Zhang <sonic.zhang@analog.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@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.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;
}
--
1.5.6.3
next reply other threads:[~2009-02-06 8:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-06 8:27 Bryan Wu [this message]
2009-02-06 10:06 ` [PATCH] tty: fix bug - kernel can't be pinged through when bootargs console=null Alan Cox
2009-02-07 0:05 ` Andrew Morton
2009-02-07 0:09 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1233908877-7729-1-git-send-email-cooloney@kernel.org \
--to=cooloney@kernel.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=sonic.zhang@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.