rds: use RCU to synchronize work-enqueue with connection teardown
Sowmini Varadhan authored

rds_sendmsg() can enqueue work on cp_send_w from process context, but
it should not enqueue this work if connection teardown  has commenced
(else we risk enquing work after rds_conn_path_destroy() has assumed that
all work has been cancelled/flushed).

Similarly some other functions like rds_cong_queue_updates
and rds_tcp_data_ready are called in softirq context, and may end
up enqueuing work on rds_wq after rds_conn_path_destroy() has assumed
that all workqs are quiesced.

Check the RDS_DESTROY_PENDING bit and use rcu synchronization to avoid
all these races.
Signed-off-by: default avatarSowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
3db6e0d1
Name Last commit Last update
Documentation Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
arch s390/diag: add diag26c support for VNIC info
block block-throttle: avoid double charge
certs License cleanup: add SPDX GPL-2.0 license identifier to files with no license
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
drivers net: dsa: lan9303: Fix error return code in lan9303_check_device()
firmware kbuild: remove all dummy assignments to obj-
fs Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
include net: sched: fix tcf_block_get_ext() in case CONFIG_NET_CLS is not set
init Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
ipc Rename superblock flags (MS_xyz -> SB_xyz)
kernel Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
lib Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
mm Merge branch 'for-linus' of git://git.kernel.dk/linux-block
net rds: use RCU to synchronize work-enqueue with connection teardown
samples Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
scripts Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
security Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
sound ALSA: hda - Fix missing COEF init for ALC225/295/299
tools selftests: rtnetlink: add erspan and ip6erspan
usr initramfs: fix initramfs rebuilds w/ compression after disabling
virt Merge tag 'kvm-arm-fixes-for-v4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Add hch to .get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Linux kernel
============

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

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.