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 199971 Details for
Bug 253754
use after free in nlm subsystem
[?]
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]
patch -- add lockd_wake_up() function and call it instead of svc_wake_up()
linux-2.6.9-lockd-wake-up.patch (text/plain), 2.37 KB, created by
Jeff Layton
on 2007-09-19 18:52:40 UTC
(
hide
)
Description:
patch -- add lockd_wake_up() function and call it instead of svc_wake_up()
Filename:
MIME Type:
Creator:
Jeff Layton
Created:
2007-09-19 18:52:40 UTC
Size:
2.37 KB
patch
obsolete
>diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c >index f19fa77..2f951d1 100644 >--- a/fs/lockd/svc.c >+++ b/fs/lockd/svc.c >@@ -43,6 +43,8 @@ struct nlmsvc_binding * nlmsvc_ops; > static DECLARE_MUTEX(nlmsvc_sema); > static unsigned int nlmsvc_users; > static pid_t nlmsvc_pid; >+static struct svc_serv * nlmsvc_serv; >+static DEFINE_RWLOCK(nlmsvc_serv_lock); /* protects nlmsvc_serv */ > int nlmsvc_grace_period; > unsigned long nlmsvc_timeout; > >@@ -149,6 +151,9 @@ lockd(struct svc_rqst *rqstp) > * Let our maker know we're running. > */ > nlmsvc_pid = current->pid; >+ write_lock(&nlmsvc_serv_lock); >+ nlmsvc_serv = rqstp->rq_server; >+ write_unlock(&nlmsvc_serv_lock); > up(&lockd_start); > > daemonize("lockd"); >@@ -226,6 +231,9 @@ lockd(struct svc_rqst *rqstp) > nlmsvc_invalidate_all(); > nlm_shutdown_hosts(); > nlmsvc_pid = 0; >+ write_lock(&nlmsvc_serv_lock); >+ nlmsvc_serv = NULL; >+ write_unlock(&nlmsvc_serv_lock); > } else > printk(KERN_DEBUG > "lockd: new process, skipping host shutdown\n"); >@@ -369,6 +377,16 @@ out: > up(&nlmsvc_sema); > } > >+/* wake up current lockd thread */ >+void >+lockd_wake_up(void) >+{ >+ read_lock(&nlmsvc_serv_lock); >+ if (nlmsvc_serv) >+ svc_wake_up(nlmsvc_serv); >+ read_unlock(&nlmsvc_serv_lock); >+} >+ > /* > * Sysctl parameters (same as module parameters, different interface). > */ >diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c >index 49f9597..4812da3 100644 >--- a/fs/lockd/svclock.c >+++ b/fs/lockd/svclock.c >@@ -475,7 +475,7 @@ nlmsvc_notify_blocked(struct file_lock *fl) > for (bp = &nlm_blocked; (block = *bp) != 0; bp = &block->b_next) { > if (nlm_compare_locks(&block->b_call.a_args.lock.fl, fl)) { > nlmsvc_insert_block(block, 0); >- svc_wake_up(block->b_daemon); >+ lockd_wake_up(); > return; > } > } >@@ -608,7 +608,7 @@ nlmsvc_grant_callback(struct rpc_task *task) > timeout = 60 * HZ; > } > nlmsvc_insert_block(block, timeout); >- svc_wake_up(block->b_daemon); >+ lockd_wake_up(); > block->b_incall = 0; > > nlm_release_host(call->a_host); >diff --git a/include/linux/lockd/bind.h b/include/linux/lockd/bind.h >index b054deb..57551f0 100644 >--- a/include/linux/lockd/bind.h >+++ b/include/linux/lockd/bind.h >@@ -32,5 +32,6 @@ extern struct nlmsvc_binding * nlmsvc_ops; > extern int nlmclnt_proc(struct inode *, int, struct file_lock *); > extern int lockd_up(void); > extern void lockd_down(void); >+extern void lockd_wake_up(void); > > #endif /* LINUX_LOCKD_BIND_H */
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 253754
:
172425
|
191861
|
199971
|
326987