• Marc Dionne's avatar
    afs: Don't set vnode->cb_s_break in afs_validate() · 4882a27c
    Marc Dionne authored
    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: ae3b7361 ("afs: Fix validation/callback interaction")
    Signed-off-by: default avatarMarc Dionne <marc.dionne@auristor.com>
    Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
    4882a27c
Name
Last commit
Last update
Documentation Loading commit data...
LICENSES Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.clang-format Loading commit data...
.cocciconfig Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...