Whamcloud - gitweb
LU-16772 quota: protect lqe_glbl_data in qmt_site_recalc_cb 84/53284/2
authorSergey Cheremencev <scherementsev@ddn.com>
Tue, 25 Apr 2023 18:10:21 +0000 (22:10 +0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 17 Apr 2024 05:23:10 +0000 (05:23 +0000)
commit197e9aa693ed6eaef7b358a8f4afca4e50e80bd2
tree37fe88a9d80ee5efe0a679e26477474e3104f73c
parent6b7af79f6d2ea487e2af96fcb84b83b275ac9f8c
LU-16772 quota: protect lqe_glbl_data in qmt_site_recalc_cb

lqe_glbl_data should be protected with lqe_glbl_data_lock in
qmt_site_recalc_sb like it did in other places. Otherwise it
may cause following panic:

  BUG: unable to handle kernel NULL pointer at 00000000000000f8
  qmt_site_recalc_cb+0x2f8/0x790 [lquota]
  cfs_hash_for_each_tight+0x121/0x310 [libcfs]
  qmt_pool_recalc+0x372/0x9f0 [lquota]

Also protect lqe_glbl_data access with lqe_glbl_data_lock in
qmt_lvbo_free().

Lustre-change: https://review.whamcloud.com/50748
Lustre-commit: 50ff4d1da63e8bc1dba4b6b52219fb7024f8d66f

Fixes: 1dbcbd70f8 ("LU-15021 quota: protect lqe_glbl_data in lqe")
Signed-off-by: Sergey Cheremencev <scherementsev@ddn.com>
Change-Id: I030f14b02062151f1708a03ac7414a9991f798f6
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53284
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/quota/qmt_entry.c
lustre/quota/qmt_lock.c
lustre/quota/qmt_pool.c