linux-stable/fs/afs
David Howells fdfff855cd afs: Fix uninitialised spinlock afs_volume::cb_break_lock
[ Upstream commit 90fa9b6452 ]

Fix the cb_break_lock spinlock in afs_volume struct by initialising it when
the volume record is allocated.

Also rename the lock to cb_v_break_lock to distinguish it from the lock of
the same name in the afs_server struct.

Without this, the following trace may be observed when a volume-break
callback is received:

  INFO: trying to register non-static key.
  the code is fine but needs lockdep annotation.
  turning off the locking correctness validator.
  CPU: 2 PID: 50 Comm: kworker/2:1 Not tainted 5.2.0-rc1-fscache+ #3045
  Hardware name: ASUS All Series/H97-PLUS, BIOS 2306 10/09/2014
  Workqueue: afs SRXAFSCB_CallBack
  Call Trace:
   dump_stack+0x67/0x8e
   register_lock_class+0x23b/0x421
   ? check_usage_forwards+0x13c/0x13c
   __lock_acquire+0x89/0xf73
   lock_acquire+0x13b/0x166
   ? afs_break_callbacks+0x1b2/0x3dd
   _raw_write_lock+0x2c/0x36
   ? afs_break_callbacks+0x1b2/0x3dd
   afs_break_callbacks+0x1b2/0x3dd
   ? trace_event_raw_event_afs_server+0x61/0xac
   SRXAFSCB_CallBack+0x11f/0x16c
   process_one_work+0x2c5/0x4ee
   ? worker_thread+0x234/0x2ac
   worker_thread+0x1d8/0x2ac
   ? cancel_delayed_work_sync+0xf/0xf
   kthread+0x11f/0x127
   ? kthread_park+0x76/0x76
   ret_from_fork+0x24/0x30

Fixes: 68251f0a68 ("afs: Fix whole-volume callback handling")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-07-21 09:03:06 +02:00
..
addr_list.c Merge branch 'afs-proc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-16 16:32:04 +09:00
afs.h afs: Rearrange status mapping 2018-04-09 21:53:59 +01:00
afs_cm.h
afs_fs.h afs: Prospectively look up extra files when doing a single lookup 2018-04-09 21:12:31 +01:00
afs_vl.h afs: Make use of the YFS service upgrade to fully support IPv6 2017-11-13 15:38:19 +00:00
cache.c fscache: Pass object size in rather than calling back for it 2018-04-06 14:05:14 +01:00
callback.c afs: Fix uninitialised spinlock afs_volume::cb_break_lock 2019-07-21 09:03:06 +02:00
cell.c afs: Fix cell proc list 2018-10-12 13:18:57 +02:00
cmservice.c Merge branch 'afs-proc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-16 16:32:04 +09:00
dir.c afs_try_auto_mntpt(): return NULL instead of ERR_PTR(-ENOENT) 2018-08-05 15:50:59 -04:00
dir_edit.c afs: Locally edit directory data for mkdir/create/unlink/... 2018-04-09 21:54:48 +01:00
dynroot.c afs: Fix cell proc list 2018-10-12 13:18:57 +02:00
file.c afs: Fix whole-volume callback handling 2018-05-14 15:15:18 +01:00
flock.c afs: Fix key refcounting in file locking code 2019-02-27 10:08:56 +01:00
fsclient.c Merge branch 'afs-proc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-16 16:32:04 +09:00
inode.c afs: Fix key refcounting in file locking code 2019-02-27 10:08:56 +01:00
internal.h afs: Fix uninitialised spinlock afs_volume::cb_break_lock 2019-07-21 09:03:06 +02:00
Kconfig fs/afs: remove depends on CONFIG_EXPERIMENTAL 2013-01-21 14:39:04 -08:00
main.c afs: Fix cell proc list 2018-10-12 13:18:57 +02:00
Makefile afs: Handle CONFIG_PROC_FS=n 2018-06-15 00:52:55 -04:00
misc.c afs: Consolidate abort_to_error translators 2017-11-13 15:38:17 +00:00
mntpt.c afs: Support the AFS dynamic root 2018-02-06 14:43:37 +00:00
netdevices.c afs: Implement network namespacing 2018-05-23 12:01:15 +01:00
proc.c afs: Fix cell proc list 2018-10-12 13:18:57 +02:00
rotate.c rxrpc: Fix handling of call quietly cancelled out on server 2018-06-04 16:06:26 -04:00
rxrpc.c afs: Handle EIO from delivery function 2018-11-27 16:13:00 +01:00
security.c afs: Fix directory permissions check 2018-05-16 21:35:23 +01:00
server.c afs: Fix clearance of reply 2018-10-15 15:31:47 +02:00
server_list.c afs: Fix refcounting in callback registration 2018-05-14 13:17:35 +01:00
super.c afs: Display manually added cells in dynamic root mount 2018-06-15 15:27:09 +01:00
vlclient.c afs: Fix mounting of backup volumes 2018-05-16 21:35:23 +01:00
volume.c afs: Fix uninitialised spinlock afs_volume::cb_break_lock 2019-07-21 09:03:06 +02:00
write.c afs: Unlock pages for __pagevec_release() 2019-05-16 19:41:21 +02:00
xattr.c afs: Overhaul volume and server record caching and fileserver rotation 2017-11-13 15:38:19 +00:00
xdr_fs.h afs: Adjust the directory XDR structures 2018-04-09 21:54:48 +01:00