summaryrefslogtreecommitdiffstats
path: root/fs/afs/flock.c
diff options
context:
space:
mode:
authorMarc Dionne <marc.dionne@auristor.com>2019-01-09 18:23:54 +0100
committerDavid Howells <dhowells@redhat.com>2019-01-17 16:15:52 +0100
commit4882a27cec24319d10f95e978ecc80050e3e3e15 (patch)
treea3467dbac70cbd71e0a3c4fe292c32086e48fc22 /fs/afs/flock.c
parentafs: Set correct lock type for the yfs CreateFile (diff)
downloadlinux-4882a27cec24319d10f95e978ecc80050e3e3e15.tar.xz
linux-4882a27cec24319d10f95e978ecc80050e3e3e15.zip
afs: Don't set vnode->cb_s_break in afs_validate()
A cb_interest record is not necessarily attached to the vnode on entry to afs_validate(), which can cause an oops when we try to bring the vnode's cb_s_break up to date in the default case (ie. no current callback promise and the vnode has not been deleted). Fix this by simply removing the line, as vnode->cb_s_break will be set when needed by afs_register_server_cb_interest() when we next get a callback promise from RPC call. The oops looks something like: BUG: unable to handle kernel NULL pointer dereference at 0000000000000018 ... RIP: 0010:afs_validate+0x66/0x250 [kafs] ... Call Trace: afs_d_revalidate+0x8d/0x340 [kafs] ? __d_lookup+0x61/0x150 lookup_dcache+0x44/0x70 ? lookup_dcache+0x44/0x70 __lookup_hash+0x24/0xa0 do_unlinkat+0x11d/0x2c0 __x64_sys_unlink+0x23/0x30 do_syscall_64+0x4d/0xf0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: ae3b7361dc0e ("afs: Fix validation/callback interaction") Signed-off-by: Marc Dionne <marc.dionne@auristor.com> Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/flock.c')
0 files changed, 0 insertions, 0 deletions