mptcp: fix races between shutdown and recvmsg
Paolo Abeni authored
[ Upstream commit 5969856a ]

The msk sk_shutdown flag is set by a workqueue, possibly
introducing some delay in user-space notification. If the last
subflow carries some data with the fin packet, the user space
can wake-up before RCV_SHUTDOWN is set. If it executes unblocking
recvmsg(), it may return with an error instead of eof.

Address the issue explicitly checking for eof in recvmsg(), when
no data is found.

Fixes: 59832e24

 ("mptcp: subflow: check parent mptcp socket on subflow state change")
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Reviewed-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
ca2dc676
Name Last commit Last update
Documentation lib/lzo: fix ambiguous encoding bug in lzo-rle
LICENSES LICENSES: Rename other to deprecated
arch x86/{mce,mm}: Unmap the entire page if the whole page is affected and poisoned
block Revert "block: end bio with BLK_STS_AGAIN in case of non-mq devs and REQ_NOWAIT"
certs .gitignore: add SPDX License Identifier
crypto crypto: drbg - fix error return code in drbg_alloc_state()
drivers ionic: wait on queue start until after IFF_UP
fs nilfs2: fix null pointer dereference at nilfs_segctor_do_construct()
include dccp: Fix possible memleak in dccp_init and dccp_fini
init Merge tag 'x86_urgent_for_v5.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
ipc ipc/util.c: sysvipc_find_ipc() incorrectly updates position index
kernel padata: add separate cpuhp node for CPUHP_PADATA_DEAD
lib lib: fix bitmap_parse() on 64-bit big endian archs
mm gup: document and work around "COW can break either way" issue
net mptcp: fix races between shutdown and recvmsg
samples Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
scripts checkpatch/coding-style: deprecate 80-column warning
security smack: avoid unused 'sip' variable warning
sound ALSA: usb-audio: Add vendor, product and profile name for HP Thunderbolt Dock
tools selftests/net: in rxtimestamp getopt_long needs terminating null entry
usr kbuild: fix comment about missing include guard detection
virt KVM: x86: Fix APIC page invalidation race
.clang-format clang-format: Update with the latest for_each macro list
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl
.gitattributes .gitattributes: use 'dts' diff driver for dts files
.gitignore .gitignore: add SPDX License Identifier
.mailmap i2c: use my kernel.org address from now on
COPYING COPYING: state that all contributions really are covered by this file
CREDITS MAINTAINERS: Hand MIPS over to Thomas
Kbuild kbuild: rename hostprogs-y/always to hostprogs/always-y
Kconfig docs: kbuild: convert docs to ReST and rename to *.rst
MAINTAINERS Merge branch 'akpm' (patches from Andrew)
Makefile Linux 5.7.2
README Drop all 00-INDEX files from Documentation/
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.