Showing error 1677

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: net/rxrpc/ar-connection.c
Line in file: 351
Project: Linux Kernel
Project version: 2.6.28
Confirmation: Fixed by 0975ecba3b670df7c488a5e0e6fe9f1f370a8ad8
Tools: Smatch (1.59)
Entered: 2013-09-10 07:54:05 UTC


Source:

321        rb_link_node(&call->conn_node, parent, p);
322        rb_insert_color(&call->conn_node, &conn->calls);
323
324        write_unlock_bh(&conn->lock);
325}
326
327/*
328 * connect a call on an exclusive connection
329 */
330static int rxrpc_connect_exclusive(struct rxrpc_sock *rx,
331                                   struct rxrpc_transport *trans,
332                                   __be16 service_id,
333                                   struct rxrpc_call *call,
334                                   gfp_t gfp)
335{
336        struct rxrpc_connection *conn;
337        int chan, ret;
338
339        _enter("");
340
341        conn = rx->conn;
342        if (!conn) {
343                /* not yet present - create a candidate for a new connection
344                 * and then redo the check */
345                conn = rxrpc_alloc_connection(gfp);
346                if (IS_ERR(conn)) {
347                        _leave(" = %ld", PTR_ERR(conn));
348                        return PTR_ERR(conn);
349                }
350
351                conn->trans = trans;
352                conn->bundle = NULL;
353                conn->service_id = service_id;
354                conn->epoch = rxrpc_epoch;
355                conn->in_clientflag = 0;
356                conn->out_clientflag = RXRPC_CLIENT_INITIATED;
357                conn->cid = 0;
358                conn->state = RXRPC_CONN_CLIENT;
359                conn->avail_calls = RXRPC_MAXCALLS - 1;
360                conn->security_level = rx->min_sec_level;
361                conn->key = key_get(rx->key);
Show full sources