While reviewing the lockdep.c code, it looked to me that I found a bug where the release of the graph_lock was not done on failure. This turns out not to be the case, because the graph_unlock is performed within the internal functions of lockdep when a failure occurs. To help out others when visually reviewing this code, I've added comments to the places where it looks like it may be a bug not to call graph_unlock. Signed-off-by: Steven Rostedt <srostedt@redhat.com> --- kernel/lockdep.c | 3 +++ 1 file changed, 3 insertions(+) Index: linux-sched-devel.git/kernel/lockdep.c =================================================================== --- linux-sched-devel.git.orig/kernel/lockdep.c 2008-04-17 10:52:40.000000000 -0400 +++ linux-sched-devel.git/kernel/lockdep.c 2008-04-17 11:20:49.000000000 -0400 @@ -1566,6 +1566,7 @@ static int validate_chain(struct task_st /* * Add dependency only if this lock is not the head * of the chain, and if it's not a secondary read-lock: + * (will do graph_unlock on failure) */ if (!chain_head && ret != 2) if (!check_prevs_add(curr, hlock)) @@ -2284,6 +2285,7 @@ static int mark_lock(struct task_struct this->class->usage_mask |= new_mask; + /* save_trace does graph_unlock on failure */ if (!save_trace(this->class->usage_traces + new_bit)) return 0; @@ -2296,6 +2298,7 @@ static int mark_lock(struct task_struct case LOCK_ENABLED_SOFTIRQS: case LOCK_ENABLED_HARDIRQS_READ: case LOCK_ENABLED_SOFTIRQS_READ: + /* mark_lock_irq does graph_unlock on failure */ ret = mark_lock_irq(curr, this, new_bit); if (!ret) return 0; --
| Alan Cox | [PATCH 00/76] Queued TTY Patches |
| Linus Torvalds | Linux 2.6.27 |
| Eric W. Biederman | [PATCH] nfsd/nfs4state: Remove unnecessary daemonize call. |
| Artem Bityutskiy | [PATCH 10/44 take 2] [UBI] debug unit implementation |
git: | |
| Daniel Barkalow | Re: I don't want the .git directory next to my code. |
| Johannes Schindelin | Re: [PATCH] RFC: git lazy clone proof-of-concept |
| Johannes Schindelin | Re: [ANNOUNCE] GIT 1.5.4 |
| Johannes Schindelin | Re: git-diff on touched files: bug or feature? |
| Richard Stallman | Real men don't attack straw men |
| Juan Miscaro | When will OpenBSD support UTF8? |
| Stefan Beke | mail dovecot: pipe() failed: Too many open files |
| L. V. Lammert | Re: About Xen: maybe a reiterative question but .. |
| Michael Buesch | Re: Mark IPW2100 as BROKEN: Fatal interrupt. Scheduling firmware restart. |
| Johannes Berg | Re: mac80211 truesize bugs |
| Vitaliy Gusev | [TCP]: TCP_DEFER_ACCEPT causes leak sockets |
| Alexey Dobriyan | [PATCH 10/33] netns ct: per-netns /proc/net/nf_conntrack_expect |
| Shared swap partition | 38 minutes ago | Linux general |
| high memory | 1 day ago | Linux kernel |
| semaphore access speed | 1 day ago | Applications and Utilities |
| the kernel how to power off the machine | 2 days ago | Linux kernel |
| Easter Eggs in windows XP | 2 days ago | Windows |
| Root password | 2 days ago | Linux general |
| Where/when DNOTIFY is used? | 2 days ago | Linux kernel |
| How to convert Linux Kernel built-in module into a loadable module | 2 days ago | Linux kernel |
| Linux 2.6.24 and I/O schedulers | 2 days ago | Linux kernel |
| USB Driver -- Interrupt Polling -- A Little Help Please | 2 days ago | Linux general |
