From: "gaoliming" <gaoliming@byosoft.com.cn>
To: <devel@edk2.groups.io>, <sivaparvathic@ami.com>
Cc: "'Vasudevan Sambandan'" <vasudevans@ami.com>,
"'Sundaresan S'" <sundaresans@ami.com>
Subject: 回复: [edk2-devel] [edk2] [PATCH]MdeModulePkg\scsi: Coverity scan flags multiple issues in edk2-stable202205
Date: Fri, 5 Aug 2022 13:48:53 +0800 [thread overview]
Message-ID: <02fb01d8a88f$0b6b22f0$224168d0$@byosoft.com.cn> (raw)
In-Reply-To: <20220802045922.791-1-sivaparvathic@ami.com>
This change is good to me. Reviewed-by: Liming Gao
<gaoliming@byosoft.com.cn>
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 sivaparvathi
> C via groups.io
> 发送时间: 2022年8月2日 13:00
> 收件人: devel@edk2.groups.io
> 抄送: Vasudevan Sambandan <vasudevans@ami.com>; Sundaresan S
> <sundaresans@ami.com>; Sivaparvathi Chellaiah <sivaparvathic@ami.com>
> 主题: [edk2-devel] [edk2] [PATCH]MdeModulePkg\scsi: Coverity scan flags
> multiple issues in edk2-stable202205
>
> Attached changes to resolve the coverity Issues
>
> Signed-off-by: sivaparvathic@ami.com
> To: sivaparvathic@ami.com
>
> ---
> MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c | 3 +++
> MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c | 10 +++++-----
> 2 files changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
> b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
> index 9ea69ee740..2cc61bb942 100644
> --- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
> +++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
> @@ -531,6 +531,9 @@ SCSIBusDriverBindingStart (
> // then create handle and install scsi i/o protocol.
>
> //
>
> Status = ScsiScanCreateDevice (This, Controller, &ScsiTargetId, Lun,
> ScsiBusDev);
>
> + if (Status == EFI_OUT_OF_RESOURCES) {
>
> + goto ErrorExit;
>
> + }
>
> }
>
>
>
> return EFI_SUCCESS;
>
> diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
> b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
> index 98e84b4ea8..5f4ead7669 100644
> --- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
> +++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
> @@ -4247,7 +4247,7 @@ BackOff:
>
>
> if ((TargetStatus == EFI_EXT_SCSI_STATUS_TARGET_CHECK_CONDITION)
> || (EFI_ERROR (ReturnStatus))) {
>
> DEBUG ((DEBUG_ERROR, "ScsiDiskRead10: Check Condition
> happened!\n"));
>
> - Status = DetectMediaParsingSenseKeys (ScsiDiskDevice,
> ScsiDiskDevice->SenseData, SenseDataLength / sizeof
> (EFI_SCSI_SENSE_DATA), &Action);
>
> + DetectMediaParsingSenseKeys (ScsiDiskDevice,
> ScsiDiskDevice->SenseData, SenseDataLength / sizeof
> (EFI_SCSI_SENSE_DATA), &Action);
>
> if (Action == ACTION_RETRY_COMMAND_LATER) {
>
> *NeedRetry = TRUE;
>
> return EFI_DEVICE_ERROR;
>
> @@ -4371,7 +4371,7 @@ BackOff:
>
>
> if ((TargetStatus == EFI_EXT_SCSI_STATUS_TARGET_CHECK_CONDITION)
> || (EFI_ERROR (ReturnStatus))) {
>
> DEBUG ((DEBUG_ERROR, "ScsiDiskWrite10: Check Condition
> happened!\n"));
>
> - Status = DetectMediaParsingSenseKeys (ScsiDiskDevice,
> ScsiDiskDevice->SenseData, SenseDataLength / sizeof
> (EFI_SCSI_SENSE_DATA), &Action);
>
> + DetectMediaParsingSenseKeys (ScsiDiskDevice,
> ScsiDiskDevice->SenseData, SenseDataLength / sizeof
> (EFI_SCSI_SENSE_DATA), &Action);
>
> if (Action == ACTION_RETRY_COMMAND_LATER) {
>
> *NeedRetry = TRUE;
>
> return EFI_DEVICE_ERROR;
>
> @@ -4494,7 +4494,7 @@ BackOff:
>
>
> if ((TargetStatus == EFI_EXT_SCSI_STATUS_TARGET_CHECK_CONDITION)
> || (EFI_ERROR (ReturnStatus))) {
>
> DEBUG ((DEBUG_ERROR, "ScsiDiskRead16: Check Condition
> happened!\n"));
>
> - Status = DetectMediaParsingSenseKeys (ScsiDiskDevice,
> ScsiDiskDevice->SenseData, SenseDataLength / sizeof
> (EFI_SCSI_SENSE_DATA), &Action);
>
> + DetectMediaParsingSenseKeys (ScsiDiskDevice,
> ScsiDiskDevice->SenseData, SenseDataLength / sizeof
> (EFI_SCSI_SENSE_DATA), &Action);
>
> if (Action == ACTION_RETRY_COMMAND_LATER) {
>
> *NeedRetry = TRUE;
>
> return EFI_DEVICE_ERROR;
>
> @@ -4618,7 +4618,7 @@ BackOff:
>
>
> if ((TargetStatus == EFI_EXT_SCSI_STATUS_TARGET_CHECK_CONDITION)
> || (EFI_ERROR (ReturnStatus))) {
>
> DEBUG ((DEBUG_ERROR, "ScsiDiskWrite16: Check Condition
> happened!\n"));
>
> - Status = DetectMediaParsingSenseKeys (ScsiDiskDevice,
> ScsiDiskDevice->SenseData, SenseDataLength / sizeof
> (EFI_SCSI_SENSE_DATA), &Action);
>
> + DetectMediaParsingSenseKeys (ScsiDiskDevice,
> ScsiDiskDevice->SenseData, SenseDataLength / sizeof
> (EFI_SCSI_SENSE_DATA), &Action);
>
> if (Action == ACTION_RETRY_COMMAND_LATER) {
>
> *NeedRetry = TRUE;
>
> return EFI_DEVICE_ERROR;
>
> @@ -4728,7 +4728,7 @@ ScsiDiskNotify (
> if (Request->TargetStatus ==
> EFI_EXT_SCSI_STATUS_TARGET_CHECK_CONDITION) {
>
> DEBUG ((DEBUG_ERROR, "ScsiDiskNotify: Check Condition
> happened!\n"));
>
>
>
> - Status = DetectMediaParsingSenseKeys (
>
> + DetectMediaParsingSenseKeys (
>
> ScsiDiskDevice,
>
> Request->SenseData,
>
> Request->SenseDataLength / sizeof
> (EFI_SCSI_SENSE_DATA),
>
> --
> 2.31.0.windows.1
> -The information contained in this message may be confidential and
> proprietary to American Megatrends (AMI). This communication is intended
to
> be read only by the individual or entity to whom it is addressed or by
their
> designee. If the reader of this message is not the intended recipient, you
are
> on notice that any distribution of this message, in any form, is strictly
> prohibited. Please promptly notify the sender by reply e-mail or by
telephone
> at 770-246-8600, and then delete or destroy all copies of the
transmission.
>
>
>
>
next prev parent reply other threads:[~2022-08-05 5:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-02 5:00 [edk2] [PATCH]MdeModulePkg\scsi: Coverity scan flags multiple issues in edk2-stable202205 sivaparvathi C
2022-08-05 5:48 ` gaoliming [this message]
2022-09-12 9:04 ` [edk2-devel] 回复: [edk2-devel] " sivaparvathi C
2022-09-13 5:18 ` 回复: " gaoliming
2022-10-06 7:56 ` [edk2-devel] " sivaparvathi C
2022-10-08 1:50 ` 回复: " gaoliming
2022-10-10 2:57 ` Michael D Kinney
2022-10-13 11:15 ` sivaparvathi C
2022-10-13 14:22 ` Michael D Kinney
2022-10-28 8:02 ` sivaparvathi C
2022-11-01 1:53 ` 回复: " gaoliming
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-list 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='02fb01d8a88f$0b6b22f0$224168d0$@byosoft.com.cn' \
--to=devel@edk2.groups.io \
/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