epoll: Call poll_notify before unlock mutex
to avoid the race condition Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
7e8e5c10d1
commit
b72be1ddbf
@ -366,8 +366,8 @@ int epoll_ctl(int epfd, int op, int fd, FAR struct epoll_event *ev)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
nxmutex_unlock(&eph->lock);
|
|
||||||
poll_notify(&eph->poll, 1, POLLIN);
|
poll_notify(&eph->poll, 1, POLLIN);
|
||||||
|
nxmutex_unlock(&eph->lock);
|
||||||
return OK;
|
return OK;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
|
Loading…
Reference in New Issue
Block a user