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>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 22 Mar 2017 11:44:22 +0100
From:   Nicholas Mc Guire <der.herr@...r.at>
To:     "James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>
Cc:     Vikas Chaudhary <vikas.chaudhary@...gic.com>,
        QLogic-Storage-Upstream@...gic.com,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        Nicholas Mc Guire <der.herr@...r.at>
Subject: [PATCH] qla4xxx: drop redundant init_completion

The redundant init_completion() here seems to be a cut&past error as
struct scsi_qla_host only has 4 completion elements to initialize, thus
the duplicate init_completion(disable_acb_comp) is simply removed.

Signed-off-by: Nicholas Mc Guire <der.herr@...r.at>
---

Found by experimental coccinelle script: 
./drivers/scsi/qla4xxx/ql4_os.c:8667:1-16: WARNING: possible duplicate 
init_completion


checking struct scsi_qla_host in
drivers/scsi/qla4xxx/ql4_def.h:457 "Linux Host Adapter structure"
it contain only the following 4 completion objects:

struct completion disable_acb_comp;
struct completion idc_comp;
struct completion link_up_comp;
struct completion mbx_intr_comp;

so it seems the double initialization of disable_acb_comp was just a
cut&past but and no omission of some other completion object - thus
the second initialization is simply removed.

Patch was only compile tested with: x86_64_defconfig + SCSI_LOWLEVEL=y,
 CONFIG_SCSI_QLA_ISCSI=m
(...quite a few sparse and coccinelle errors/warnings during build-tests)

Patch is against 4.11-rc3 (localversion-next is next-20170322)

 drivers/scsi/qla4xxx/ql4_os.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index ac52150..64c6fa5 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -8663,9 +8663,8 @@ static int qla4xxx_probe_adapter(struct pci_dev *pdev,
 	init_completion(&ha->mbx_intr_comp);
 	init_completion(&ha->disable_acb_comp);
 	init_completion(&ha->idc_comp);
 	init_completion(&ha->link_up_comp);
-	init_completion(&ha->disable_acb_comp);
 
 	spin_lock_init(&ha->hardware_lock);
 	spin_lock_init(&ha->work_lock);
 
-- 
2.1.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ