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: <20170130184000.12980-1-fabf@skynet.be>
Date:   Mon, 30 Jan 2017 19:40:00 +0100
From:   Fabian Frederick <fabf@...net.be>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     linux-kernel@...r.kernel.org,
        Tomi Valkeinen <tomi.valkeinen@...com>,
        dri-devel@...ts.freedesktop.org, Fabian Frederick <fabf@...net.be>
Subject: [PATCH 03/14] drm/omap: use atomic_dec_not_zero()

instead of atomic_add_unless(value, -1, 0)

Signed-off-by: Fabian Frederick <fabf@...net.be>
---
 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
index 3cab066..abd0b15 100644
--- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
+++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
@@ -184,7 +184,7 @@ static struct dmm_txn *dmm_txn_init(struct dmm *dmm, struct tcm *tcm)
 
 	/* wait until an engine is available */
 	ret = wait_event_interruptible(omap_dmm->engine_queue,
-		atomic_add_unless(&omap_dmm->engine_counter, -1, 0));
+		atomic_dec_not_zero(&omap_dmm->engine_counter));
 	if (ret)
 		return ERR_PTR(ret);
 
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ