All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Steve Wise <swise@opengridcomputing.com>,
	Roland Dreier <roland@purestorage.com>
Subject: [PATCH 3.10 50/71] RDMA/iwcm: Use a default listen backlog if needed
Date: Mon, 15 Sep 2014 12:26:48 -0700	[thread overview]
Message-ID: <20140915192640.365603644@linuxfoundation.org> (raw)
In-Reply-To: <20140915192638.702282534@linuxfoundation.org>

3.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Steve Wise <swise@opengridcomputing.com>

commit 2f0304d21867476394cd51a54e97f7273d112261 upstream.

If the user creates a listening cm_id with backlog of 0 the IWCM ends
up not allowing any connection requests at all.  The correct behavior
is for the IWCM to pick a default value if the user backlog parameter
is zero.

Lustre from version 1.8.8 onward uses a backlog of 0, which breaks
iwarp support without this fix.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/infiniband/core/iwcm.c |   27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

--- a/drivers/infiniband/core/iwcm.c
+++ b/drivers/infiniband/core/iwcm.c
@@ -46,6 +46,7 @@
 #include <linux/completion.h>
 #include <linux/slab.h>
 #include <linux/module.h>
+#include <linux/sysctl.h>
 
 #include <rdma/iw_cm.h>
 #include <rdma/ib_addr.h>
@@ -65,6 +66,20 @@ struct iwcm_work {
 	struct list_head free_list;
 };
 
+static unsigned int default_backlog = 256;
+
+static struct ctl_table_header *iwcm_ctl_table_hdr;
+static struct ctl_table iwcm_ctl_table[] = {
+	{
+		.procname	= "default_backlog",
+		.data		= &default_backlog,
+		.maxlen		= sizeof(default_backlog),
+		.mode		= 0644,
+		.proc_handler	= proc_dointvec,
+	},
+	{ }
+};
+
 /*
  * The following services provide a mechanism for pre-allocating iwcm_work
  * elements.  The design pre-allocates them  based on the cm_id type:
@@ -419,6 +434,9 @@ int iw_cm_listen(struct iw_cm_id *cm_id,
 
 	cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
 
+	if (!backlog)
+		backlog = default_backlog;
+
 	ret = alloc_work_entries(cm_id_priv, backlog);
 	if (ret)
 		return ret;
@@ -1024,11 +1042,20 @@ static int __init iw_cm_init(void)
 	if (!iwcm_wq)
 		return -ENOMEM;
 
+	iwcm_ctl_table_hdr = register_net_sysctl(&init_net, "net/iw_cm",
+						 iwcm_ctl_table);
+	if (!iwcm_ctl_table_hdr) {
+		pr_err("iw_cm: couldn't register sysctl paths\n");
+		destroy_workqueue(iwcm_wq);
+		return -ENOMEM;
+	}
+
 	return 0;
 }
 
 static void __exit iw_cm_cleanup(void)
 {
+	unregister_net_sysctl_table(iwcm_ctl_table_hdr);
 	destroy_workqueue(iwcm_wq);
 }
 



  parent reply	other threads:[~2014-09-15 19:58 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-15 19:25 [PATCH 3.10 00/71] 3.10.55-stable review Greg Kroah-Hartman
2014-09-15 19:25 ` [PATCH 3.10 01/71] media: xc5000: Fix get_frequency() Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 02/71] media: xc4000: " Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 03/71] media: au0828: Only alt setting logic when needed Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 05/71] iommu/amd: Fix cleanup_domain for mass device removal Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 06/71] spi: orion: fix incorrect handling of cell-index DT property Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 07/71] spi: omap2-mcspi: Configure hardware when slave driver changes mode Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 08/71] firmware: Do not use WARN_ON(!spin_is_locked()) Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 09/71] tpm: missing tpm_chip_put in tpm_get_random() Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 10/71] CAPABILITIES: remove undefined caps from all processes Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 11/71] kernel/smp.c:on_each_cpu_cond(): fix warning in fallback path Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 12/71] mfd: omap-usb-host: Fix improper mask use Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 13/71] regulator: arizona-ldo1: remove bypass functionality Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 14/71] powerpc/mm/numa: Fix break placement Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 15/71] powerpc/mm: Use read barrier when creating real_pte Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 16/71] powerpc/pseries: Failure on removing device node Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 17/71] Drivers: scsi: storvsc: Implement a eh_timed_out handler Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 18/71] drivers: scsi: storvsc: Correctly handle TEST_UNIT_READY failure Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 19/71] MIPS: GIC: Prevent array overrun Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 20/71] MIPS: Prevent user from setting FCSR cause bits Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 21/71] MIPS: tlbex: Fix a missing statement for HUGETLB Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 22/71] MIPS: Remove BUG_ON(!is_fpu_owner()) in do_ade() Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 23/71] MIPS: asm/reg.h: Make 32- and 64-bit definitions available at the same time Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 24/71] MIPS: Cleanup flags in syscall flags handlers Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 25/71] MIPS: asm: thread_info: Add _TIF_SECCOMP flag Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 26/71] MIPS: OCTEON: make get_system_type() thread-safe Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 27/71] MIPS: Fix accessing to per-cpu data when flushing the cache Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 28/71] openrisc: Rework signal handling Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 29/71] ASoC: pcm: fix dpcm_path_put in dpcm runtime update Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 30/71] ASoC: wm_adsp: Add missing MODULE_LICENSE Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 31/71] ASoC: samsung: Correct I2S DAI suspend/resume ops Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 32/71] ASoC: max98090: Fix missing free_irq Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 33/71] ASoC: pxa-ssp: drop SNDRV_PCM_FMTBIT_S24_LE Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 34/71] bfa: Fix undefined bit shift on big-endian architectures with 32-bit DMA address Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 35/71] ACPICA: Utilities: Fix memory leak in acpi_ut_copy_iobject_to_iobject Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 36/71] ACPI: Run fixed event device notifications in process context Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 37/71] ACPI / cpuidle: fix deadlock between cpuidle_lock and cpu_hotplug.lock Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 38/71] ring-buffer: Always reset iterator to reader page Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 39/71] ring-buffer: Up rb_iter_peek() loop count to 3 Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 40/71] mnt: Only change user settable mount flags in remount Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 41/71] mnt: Move the test for MNT_LOCK_READONLY from change_mount_flags into do_remount Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 42/71] mnt: Correct permission checks in do_remount Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 43/71] mnt: Change the default remount atime from relatime to the existing value Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 44/71] mnt: Add tests for unprivileged remount cases that have found to be faulty Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 45/71] Bluetooth: never linger on process exit Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 46/71] Bluetooth: Avoid use of session socket after the session gets freed Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 47/71] md/raid6: avoid data corruption during recovery of double-degraded RAID6 Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 48/71] md/raid10: fix memory leak when reshaping a RAID10 Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 49/71] md/raid10: Fix memory leak when raid10 reshape completes Greg Kroah-Hartman
2014-09-15 19:26 ` Greg Kroah-Hartman [this message]
2014-09-15 19:26 ` [PATCH 3.10 51/71] xfs: quotacheck leaves dquot buffers without verifiers Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 52/71] xfs: dont dirty buffers beyond EOF Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 53/71] xfs: dont zero partial page cache pages during O_DIRECT writes Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 54/71] xfs: dont zero partial page cache pages during O_DIRECT write Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 55/71] md/raid1,raid10: always abort recover on write error Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 56/71] libceph: set last_piece in ceph_msg_data_pages_cursor_init() correctly Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 57/71] libceph: add process_one_ticket() helper Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 58/71] libceph: do not hard code max auth ticket len Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 59/71] CIFS: Fix STATUS_CANNOT_DELETE error mapping for SMB2 Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 60/71] CIFS: Fix async reading on reconnects Greg Kroah-Hartman
2014-09-15 19:26 ` [PATCH 3.10 61/71] CIFS: Possible null ptr deref in SMB2_tcon Greg Kroah-Hartman
2014-09-15 19:27 ` [PATCH 3.10 62/71] CIFS: Fix wrong directory attributes after rename Greg Kroah-Hartman
2014-09-15 19:27 ` [PATCH 3.10 63/71] CIFS: Fix wrong filename length for SMB2 Greg Kroah-Hartman
2014-09-15 19:27 ` [PATCH 3.10 64/71] CIFS: Fix wrong restart readdir for SMB1 Greg Kroah-Hartman
2014-09-15 19:27 ` [PATCH 3.10 65/71] mtd/ftl: fix the double free of the buffers allocated in build_maps() Greg Kroah-Hartman
2014-09-15 19:27 ` [PATCH 3.10 66/71] mtd: nand: omap: Fix 1-bit Hamming code scheme, omap_calculate_ecc() Greg Kroah-Hartman
2014-09-15 19:27 ` [PATCH 3.10 67/71] blkcg: dont call into policy draining if root_blkg is already gone Greg Kroah-Hartman
2014-09-15 19:27 ` [PATCH 3.10 68/71] IB/srp: Fix deadlock between host removal and multipathd Greg Kroah-Hartman
2014-09-15 19:27 ` [PATCH 3.10 69/71] dcache.c: get rid of pointless macros Greg Kroah-Hartman
2014-09-15 19:27 ` [PATCH 3.10 70/71] vfs: fix bad hashing of dentries Greg Kroah-Hartman
2014-09-15 19:27 ` [PATCH 3.10 71/71] tpm: Provide a generic means to override the chip returned timeouts Greg Kroah-Hartman
2014-09-16  1:53 ` [PATCH 3.10 00/71] 3.10.55-stable review Guenter Roeck
2014-09-16 18:04   ` Greg Kroah-Hartman
2014-09-16 18:42 ` Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140915192640.365603644@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roland@purestorage.com \
    --cc=stable@vger.kernel.org \
    --cc=swise@opengridcomputing.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.