From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Maurizio Lombardi <mlombard@redhat.com>,
Mike Christie <michael.christie@oracle.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Sasha Levin <sashal@kernel.org>,
mgurtovoy@nvidia.com, linux-scsi@vger.kernel.org,
target-devel@vger.kernel.org
Subject: [PATCH AUTOSEL 4.14 5/9] scsi: target: iscsi: Fix an error message in iscsi_check_key()
Date: Sun, 19 Mar 2023 20:57:28 -0400 [thread overview]
Message-ID: <20230320005732.1429533-5-sashal@kernel.org> (raw)
In-Reply-To: <20230320005732.1429533-1-sashal@kernel.org>
From: Maurizio Lombardi <mlombard@redhat.com>
[ Upstream commit 6cc55c969b7ce8d85e09a636693d4126c3676c11 ]
The first half of the error message is printed by pr_err(), the second half
is printed by pr_debug(). The user will therefore see only the first part
of the message and will miss some useful information.
Link: https://lore.kernel.org/r/20230214141556.762047-1-mlombard@redhat.com
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Reviewed-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/target/iscsi/iscsi_target_parameters.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/target/iscsi/iscsi_target_parameters.c b/drivers/target/iscsi/iscsi_target_parameters.c
index caab1045742df..d2c8c4929f93a 100644
--- a/drivers/target/iscsi/iscsi_target_parameters.c
+++ b/drivers/target/iscsi/iscsi_target_parameters.c
@@ -1270,18 +1270,20 @@ static struct iscsi_param *iscsi_check_key(
return param;
if (!(param->phase & phase)) {
- pr_err("Key \"%s\" may not be negotiated during ",
- param->name);
+ char *phase_name;
+
switch (phase) {
case PHASE_SECURITY:
- pr_debug("Security phase.\n");
+ phase_name = "Security";
break;
case PHASE_OPERATIONAL:
- pr_debug("Operational phase.\n");
+ phase_name = "Operational";
break;
default:
- pr_debug("Unknown phase.\n");
+ phase_name = "Unknown";
}
+ pr_err("Key \"%s\" may not be negotiated during %s phase.\n",
+ param->name, phase_name);
return NULL;
}
--
2.39.2
next prev parent reply other threads:[~2023-03-20 1:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-20 0:57 [PATCH AUTOSEL 4.14 1/9] HID: uhid: Over-ride the default maximum data buffer value with our own Sasha Levin
2023-03-20 0:57 ` [PATCH AUTOSEL 4.14 2/9] ca8210: fix mac_len negative array access Sasha Levin
2023-03-20 0:57 ` [PATCH AUTOSEL 4.14 3/9] HID: intel-ish-hid: ipc: Fix potential use-after-free in work function Sasha Levin
2023-03-20 0:57 ` [PATCH AUTOSEL 4.14 4/9] m68k: Only force 030 bus error if PC not in exception table Sasha Levin
2023-03-20 0:57 ` Sasha Levin [this message]
2023-03-20 0:57 ` [PATCH AUTOSEL 4.14 6/9] scsi: ufs: core: Add soft dependency on governor_simpleondemand Sasha Levin
2023-03-20 0:57 ` [PATCH AUTOSEL 4.14 7/9] net: usb: cdc_mbim: avoid altsetting toggling for Telit FE990 Sasha Levin
2023-03-20 0:57 ` [PATCH AUTOSEL 4.14 8/9] net: usb: qmi_wwan: add Telit 0x1080 composition Sasha Levin
2023-03-20 0:57 ` [PATCH AUTOSEL 4.14 9/9] sh: sanitize the flags on sigreturn Sasha Levin
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=20230320005732.1429533-5-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mgurtovoy@nvidia.com \
--cc=michael.christie@oracle.com \
--cc=mlombard@redhat.com \
--cc=stable@vger.kernel.org \
--cc=target-devel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®