lkml.org 
[lkml]   [2006]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 26/30] Char: isicom, fix close bug
    -stable review patch.  If anyone has any objections, please let us know.
    ------------------

    From: Jiri Slaby <jirislaby@gmail.com>

    [PATCH] Char: isicom, fix close bug

    port is dereferenced even if it is NULL. Dereference it _after_ the
    check if (!port)... Thanks Eric <ef87@yahoo.com> for reporting this.

    This fixes

    http://bugzilla.kernel.org/show_bug.cgi?id=7527

    Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
    Signed-off-by: Linus Torvalds <torvalds@osdl.org>
    Signed-off-by: Chris Wright <chrisw@sous-sol.org>
    ---

    drivers/char/isicom.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    --- linux-2.6.18.2.orig/drivers/char/isicom.c
    +++ linux-2.6.18.2/drivers/char/isicom.c
    @@ -1062,11 +1062,12 @@ static void isicom_shutdown_port(struct
    static void isicom_close(struct tty_struct *tty, struct file *filp)
    {
    struct isi_port *port = tty->driver_data;
    - struct isi_board *card = port->card;
    + struct isi_board *card;
    unsigned long flags;

    if (!port)
    return;
    + card = port->card;
    if (isicom_paranoia_check(port, tty->name, "isicom_close"))
    return;

    --
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-11-16 03:57    [W:0.029 / U:60.496 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site