[PATCH] af_rxrpc accept race (was: RxRPC: 3 issues found in my example code)

Tim Smith tim at electronghost.co.uk
Mon May 12 09:46:13 PDT 2014


On Monday 12 May 2014 14:10:12 David Howells wrote:
> Tim Smith <tim at electronghost.co.uk> wrote:
> > rxrpc_setup_incoming_call() cannot be called with an rxrpc_sock in state
> > RXRPC_CLOSE, so the check and exit path can be removed.
> 
> Why not?  Can't there be a race between rxrpc_release_sock() and
> rxrpc_setup_incoming_call()?  That is, cannot the application be closing the
> socket at the same time as a new call is coming in?

rxrpc_setup_incoming_call() is static and is called only from 
rxrpc_accept_incoming_call(), which already contains this check.

Am I missing something?

-- 
Tim Smith <tim at electronghost.co.uk>
Romantic longing leads to an inefficient appliance.
    -- Gunnerkrigg Court Student's Handbook, Chapter 113, Section H
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/linux-afs/attachments/20140512/5ebcd9d5/attachment.sig>


More information about the linux-afs mailing list