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:	Mon, 16 Apr 2012 14:12:45 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	asamymuthupa@...ron.com
Cc:	Jens Axboe <axboe@...nel.dk>, linux-kernel@...r.kernel.org
Subject: re: mtip32xx: Add new bitwise flag 'dd_flag'

Hello Asai Thambi S P,

The patch 45038367c271: "mtip32xx: Add new bitwise flag 'dd_flag'"
from Apr 9, 2012, leads to the following Smatch warning:
drivers/block/mtip32xx/mtip32xx.c:2516 mtip_hw_get_scatterlist()
	 warn: inconsistent returns sem:&dd->port->cmd_slot: locked (2514,2516) unlocked ()

@@ -2193,6 +2245,10 @@ static struct scatterlist *mtip_hw_get_scatterlist(struct driver_data *dd,
        down(&dd->port->cmd_slot);
        *tag = get_slot(dd->port);
 
+       if (unlikely(test_bit(MTIP_DD_FLAG_REMOVE_PENDING_BIT, &dd->dd_flag))) {
+               up(&dd->port->cmd_slot);
                ^^^^^^^^^^^^^^^^^^^^^^^
We release the lock here.

+               return NULL;
+       }
        if (unlikely(*tag < 0))
                return NULL;
                ^^^^^^^^^^^^
Should we release it here as well?

regards,
dan carpenter

--
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