aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/incore.h
diff options
context:
space:
mode:
authorRobert Peterson <rpeterso@redhat.com>2007-03-23 18:05:15 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2007-05-01 04:10:55 -0400
commit04b933f27bc8e7f3f6423020cec58a4eab3bb7a7 (patch)
tree992d9dd401b81ccb0b1f166fabd3ca315806361e /fs/gfs2/incore.h
parent172e045a7fcc3ee647fa70dbd585a3c247b49cb2 (diff)
[GFS2] Red Hat bz 228540: owner references
In Testing the previously posted and accepted patch for https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=228540 I uncovered some gfs2 badness. It turns out that the current gfs2 code saves off a process pointer when glocks is taken in both the glock and glock holder structures. Those structures will persist in memory long after the process has ended; pointers to poisoned memory. This problem isn't caused by the 228540 fix; the new capability introduced by the fix just uncovered the problem. I wrote this patch that avoids saving process pointers and instead saves off the process pid. Rather than referencing the bad pointers, it now does process lookups. There is special code that makes the output nicer for printing holder information for processes that have ended. This patch also adds a stub for the new "sprint_symbol" function that exists in Andrew Morton's -mm patch set, but won't go into the base kernel until 2.6.22, since it adds functionality but doesn't fix a bug. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/incore.h')
-rw-r--r--fs/gfs2/incore.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 9c125823d760..fdf04705906f 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -127,7 +127,7 @@ struct gfs2_holder {
127 struct list_head gh_list; 127 struct list_head gh_list;
128 128
129 struct gfs2_glock *gh_gl; 129 struct gfs2_glock *gh_gl;
130 struct task_struct *gh_owner; 130 pid_t gh_owner_pid;
131 unsigned int gh_state; 131 unsigned int gh_state;
132 unsigned gh_flags; 132 unsigned gh_flags;
133 133
@@ -155,7 +155,7 @@ struct gfs2_glock {
155 unsigned int gl_hash; 155 unsigned int gl_hash;
156 unsigned int gl_demote_state; /* state requested by remote node */ 156 unsigned int gl_demote_state; /* state requested by remote node */
157 unsigned long gl_demote_time; /* time of first demote request */ 157 unsigned long gl_demote_time; /* time of first demote request */
158 struct task_struct *gl_owner; 158 pid_t gl_owner_pid;
159 unsigned long gl_ip; 159 unsigned long gl_ip;
160 struct list_head gl_holders; 160 struct list_head gl_holders;
161 struct list_head gl_waiters1; /* HIF_MUTEX */ 161 struct list_head gl_waiters1; /* HIF_MUTEX */