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 191861 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]
test patch 2
linux-2.6.9-svc-refcount.patch (text/plain), 1.95 KB, created by
Jeff Layton
on 2007-09-10 18:34:26 UTC
(
hide
)
Description:
test patch 2
Filename:
MIME Type:
Creator:
Jeff Layton
Created:
2007-09-10 18:34:26 UTC
Size:
1.95 KB
patch
obsolete
>diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c >index 49f9597..883ac5e 100644 >--- a/fs/lockd/svclock.c >+++ b/fs/lockd/svclock.c >@@ -561,9 +561,12 @@ callback: > > /* Call the client */ > nlm_get_host(block->b_call.a_host); >+ atomic_inc(&block->b_daemon->sv_count); > if (nlmsvc_async_call(&block->b_call, NLMPROC_GRANTED_MSG, >- nlmsvc_grant_callback) < 0) >+ nlmsvc_grant_callback) < 0) { >+ atomic_dec(&block->b_daemon->sv_count); > nlm_release_host(block->b_call.a_host); >+ } > up(&file->f_sema); > } > >@@ -609,6 +612,7 @@ nlmsvc_grant_callback(struct rpc_task *task) > } > nlmsvc_insert_block(block, timeout); > svc_wake_up(block->b_daemon); >+ atomic_dec(&block->b_daemon->sv_count); > block->b_incall = 0; > > nlm_release_host(call->a_host); >diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h >index 6266324..f28f6dd 100644 >--- a/include/linux/sunrpc/svc.h >+++ b/include/linux/sunrpc/svc.h >@@ -42,6 +42,7 @@ struct svc_serv { > int sv_tmpcnt; /* count of temporary sockets */ > > char * sv_name; /* service name */ >+ atomic_t sv_count; /* refcnt for async rpc's */ > }; > > /* >diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c >index 4447482..2a9858d 100644 >--- a/net/sunrpc/svc.c >+++ b/net/sunrpc/svc.c >@@ -59,6 +59,7 @@ svc_create(struct svc_program *prog, unsigned int bufsize) > INIT_LIST_HEAD(&serv->sv_tempsocks); > INIT_LIST_HEAD(&serv->sv_permsocks); > spin_lock_init(&serv->sv_lock); >+ atomic_set(&serv->sv_count, 0); > > /* Remove any stale portmap registrations */ > svc_register(serv, 0, 0); >@@ -78,6 +79,13 @@ svc_destroy(struct svc_serv *serv) > serv->sv_program->pg_name, > serv->sv_nrthreads); > >+ /* check for outstanding async RPC calls */ >+ while(atomic_read(&serv->sv_count) != 0) { >+ rpciod_wake_up(); >+ set_current_state(TASK_INTERRUPTIBLE); >+ schedule_timeout(10); >+ } >+ > if (serv->sv_nrthreads) { > if (--(serv->sv_nrthreads) != 0) { > svc_sock_update_bufs(serv); >diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
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