[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <45DB4280.6030102@qualcomm.com>
Date: Tue, 20 Feb 2007 10:48:32 -0800
From: Max Krasnyansky <maxk@...lcomm.com>
To: davem@...emloft.net
CC: netdev@...r.kernel.org, jon.maloy@...csson.com,
allan.stephens@...driver.com
Subject: Re: [TIPC] Missing null check in the socket code.
Max Krasnyansky wrote:
> Fixes an oops in the non-blocking mode.
>
> Signed-off-by: Max Krasnyansky <maxk@...lcomm.com>
> ---
> net/tipc/socket.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/net/tipc/socket.c b/net/tipc/socket.c
> index 2a6a5a6..767f791 100644
> --- a/net/tipc/socket.c
> +++ b/net/tipc/socket.c
> @@ -862,6 +862,10 @@ restart:
> /* Get access to first message in receive queue */
>
> buf = skb_peek(&sock->sk->sk_receive_queue);
> + if (NULL == buf) {
> + res = -EAGAIN;
> + goto exit;
> + }
> msg = buf_msg(buf);
> sz = msg_data_sz(msg);
> err = msg_errcode(msg);
Just a reminder. Please apply.
Thanx
Max
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists