net: qrtr: Prevent stale ports from sending
The current implementation of the control port bind releases and
reacquires the port lock between allocating the port idr and resetting
the existing sockets. This creates a race condition where sockets
can send to the control port during the control port bind. Hold the
lock for the duration of the control port bind to prevent this.
In order to prevent messages from stale sockets being sent, check if
ENETRESET has been set on the socket and drop the packet.
Change-Id: Ie9abc6c51139e82d3c9ebd4d546d1acd7269875e
Signed-off-by:
Chris Lew <clew@codeaurora.org>
Loading
Please register or sign in to comment