aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/clntlock.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-03-20 13:44:06 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-03-20 13:44:06 -0500
commit7bab377fcb495ee2e5a1cd69d235f8d84c76e3af (patch)
tree67f03fbc543632ccf71075af250635201b43801b /fs/lockd/clntlock.c
parent36943fa4b2701b9ef2d60084c85ecbe634aec252 (diff)
lockd: Don't expose the process pid to the NLM server
Instead we use the nlm_lockowner->pid. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/lockd/clntlock.c')
-rw-r--r--fs/lockd/clntlock.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c
index da6354baa0b8..8ae79ae4b998 100644
--- a/fs/lockd/clntlock.c
+++ b/fs/lockd/clntlock.c
@@ -125,7 +125,15 @@ u32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *lock)
125 list_for_each_entry(block, &nlm_blocked, b_list) { 125 list_for_each_entry(block, &nlm_blocked, b_list) {
126 struct file_lock *fl_blocked = block->b_lock; 126 struct file_lock *fl_blocked = block->b_lock;
127 127
128 if (!nlm_compare_locks(fl_blocked, fl)) 128 if (fl_blocked->fl_start != fl->fl_start)
129 continue;
130 if (fl_blocked->fl_end != fl->fl_end)
131 continue;
132 /*
133 * Careful! The NLM server will return the 32-bit "pid" that
134 * we put on the wire: in this case the lockowner "pid".
135 */
136 if (fl_blocked->fl_u.nfs_fl.owner->pid != lock->svid)
129 continue; 137 continue;
130 if (!nlm_cmp_addr(&block->b_host->h_addr, addr)) 138 if (!nlm_cmp_addr(&block->b_host->h_addr, addr))
131 continue; 139 continue;