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]
Date:	Wed, 19 Aug 2009 11:51:50 -0600
From:	David Altobelli <david.altobelli@...com>
To:	linux-kernel@...r.kernel.org
Cc:	akpm@...ux-foundation.org, david.altobelli@...com
Subject: [PATCH] hpilo: add locking comment

Add explanation about lock nesting and purpose of each lock in hpilo.

This applies on top of a set of patches I sent out to add polling to hpilo.

Please CC me on any replies, and thanks,
Dave

Signed-off-by: David Altobelli <david.altobelli@...com>
---
--- linux-2.6.30.3/drivers/misc/hpilo.h.orig	2009-08-19 10:38:23.000000000 -0500
+++ linux-2.6.30.3/drivers/misc/hpilo.h	2009-08-19 11:06:36.000000000 -0500
@@ -44,9 +44,20 @@ struct ilo_hwinfo {
 
 	struct pci_dev *ilo_dev;
 
+	/*
+	 * open_lock      serializes ccb_cnt during open and close
+	 * [ irq disabled ]
+	 * -> alloc_lock  used when adding/removing/searching ccb_alloc,
+	 *                which represents all ccbs open on the device
+	 * --> fifo_lock  controls access to fifo queues shared with hw
+	 *
+	 * Locks must be taken in this order, but open_lock and alloc_lock
+	 * are optional, they do not need to be held in order to take a
+	 * lower level lock.
+	 */
+	spinlock_t open_lock;
 	spinlock_t alloc_lock;
 	spinlock_t fifo_lock;
-	spinlock_t open_lock;
 
 	struct cdev cdev;
 };
--
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