[lkml]   [2007]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[patch 16/33] Fix IRDA oopser
    -stable review patch.  If anyone has any objections, please let us know.

    From: Olaf Kirch <>

    This fixes and OOPS due to incorrect socket orpahning in the
    IRDA stack.

    [IrDA]: Correctly handling socket error

    This patch fixes an oops first reported in mid 2006 - see The cause of this bug report is that
    when an error is signalled on the socket, irda_recvmsg_stream returns
    without removing a local wait_queue variable from the socket's sk_sleep
    queue. This causes havoc further down the road.

    In response to this problem, a patch was made that invoked sock_orphan on
    the socket when receiving a disconnect indication. This is not a good fix,
    as this sets sk_sleep to NULL, causing applications sleeping in recvmsg
    (and other places) to oops.

    This is against the latest net-2.6 and should be considered for -stable

    Signed-off-by: Olaf Kirch <>
    Signed-off-by: Samuel Ortiz <>
    Signed-off-by: David S. Miller <>
    Signed-off-by: Greg Kroah-Hartman <>

    net/irda/af_irda.c | 3 +--
    1 file changed, 1 insertion(+), 2 deletions(-)

    --- a/net/irda/af_irda.c
    +++ b/net/irda/af_irda.c
    @@ -138,7 +138,6 @@ static void irda_disconnect_indication(v
    sk->sk_shutdown |= SEND_SHUTDOWN;

    - sock_orphan(sk);

    /* Close our TSAP.
    @@ -1446,7 +1445,7 @@ static int irda_recvmsg_stream(struct ki
    ret = sock_error(sk);
    if (ret)
    - break;
    + ;
    else if (sk->sk_shutdown & RCV_SHUTDOWN)
    else if (noblock)
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2007-04-26 19:03    [W:0.023 / U:6.532 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site