diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-12-19 17:11:25 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-12-19 23:12:31 -0500 |
commit | 9b5b1f5bf9dcdb6f23abf65977a675eb4deba3c0 (patch) | |
tree | 2f7f341d38d6a8ae71ff1fefa9e48a467b34f5a1 /fs/lockd/clntlock.c | |
parent | 48e49187753ec3b4fa84a7165c9b7a59f3875b56 (diff) | |
download | blackbird-op-linux-9b5b1f5bf9dcdb6f23abf65977a675eb4deba3c0.tar.gz blackbird-op-linux-9b5b1f5bf9dcdb6f23abf65977a675eb4deba3c0.zip |
NLM: Fix Oops in nlmclnt_mark_reclaim()
When mixing -olock and -onolock mounts on the same client, we have to
check that fl->fl_u.nfs_fl.owner is set before dereferencing it.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/lockd/clntlock.c')
-rw-r--r-- | fs/lockd/clntlock.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c index 006bb9e14579..3eaf6e701087 100644 --- a/fs/lockd/clntlock.c +++ b/fs/lockd/clntlock.c @@ -157,6 +157,8 @@ void nlmclnt_mark_reclaim(struct nlm_host *host) inode = fl->fl_file->f_dentry->d_inode; if (inode->i_sb->s_magic != NFS_SUPER_MAGIC) continue; + if (fl->fl_u.nfs_fl.owner == NULL) + continue; if (fl->fl_u.nfs_fl.owner->host != host) continue; if (!(fl->fl_u.nfs_fl.flags & NFS_LCK_GRANTED)) @@ -226,6 +228,8 @@ restart: inode = fl->fl_file->f_dentry->d_inode; if (inode->i_sb->s_magic != NFS_SUPER_MAGIC) continue; + if (fl->fl_u.nfs_fl.owner == NULL) + continue; if (fl->fl_u.nfs_fl.owner->host != host) continue; if (!(fl->fl_u.nfs_fl.flags & NFS_LCK_RECLAIM)) |