From: David Howells <dhowells@redhat.com>
To: netdev@vger.kernel.org
Cc: dhowells@redhat.com, linux-afs@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH net 2/6] rxrpc: Need to flag call as being released on connect failure
Date: Tue, 09 Aug 2016 17:33:25 +0100 [thread overview]
Message-ID: <147076040590.13232.15006934873155574657.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <147076039224.13232.8512451280294417362.stgit@warthog.procyon.org.uk>
If rxrpc_new_client_call() fails to make a connection, the call record that
it allocated needs to be marked as RXRPC_CALL_RELEASED before it is passed
to rxrpc_put_call() to indicate that it no longer has any attachment to the
AF_RXRPC socket.
Without this, an assertion failure may occur at:
net/rxrpc/call_object:635
Signed-off-by: David Howells <dhowells@redhat.com>
---
net/rxrpc/call_object.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c
index e8c953c48cb8..ae057e0740f3 100644
--- a/net/rxrpc/call_object.c
+++ b/net/rxrpc/call_object.c
@@ -275,6 +275,7 @@ error:
list_del_init(&call->link);
write_unlock_bh(&rxrpc_call_lock);
+ set_bit(RXRPC_CALL_RELEASED, &call->flags);
call->state = RXRPC_CALL_DEAD;
rxrpc_put_call(call);
_leave(" = %d", ret);
@@ -287,6 +288,7 @@ error:
*/
found_user_ID_now_present:
write_unlock(&rx->call_lock);
+ set_bit(RXRPC_CALL_RELEASED, &call->flags);
call->state = RXRPC_CALL_DEAD;
rxrpc_put_call(call);
_leave(" = -EEXIST [%p]", call);
next prev parent reply other threads:[~2016-08-09 16:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-09 16:33 [PATCH net 0/6] rxrpc: Miscellaneous fixes David Howells
2016-08-09 16:33 ` [PATCH net 1/6] rxrpc: fix uninitialized pointer dereference in debug code David Howells
2016-08-09 16:33 ` David Howells [this message]
2016-08-09 16:33 ` [PATCH net 3/6] rxrpc: Don't access connection from call if pointer is NULL David Howells
2016-08-09 16:33 ` [PATCH net 4/6] rxrpc: Once packet posted in data_ready, don't retry posting David Howells
2016-08-09 16:33 ` [PATCH net 5/6] rxrpc: Fix a use-after-push in data_ready handler David Howells
2016-08-09 16:33 ` [PATCH net 6/6] rxrpc: Free packets discarded in data_ready David Howells
2016-08-09 19:57 ` [PATCH net 0/6] rxrpc: Miscellaneous fixes David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=147076040590.13232.15006934873155574657.stgit@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=linux-afs@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®