- From 585541047e7b0fe9f6225e4a808ee23b52f9830d Mon Sep 17 00:00:00 2001
- From: Dan Shelton <dan.f.shelton@gmail.com>
- Date: Mon, 28 Oct 2024 15:50:25 +0100
- Subject: [PATCH 1/3] sys: Fix bogus ASSERT() trips in FsRtlCopyRead2()
- Fix bogus ASSERT() trips in FsRtlCopyRead2(), just testing
- for (IoStatus->Status == STATUS_END_OF_FILE) is wrong.
- Also add same ASSERT() to CcCopyRead() code path.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- sys/copysup.c | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
- diff --git a/sys/copysup.c b/sys/copysup.c
- index a14f778..ece3984 100644
- --- a/sys/copysup.c
- +++ b/sys/copysup.c
- @@ -164,6 +164,11 @@ BOOLEAN FsRtlCopyRead2(
- IoStatus);
- FObj->Flags |= FO_FILE_FAST_IO_READ;
- +
- + ASSERT((!retval) ||
- + (IoStatus->Status == STATUS_END_OF_FILE) ||
- + (((ULONGLONG)FileOffset->QuadPart + IoStatus->Information) <=
- + (ULONGLONG)fo_fcb->FileSize.QuadPart));
- }
- else {
- CcFastCopyRead(FObj,
- @@ -175,7 +180,9 @@ BOOLEAN FsRtlCopyRead2(
- FObj->Flags |= FO_FILE_FAST_IO_READ;
- - ASSERT(IoStatus->Status == STATUS_END_OF_FILE);
- + ASSERT((IoStatus->Status == STATUS_END_OF_FILE) ||
- + ((FileOffset->LowPart + IoStatus->Information) <=
- + fo_fcb->FileSize.LowPart));
- }
- if (retval) {
- --
- 2.45.1
- From 6fefe520416b5c1221b1620698359e7c9f00a466 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Mon, 28 Oct 2024 16:09:16 +0100
- Subject: [PATCH 2/3] cygwin: msnfs41client should always use the full path to
- nfsd for DrMemory
- msnfs41client.bash should always use the full path to nfsd.exe for
- DrMemory
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- cygwin/devel/msnfs41client.bash | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
- diff --git a/cygwin/devel/msnfs41client.bash b/cygwin/devel/msnfs41client.bash
- index 415a2e9..f0a110c 100755
- --- a/cygwin/devel/msnfs41client.bash
- +++ b/cygwin/devel/msnfs41client.bash
- @@ -455,7 +455,8 @@ function nfsclient_rundeamon
- # no symbol cache, user "SYSTEM" cannot write data to cache
- '-no_use_symcache'
- '--'
- - "${nfsd_args[@]}"
- + "$(cygpath -w "$(which "${nfsd_args[0]}")")"
- + "${nfsd_args[@]:1}"
- '--crtdbgmem' 'none'
- )
- @@ -575,7 +576,8 @@ function nfsclient_system_rundeamon
- # no symbol cache, user "SYSTEM" cannot write data to cache
- '-no_use_symcache'
- '--'
- - "${nfsd_args[@]}"
- + "$(cygpath -w "$(which "${nfsd_args[0]}")")"
- + "${nfsd_args[@]:1}"
- '--crtdbgmem' 'none'
- )
- --
- 2.45.1
- From 62a41205350865e31c25a0fea367501844907ec6 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Mon, 28 Oct 2024 20:19:05 +0100
- Subject: [PATCH 3/3] libtirpc: Fix locking in |authnone_marshal()|
- Fix locking in |authnone_marshal()|, backported from
- libtirpc 1.3.6.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- libtirpc/src/auth_none.c | 17 ++++++-----------
- 1 file changed, 6 insertions(+), 11 deletions(-)
- diff --git a/libtirpc/src/auth_none.c b/libtirpc/src/auth_none.c
- index f013240..ef15b71 100644
- --- a/libtirpc/src/auth_none.c
- +++ b/libtirpc/src/auth_none.c
- @@ -133,24 +133,19 @@ static bool_t
- authnone_marshal(AUTH *client, XDR *xdrs, u_int *seq)
- {
- struct authnone_private *ap;
- - bool_t dummy;
- + bool_t rv = FALSE;
- extern mutex_t authnone_lock;
- assert(xdrs != NULL);
- + mutex_lock(&authnone_lock);
- ap = authnone_private;
- - if (ap == NULL) {
- -#if 0 /* gisburn: Disabled, causes mutex over-unlock */
- - mutex_unlock(&authnone_lock);
- -#endif
- - return (FALSE);
- + if (ap) {
- + rv = (*xdrs->x_ops->x_putbytes)(xdrs, ap->marshalled_client,
- + ap->mcnt);
- }
- - dummy = (*xdrs->x_ops->x_putbytes)(xdrs,
- - ap->marshalled_client, ap->mcnt);
- -#if 0 /* gisburn: Disabled, causes mutex over-unlock */
- mutex_unlock(&authnone_lock);
- -#endif
- - return (dummy);
- + return (rv);
- }
- /* All these unused parameters are required to keep ANSI-C from grumbling */
- --
- 2.45.1
msnfs41client: Patches for |FsRtlCopyRead2()| asserts, drmemory paths and libtirpc locking, 2024-10-28
Posted by Anonymous on Mon 28th Oct 2024 19:55
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.