diff options
author | 2012-06-04 00:35:19 -0400 | |
---|---|---|
committer | 2012-06-04 00:35:19 -0400 | |
commit | 7e1bd6e38b1f30860ce25a014c6d6adfb0079f4a (patch) | |
tree | 65c5898ba93007d4399150c7a127a670bcfbc30d /lib/list_debug.c | |
parent | ACPI video: use after input_unregister_device() (diff) | |
parent | Linux 3.5-rc1 (diff) | |
download | wireguard-linux-7e1bd6e38b1f30860ce25a014c6d6adfb0079f4a.tar.xz wireguard-linux-7e1bd6e38b1f30860ce25a014c6d6adfb0079f4a.zip |
Merge branch 'upstream' into bugfix-video
Update bugfix-video branch to 2.5-rc1
so I don't have to again resolve the
conflict in these patches vs. upstream.
Conflicts:
drivers/gpu/drm/gma500/psb_drv.c
text conflict: add comment vs delete neighboring line
keep just this:
/* igd_opregion_init(&dev_priv->opregion_dev); */
/* acpi_video_register(); */
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'lib/list_debug.c')
-rw-r--r-- | lib/list_debug.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/list_debug.c b/lib/list_debug.c index 982b850d4e7a..23a5e031cd8b 100644 --- a/lib/list_debug.c +++ b/lib/list_debug.c @@ -10,6 +10,7 @@ #include <linux/list.h> #include <linux/bug.h> #include <linux/kernel.h> +#include <linux/rculist.h> /* * Insert a new entry between two known consecutive entries. @@ -30,6 +31,9 @@ void __list_add(struct list_head *new, "list_add corruption. prev->next should be " "next (%p), but was %p. (prev=%p).\n", next, prev->next, prev); + WARN(new == prev || new == next, + "list_add double add: new=%p, prev=%p, next=%p.\n", + new, prev, next); next->prev = new; new->next = next; new->prev = prev; @@ -75,3 +79,24 @@ void list_del(struct list_head *entry) entry->prev = LIST_POISON2; } EXPORT_SYMBOL(list_del); + +/* + * RCU variants. + */ +void __list_add_rcu(struct list_head *new, + struct list_head *prev, struct list_head *next) +{ + WARN(next->prev != prev, + "list_add_rcu corruption. next->prev should be " + "prev (%p), but was %p. (next=%p).\n", + prev, next->prev, next); + WARN(prev->next != next, + "list_add_rcu corruption. prev->next should be " + "next (%p), but was %p. (prev=%p).\n", + next, prev->next, prev); + new->next = next; + new->prev = prev; + rcu_assign_pointer(list_next_rcu(prev), new); + next->prev = new; +} +EXPORT_SYMBOL(__list_add_rcu); |