summaryrefslogtreecommitdiffstats
path: root/fs/afs/yfsclient.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2018-10-20 01:57:59 +0200
committerDavid Howells <dhowells@redhat.com>2018-10-24 01:41:09 +0200
commit18ac61853cc4e44eb30e125fc8344a3b25c7b6fe (patch)
tree9565bfd8b0dec553d351ca13ce841a5e2bbeae7a /fs/afs/yfsclient.c
parentafs: Eliminate the address pointer from the address list cursor (diff)
downloadlinux-18ac61853cc4e44eb30e125fc8344a3b25c7b6fe.tar.xz
linux-18ac61853cc4e44eb30e125fc8344a3b25c7b6fe.zip
afs: Fix callback handling
In some circumstances, the callback interest pointer is NULL, so in such a case we can't dereference it when checking to see if the callback is broken. This causes an oops in some circumstances. Fix this by replacing the function that worked out the aggregate break counter with one that actually does the comparison, and then make that return true (ie. broken) if there is no callback interest as yet (ie. the pointer is NULL). Fixes: 68251f0a6818 ("afs: Fix whole-volume callback handling") Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/yfsclient.c')
-rw-r--r--fs/afs/yfsclient.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/afs/yfsclient.c b/fs/afs/yfsclient.c
index d5e3f0095040..12658c1363ae 100644
--- a/fs/afs/yfsclient.c
+++ b/fs/afs/yfsclient.c
@@ -324,7 +324,7 @@ static void xdr_decode_YFSCallBack(struct afs_call *call,
write_seqlock(&vnode->cb_lock);
- if (call->cb_break == afs_cb_break_sum(vnode, cbi)) {
+ if (!afs_cb_is_broken(call->cb_break, vnode, cbi)) {
cb_expiry = xdr_to_u64(xdr->expiration_time);
do_div(cb_expiry, 10 * 1000 * 1000);
vnode->cb_version = ntohl(xdr->version);