- From 5b6053fb01d4a217353bea2815ec212b6e2d7912 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Wed, 12 Mar 2025 18:51:06 +0100
- Subject: [PATCH 2/2] sys: |RxChangeBufferingState()| can only be used with
- exclusive FCB lock held
- |RxChangeBufferingState()| can only be used with a exclusive FCB lock held.
- Reported-by: Dan Shelton <dan.f.shelton@gmail.com>
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- sys/nfs41sys_driver.c | 2 ++
- sys/nfs41sys_fsctl.c | 2 ++
- sys/nfs41sys_openclose.c | 2 ++
- 3 files changed, 6 insertions(+)
- diff --git a/sys/nfs41sys_driver.c b/sys/nfs41sys_driver.c
- index 9457ddb..57539fe 100644
- --- a/sys/nfs41sys_driver.c
- +++ b/sys/nfs41sys_driver.c
- @@ -906,7 +906,9 @@ void enable_caching(
- if (!flag)
- return;
- + (void)RxAcquireExclusiveFcbResourceInMRx(SrvOpen->pFcb);
- RxChangeBufferingState((PSRV_OPEN)SrvOpen, ULongToPtr(flag), 1);
- + RxReleaseFcbResourceInMRx(SrvOpen->pFcb);
- ExAcquireFastMutex(&fcblistLock);
- pEntry = openlist.head.Flink;
- diff --git a/sys/nfs41sys_fsctl.c b/sys/nfs41sys_fsctl.c
- index ede33e3..c7bf557 100644
- --- a/sys/nfs41sys_fsctl.c
- +++ b/sys/nfs41sys_fsctl.c
- @@ -492,7 +492,9 @@ NTSTATUS nfs41_SetZeroData(
- ULONG flag = DISABLE_CACHING;
- DbgP("nfs41_SetZeroData: disableing caching for file '%wZ'\n",
- SrvOpen->pAlreadyPrefixedName);
- + (void)RxAcquireExclusiveFcbResourceInMRx(SrvOpen->pFcb);
- RxChangeBufferingState((PSRV_OPEN)SrvOpen, ULongToPtr(flag), 1);
- + RxReleaseFcbResourceInMRx(SrvOpen->pFcb);
- status = nfs41_UpcallCreate(NFS41_SYSOP_FSCTL_SET_ZERO_DATA,
- &nfs41_fobx->sec_ctx,
- diff --git a/sys/nfs41sys_openclose.c b/sys/nfs41sys_openclose.c
- index 4d61e42..030f2c8 100644
- --- a/sys/nfs41sys_openclose.c
- +++ b/sys/nfs41sys_openclose.c
- @@ -911,7 +911,9 @@ retry_on_link:
- DbgP("nfs41_Create: reopening (changed) file '%wZ'\n",
- SrvOpen->pAlreadyPrefixedName);
- #endif
- + (void)RxAcquireExclusiveFcbResourceInMRx(SrvOpen->pFcb);
- RxChangeBufferingState((PSRV_OPEN)SrvOpen, ULongToPtr(flag), 1);
- + RxReleaseFcbResourceInMRx(SrvOpen->pFcb);
- }
- if (!nfs41_fcb->StandardInfo.Directory &&
- --
- 2.45.1
[patch] |RxChangeBufferingState()| can only be used with a exclusive FCB lock held
Posted by Anonymous on Fri 14th Mar 2025 12:51
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.