Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 194051 Details for
Bug 272021
GFS2 - flocks from same process trip kernel BUG at fs/gfs2/glock.c:1118!
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Second attempt
bz272021-git-new.patch (text/plain), 3.41 KB, created by
Abhijith Das
on 2007-09-12 21:44:50 UTC
(
hide
)
Description:
Second attempt
Filename:
MIME Type:
Creator:
Abhijith Das
Created:
2007-09-12 21:44:50 UTC
Size:
3.41 KB
patch
obsolete
>diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c >index 931368a..d631cad 100644 >--- a/fs/gfs2/glock.c >+++ b/fs/gfs2/glock.c >@@ -1106,24 +1106,31 @@ static void add_to_queue(struct gfs2_hol > if (test_and_set_bit(HIF_WAIT, &gh->gh_iflags)) > BUG(); > >- existing = find_holder_by_owner(&gl->gl_holders, gh->gh_owner_pid); >- if (existing) { >- print_symbol(KERN_WARNING "original: %s\n", existing->gh_ip); >- printk(KERN_INFO "pid : %d\n", existing->gh_owner_pid); >- printk(KERN_INFO "lock type : %d lock state : %d\n", >- existing->gh_gl->gl_name.ln_type, existing->gh_gl->gl_state); >- print_symbol(KERN_WARNING "new: %s\n", gh->gh_ip); >- printk(KERN_INFO "pid : %d\n", gh->gh_owner_pid); >- printk(KERN_INFO "lock type : %d lock state : %d\n", >- gl->gl_name.ln_type, gl->gl_state); >- BUG(); >- } >- >- existing = find_holder_by_owner(&gl->gl_waiters3, gh->gh_owner_pid); >- if (existing) { >- print_symbol(KERN_WARNING "original: %s\n", existing->gh_ip); >- print_symbol(KERN_WARNING "new: %s\n", gh->gh_ip); >- BUG(); >+ if (!(gh->gh_flags & GL_FLOCK)) { >+ existing = find_holder_by_owner(&gl->gl_holders, >+ gh->gh_owner_pid); >+ if (existing) { >+ print_symbol(KERN_WARNING "original: %s\n", >+ existing->gh_ip); >+ printk(KERN_INFO "pid : %d\n", existing->gh_owner_pid); >+ printk(KERN_INFO "lock type : %d lock state : %d\n", >+ existing->gh_gl->gl_name.ln_type, >+ existing->gh_gl->gl_state); >+ print_symbol(KERN_WARNING "new: %s\n", gh->gh_ip); >+ printk(KERN_INFO "pid : %d\n", gh->gh_owner_pid); >+ printk(KERN_INFO "lock type : %d lock state : %d\n", >+ gl->gl_name.ln_type, gl->gl_state); >+ BUG(); >+ } >+ >+ existing = find_holder_by_owner(&gl->gl_waiters3, >+ gh->gh_owner_pid); >+ if (existing) { >+ print_symbol(KERN_WARNING "original: %s\n", >+ existing->gh_ip); >+ print_symbol(KERN_WARNING "new: %s\n", gh->gh_ip); >+ BUG(); >+ } > } > > if (gh->gh_flags & LM_FLAG_PRIORITY) >diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h >index f7a8e62..b16f604 100644 >--- a/fs/gfs2/glock.h >+++ b/fs/gfs2/glock.h >@@ -26,6 +26,7 @@ #define GL_EXACT 0x00000080 > #define GL_SKIP 0x00000100 > #define GL_ATIME 0x00000200 > #define GL_NOCACHE 0x00000400 >+#define GL_FLOCK 0x00000800 > #define GL_NOCANCEL 0x00001000 > > #define GLR_TRYFAILED 13 >diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c >index 94d76ac..46a9e10 100644 >--- a/fs/gfs2/ops_file.c >+++ b/fs/gfs2/ops_file.c >@@ -571,7 +571,8 @@ static int do_flock(struct file *file, i > int error = 0; > > state = (fl->fl_type == F_WRLCK) ? LM_ST_EXCLUSIVE : LM_ST_SHARED; >- flags = (IS_SETLKW(cmd) ? 0 : LM_FLAG_TRY) | GL_EXACT | GL_NOCACHE; >+ flags = (IS_SETLKW(cmd) ? 0 : LM_FLAG_TRY) | GL_EXACT | GL_NOCACHE >+ | GL_FLOCK; > > mutex_lock(&fp->f_fl_mutex); > >@@ -579,21 +580,19 @@ static int do_flock(struct file *file, i > if (gl) { > if (fl_gh->gh_state == state) > goto out; >- gfs2_glock_hold(gl); > flock_lock_file_wait(file, > &(struct file_lock){.fl_type = F_UNLCK}); >- gfs2_glock_dq_uninit(fl_gh); >+ gfs2_glock_dq_wait(fl_gh); >+ gfs2_holder_reinit(state, flags, fl_gh); > } else { > error = gfs2_glock_get(GFS2_SB(&ip->i_inode), > ip->i_no_addr, &gfs2_flock_glops, > CREATE, &gl); > if (error) > goto out; >+ gfs2_holder_init(gl, state, flags, fl_gh); >+ gfs2_glock_put(gl); > } >- >- gfs2_holder_init(gl, state, flags, fl_gh); >- gfs2_glock_put(gl); >- > error = gfs2_glock_nq(fl_gh); > if (error) { > gfs2_holder_uninit(fl_gh);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 272021
:
183661
|
193221
| 194051