Skip to contentSkip to conversation

Patch "nvme-fabrics: don't check for non-NULL module in nvmf_register_transport" has been added to the 4.15-stable tree

PATCH [email protected] 1 participant 1 message Apr 9, 2018

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

nvme-fabrics: don't check for non-NULL module in nvmf_register_transport

to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
nvme-fabrics-don-t-check-for-non-null-module-in-nvmf_register_transport.patch
and it can be found in the queue-4.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 5a1e59533380a3fd04593e4ab2d4633ebf7745c1 Mon Sep 17 00:00:00 2001

From: Christoph Hellwig <[email protected]>
Date: Thu, 22 Feb 2018 07:24:08 -0800
Subject: nvme-fabrics: don't check for non-NULL module in nvmf_register_transport

From: Christoph Hellwig <[email protected]>

commit 5a1e59533380a3fd04593e4ab2d4633ebf7745c1 upstream.

THIS_MODULE evaluates to NULL when used from code built into the kernel, thus breaking built-in transport modules. Remove the bogus check.

Fixes 0de5cd36 ("nvme-fabrics: protect against module unload during create_ctrl")
---
 drivers/nvme/host/fabrics.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/fabrics.c +1 -1
@@ -493,7 +493,7 @@ EXPORT_SYMBOL_GPL(nvmf_should_reconnect)
  */
 int nvmf_register_transport(struct nvmf_transport_ops *ops)
 {
-	if (!ops->create_ctrl || !ops->module)
+	if (!ops->create_ctrl)
 		return -EINVAL;
 
 	down_write(&nvmf_transports_rwsem);

Patches currently in stable-queue which might be from [email protected] are

queue-4.15/nvme_fcloop-fix-abort-race-condition.patch queue-4.15/blk-mq-avoid-to-map-cpu-into-stale-hw-queue.patch queue-4.15/scsi-libsas-initialize-sas_phy-status-according-to-response-of-discover.patch queue-4.15/nvme-fabrics-protect-against-module-unload-during-create_ctrl.patch queue-4.15/nvme_fcloop-disassocate-local-port-structs.patch queue-4.15/nvme-fabrics-don-t-check-for-non-null-module-in-nvmf_register_transport.patch queue-4.15/scsi-libsas-fix-error-when-getting-phy-events.patch queue-4.15/blk-mq-fix-race-between-updating-nr_hw_queues-and-switching-io-sched.patch queue-4.15/scsi-libsas-fix-memory-leak-in-sas_smp_get_phy_events.patch queue-4.15/scsi-libsas-use-dynamic-alloced-work-to-avoid-sas-event-lost.patch