Whamcloud - gitweb
LU-15986 ptlrpc: protect rq_repmsg in ptlrpc_req_drop_rs() 57/49157/2
authorLei Feng <flei@whamcloud.com>
Thu, 30 Jun 2022 02:46:31 +0000 (10:46 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 22 Nov 2022 03:42:26 +0000 (03:42 +0000)
commitb9df7a08de6d119302be7bbe6b53061caa3ad758
tree9dcc43d6bfcdf16ba8f8185334522335d721c210
parent29aa9f6e0c1d1affe11ca33d2e26122d0c66c713
LU-15986 ptlrpc: protect rq_repmsg in ptlrpc_req_drop_rs()

There is a race condition that: on server side, one thread sent
reply message and is deleting the reply message, another is
searching for existing request and print some debug information
in _debug_req() if there is a duplicated request. They both operate on
req->rq_repmsg but it is not protected in ptlrpc_req_drop_rs().
So we protected it with req->rq_early_free_lock.

Lustre-change: https://review.whamcloud.com/47839
Lustre-commit: aaef545cff2dd958418ec9fb364d4bbe1408edb9

Signed-off-by: Lei Feng <flei@whamcloud.com>
Change-Id: Ied55427ee15c3ef84bdd2d579844eba398dbf010
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49157
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/lustre_net.h
lustre/ptlrpc/service.c