lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1334816182-16268-1-git-send-email-svenkatr@ti.com>
Date:	Thu, 19 Apr 2012 11:46:22 +0530
From:	Venkatraman S <svenkatr@...com>
To:	<akpm@...ux-foundation.org>
CC:	<linux-kernel@...r.kernel.org>, <linux-scsi@...r.kernel.org>,
	Venkatraman S <svenkatr@...com>,
	James Bottomley <James.Bottomley@...senpartnership.com>
Subject: [PATCH v2] scsi/ufs: Fix evaluation of UTP task completion code

While interpreting the result of UTP task completion status,
by using boolean &&, the evaluation would fail when the
UPIU_TASK_MANAGEMENT_FUNC_SUCCEEDED was received.

Either UPIU_TASK_MANAGEMENT_FUNC_COMPL or
UPIU_TASK_MANAGEMENT_FUNC_SUCCEEDED should be
considered as a success result.

Reported-by: Joe Perches <joe@...ches.com>
Signed-off-by: Venkatraman S <svenkatr@...com>
Reviewed-by: Namjae Jeon <linkinjeon@...il.com>
Acked-by: Santosh Y <santoshsy@...il.com>
CC: Andrew Morton <akpm@...ux-foundation.org>
CC: James Bottomley <James.Bottomley@...senpartnership.com>
---
	v1 -> v2: Update subject, description as suggested by Andrew Morton
 drivers/scsi/ufs/ufshcd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index aa97200..cd59f6f 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -1160,7 +1160,7 @@ static int ufshcd_task_req_compl(struct ufs_hba *hba, u32 index)
 		task_result = be32_to_cpu(task_rsp_upiup->header.dword_1);
 		task_result = ((task_result & MASK_TASK_RESPONSE) >> 8);
 
-		if (task_result != UPIU_TASK_MANAGEMENT_FUNC_COMPL ||
+		if (task_result != UPIU_TASK_MANAGEMENT_FUNC_COMPL &&
 		    task_result != UPIU_TASK_MANAGEMENT_FUNC_SUCCEEDED)
 			task_result = FAILED;
 	} else {
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ