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: <20200120223734.51425-1-jbi.octave@gmail.com>
Date:   Mon, 20 Jan 2020 22:37:34 +0000
From:   Jules Irenge <jbi.octave@...il.com>
To:     tglx@...utronix.de
Cc:     linux-kernel@...r.kernel.org, boqun.feng@...il.com,
        Jules Irenge <jbi.octave@...il.com>
Subject: [PATCH 1/5] irq: Add  missing annotation for __irq_put_desc_unlock()

Sparse reports a warning at __irq_put_desc_unlock()

|warning: context imbalance in __irq_put_desc_unlock() - unexpected unlock.

To fix this, a __releases(&desc->lock) annotation is added.
Given that __irq_put_desc_unlock() does actually
call raw_spin_unlock_irqrestore(&desc->lock, flags)
This not only fixes the warning
but also improves on readability of the code.

Signed-off-by: Jules Irenge <jbi.octave@...il.com>
---
 kernel/irq/irqdesc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 5b8fdd659e54..98a5f10d1900 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -891,6 +891,7 @@ __irq_get_desc_lock(unsigned int irq, unsigned long *flags, bool bus,
 }
 
 void __irq_put_desc_unlock(struct irq_desc *desc, unsigned long flags, bool bus)
+	__releases(&desc->lock)
 {
 	raw_spin_unlock_irqrestore(&desc->lock, flags);
 	if (bus)
-- 
2.24.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ