]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: iscsi: Fix iface sysfs attr detection
authorMike Christie <michael.christie@oracle.com>
Thu, 1 Jul 2021 00:25:59 +0000 (19:25 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jul 2021 11:30:56 +0000 (13:30 +0200)
commit07ff7b79a5e62e4bb72a8400be98840509580c94
tree58cd3ae8344b3c7e4f4b4fe03f79b8ab6f588abf
parentd25cbcb02feec09f1a0710a3b1d2be2ecab0282d
scsi: iscsi: Fix iface sysfs attr detection

[ Upstream commit e746f3451ec7f91dcc9fd67a631239c715850a34 ]

A ISCSI_IFACE_PARAM can have the same value as a ISCSI_NET_PARAM so when
iscsi_iface_attr_is_visible tries to figure out the type by just checking
the value, we can collide and return the wrong type. When we call into the
driver we might not match and return that we don't want attr visible in
sysfs. The patch fixes this by setting the type when we figure out what the
param is.

Link: https://lore.kernel.org/r/20210701002559.89533-1-michael.christie@oracle.com
Fixes: 6dd370ff7573 ("[SCSI] iscsi_transport: Additional parameters for network settings")
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/scsi_transport_iscsi.c