Commit 7f021998 authored by Robert Lubos's avatar Robert Lubos Committed by Martí Bolívar
Browse files

net: websockets: Fix ZFD_IOCTL_SET_LOCK handling



The websocket "socket" layer did not handle ZFD_IOCTL_SET_LOCK command,
and just forwarded it to the underlying socket. This overwritten the
mutex pointer used by the underlying socket, resulting in erroneous
behaviour in certain cases.

Signed-off-by: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
parent 8eba36dd
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -505,6 +505,10 @@ static int websocket_ioctl_vmeth(void *obj, unsigned int request, va_list args)
		return websocket_poll_offload(fds, nfds, timeout);
	}

	case ZFD_IOCTL_SET_LOCK:
		/* Ignore, don't want to overwrite underlying socket lock. */
		return 0;

	default: {
		const struct fd_op_vtable *vtable;
		void *core_obj;