Commit aafb2dd0 authored by Lars Ellenberg's avatar Lars Ellenberg Committed by Philipp Reisner

fix potential socket leak

If for some reason we get an unfortunately timed disconnect request,
we could have leak a socket.
Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 17f2ded9
......@@ -810,7 +810,7 @@ retry:
if (msock) {
dev_warn(DEV, "initial packet M crossed\n");
sock_release(msock);
}
}
msock = s;
set_bit(DISCARD_CONCURRENT, &mdev->flags);
break;
......@@ -822,9 +822,7 @@ retry:
}
}
if (mdev->state.conn <= C_DISCONNECTING)
return -1;
if (signal_pending(current)) {
if (signal_pending(current) || mdev->state.conn <= C_DISCONNECTING) {
flush_signals(current);
smp_rmb();
if (get_t_state(&mdev->receiver) == Exiting) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment