Skip to content

Commit

Permalink
[PATCH] pSeries hvsi char driver null pointer deref
Browse files Browse the repository at this point in the history
Under certain rare circumstances, it appears that there can be be a
NULL-pointer deref when a user fiddles with terminal emeulation programs while
outpu is being sent to the console.  This patch checks for and avoids a
NULL-pointer deref.

Signed-off-by: Hollis Blanchard <hollisbl@austin.ibm.com>
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Linas Vepstas authored and Linus Torvalds committed Aug 6, 2006
1 parent 825e037 commit 229395c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/char/hvsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,8 @@ static void hvsi_recv_control(struct hvsi_struct *hp, uint8_t *packet,
/* CD went away; no more connection */
pr_debug("hvsi%i: CD dropped\n", hp->index);
hp->mctrl &= TIOCM_CD;
if (!(hp->tty->flags & CLOCAL))
/* If userland hasn't done an open(2) yet, hp->tty is NULL. */
if (hp->tty && !(hp->tty->flags & CLOCAL))
*to_hangup = hp->tty;
}
break;
Expand Down

0 comments on commit 229395c

Please sign in to comment.