I found that normally it is O_NONBLOCK but there are different value for some arch. /include/linux/net.h: #ifndef SOCK_NONBLOCK #define SOCK_NONBLOCK O_NONBLOCK #endif /arch/alpha/include/asm/socket.h: #define SOCK_NONBLOCK 0x40000000 Use SOCK_NONBLOCK instead of O_NONBLOCK for kernel_accept().
Unified · Split
| @@ -230,7 +230,7 @@ static int ksmbd_kthread_fn(void *p) · 229 unmodified lines | |||
| 230 | break; | 230 | break; |
| 231 | } | 231 | } |
| 232 | ret = kernel_accept(iface->ksmbd_socket, &client_sk, | 232 | ret = kernel_accept(iface->ksmbd_socket, &client_sk, |
| 233 | O_NONBLOCK); | 233 | SOCK_NONBLOCK); |
| 234 | mutex_unlock(&iface->sock_release_lock); | 234 | mutex_unlock(&iface->sock_release_lock); |
| 235 | if (ret) { | 235 | if (ret) { |
| 236 | if (ret == -EAGAIN) | 236 | if (ret == -EAGAIN) |