The patch titled ieee1394: nodemgr: do not peek into struct semaphore has been added to the -mm tree. Its filename is ieee1394-nodemgr-do-not-peek-into-struct.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: ieee1394: nodemgr: do not peek into struct semaphore From: Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx> Also revert patch "frv: ieee1394 is borken on frv", as it no longer is. Signed-off-by: Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx> Cc: David Howells <dhowells@xxxxxxxxxx> Cc: Jody McIntyre <scjody@xxxxxxxxxxxxxx> Cc: Ben Collins <bcollins@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/ieee1394/Kconfig | 2 +- drivers/ieee1394/nodemgr.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff -puN drivers/ieee1394/Kconfig~ieee1394-nodemgr-do-not-peek-into-struct drivers/ieee1394/Kconfig --- a/drivers/ieee1394/Kconfig~ieee1394-nodemgr-do-not-peek-into-struct +++ a/drivers/ieee1394/Kconfig @@ -4,7 +4,7 @@ menu "IEEE 1394 (FireWire) support" config IEEE1394 tristate "IEEE 1394 (FireWire) support" - depends on (PCI || BROKEN) && (BROKEN || !FRV) + depends on PCI || BROKEN select NET help IEEE 1394 describes a high performance serial bus, which is also diff -puN drivers/ieee1394/nodemgr.c~ieee1394-nodemgr-do-not-peek-into-struct drivers/ieee1394/nodemgr.c --- a/drivers/ieee1394/nodemgr.c~ieee1394-nodemgr-do-not-peek-into-struct +++ a/drivers/ieee1394/nodemgr.c @@ -8,6 +8,7 @@ * directory of the kernel sources for details. */ +#include <linux/bitmap.h> #include <linux/kernel.h> #include <linux/config.h> #include <linux/list.h> @@ -334,10 +335,12 @@ static ssize_t fw_show_ne_bus_options(st static DEVICE_ATTR(bus_options,S_IRUGO,fw_show_ne_bus_options,NULL); +/* tlabels_free, tlabels_allocations, tlabels_mask are read non-atomically + * here, therefore displayed values may be occasionally wrong. */ static ssize_t fw_show_ne_tlabels_free(struct device *dev, struct device_attribute *attr, char *buf) { struct node_entry *ne = container_of(dev, struct node_entry, device); - return sprintf(buf, "%d\n", atomic_read(&ne->tpool->count.count) + 1); + return sprintf(buf, "%d\n", 64 - bitmap_weight(ne->tpool->pool, 64)); } static DEVICE_ATTR(tlabels_free,S_IRUGO,fw_show_ne_tlabels_free,NULL); _ Patches currently in -mm which might be from stefanr@xxxxxxxxxxxxxxxxx are origin.patch ieee1394-nodemgr-do-not-peek-into-struct.patch lock-validator-annotate-ieee1394-skb-head-locking.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html