The patch titled flag parameters: arch-specific SOCK_NONBLOCK has been removed from the -mm tree. Its filename was flag-parameters-paccept-fix-flag-parameters-arch-specific-sock_nonblock.patch This patch was dropped because it was folded into flag-parameters-paccept.patch The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: flag parameters: arch-specific SOCK_NONBLOCK From: Ulrich Drepper <drepper@xxxxxxxxxx> The value of O_NONBLOCK clashes on Alpha dn PARISC with the bits used for socket types. Therefore we cannot define SOCK_NONBLOCK as O_NONBLOCK on these platforms. This patch adds support for an arch-specific SOCK_NONBLOCK value which doesn't add costs for other architectures. Signed-off-by: Ulrich Drepper <drepper@xxxxxxxxxx> Cc: Davide Libenzi <davidel@xxxxxxxxxxxxxxx> Cc: Michael Kerrisk <mtk.manpages@xxxxxxxxxxxxxx> Cc: Ulrich Drepper <drepper@xxxxxxxxxx> Cc: Roland McGrath <roland@xxxxxxxxxx> Acked-by: Kyle McMartin <kyle@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/asm-alpha/socket.h | 5 +++++ include/asm-parisc/socket.h | 5 +++++ net/socket.c | 9 +++++++++ 3 files changed, 19 insertions(+) diff -puN include/asm-alpha/socket.h~flag-parameters-paccept-fix-flag-parameters-arch-specific-sock_nonblock include/asm-alpha/socket.h --- a/include/asm-alpha/socket.h~flag-parameters-paccept-fix-flag-parameters-arch-specific-sock_nonblock +++ a/include/asm-alpha/socket.h @@ -62,4 +62,9 @@ #define SO_MARK 36 +/* O_NONBLOCK clashes with the bits used for socket types. Therefore we + * have to define SOCK_NONBLOCK to a different value here. + */ +#define SOCK_NONBLOCK 0x40000000 + #endif /* _ASM_SOCKET_H */ diff -puN include/asm-parisc/socket.h~flag-parameters-paccept-fix-flag-parameters-arch-specific-sock_nonblock include/asm-parisc/socket.h --- a/include/asm-parisc/socket.h~flag-parameters-paccept-fix-flag-parameters-arch-specific-sock_nonblock +++ a/include/asm-parisc/socket.h @@ -54,4 +54,9 @@ #define SO_MARK 0x401f +/* O_NONBLOCK clashes with the bits used for socket types. Therefore we + * have to define SOCK_NONBLOCK to a different value here. + */ +#define SOCK_NONBLOCK 0x40000000 + #endif /* _ASM_SOCKET_H */ diff -puN include/linux/net.h~flag-parameters-paccept-fix-flag-parameters-arch-specific-sock_nonblock include/linux/net.h diff -puN net/socket.c~flag-parameters-paccept-fix-flag-parameters-arch-specific-sock_nonblock net/socket.c --- a/net/socket.c~flag-parameters-paccept-fix-flag-parameters-arch-specific-sock_nonblock +++ a/net/socket.c @@ -1226,6 +1226,9 @@ asmlinkage long sys_socket(int family, i return -EINVAL; type &= SOCK_TYPE_MASK; + if (SOCK_NONBLOCK != O_NONBLOCK && (flags & SOCK_NONBLOCK)) + flags = (flags & ~SOCK_NONBLOCK) | O_NONBLOCK; + retval = sock_create(family, type, protocol, &sock); if (retval < 0) goto out; @@ -1260,6 +1263,9 @@ asmlinkage long sys_socketpair(int famil return -EINVAL; type &= SOCK_TYPE_MASK; + if (SOCK_NONBLOCK != O_NONBLOCK && (flags & SOCK_NONBLOCK)) + flags = (flags & ~SOCK_NONBLOCK) | O_NONBLOCK; + /* * Obtain the first socket and check if the underlying protocol * supports the socketpair call. @@ -1425,6 +1431,9 @@ long do_accept(int fd, struct sockaddr _ if (flags & ~SOCK_CLOEXEC) return -EINVAL; + if (SOCK_NONBLOCK != O_NONBLOCK && (flags & SOCK_NONBLOCK)) + flags = (flags & ~SOCK_NONBLOCK) | O_NONBLOCK; + sock = sockfd_lookup_light(fd, &err, &fput_needed); if (!sock) goto out; _ Patches currently in -mm which might be from drepper@xxxxxxxxxx are origin.patch flag-parameters-socket-and-socketpair.patch flag-parameters-paccept.patch flag-parameters-paccept-fix-flag-parameters-arch-specific-sock_nonblock.patch flag-parameters-paccept-flag-parameters-paccept-w-out-set_restore_sigmask.patch flag-parameters-paccept-sys_ni.patch flag-parameters-anon_inode_getfd-extension.patch flag-parameters-anon_inode_getfd-extension-fix.patch flag-parameters-signalfd.patch flag-parameters-signalfd-fix.patch flag-parameters-eventfd.patch flag-parameters-eventfd-fix.patch flag-parameters-timerfd_create.patch flag-parameters-epoll_create.patch flag-parameters-dup2.patch flag-parameters-pipe.patch flag-parameters-inotify_init.patch flag-parameters-inotify_init-fix.patch flag-parametersi-nonblock-in-anon_inode_getfd.patch flag-parameters-nonblock-in-socket-and-socketpair.patch flag-parameters-nonblock-in-signalfd.patch flag-parameters-nonblock-in-eventfd.patch flag-parameters-nonblock-in-timerfd_create.patch flag-parameters-nonblock-in-pipe.patch flag-parameters-nonblock-in-inotify_init.patch flag-parameters-check-magic-constants.patch flag-parameters-check-magic-constants-alpha.patch flag-parameters-add-on-remove-epoll_create-size-param.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html