pastebin - collaborative debugging tool
rovema.kpaste.net RSS


msnfs41client: Fixes for stability, crashes in debug kernel module and libtirc, 2023-11-09
Posted by Anonymous on Thu 9th Nov 2023 15:12
raw | new post

  1. From 9d5e3868db7f79f4145e5aff7089b0c3182c0436 Mon Sep 17 00:00:00 2001
  2. From: Roland Mainz <roland.mainz@nrubsig.org>
  3. Date: Thu, 9 Nov 2023 11:02:49 +0100
  4. Subject: [PATCH 1/3] sys/nfs41_driver: Retry |KeWaitForSingleObject()| for
  5.  upcall too
  6.  
  7. sys/nfs41_driver: Retry |KeWaitForSingleObject| in |nfs41_upcall()|
  8. too, as we already did in 'sys/nfs41_driver: Fix "IOCTL_NFS41_WRITE
  9. failed with 31 xid=... opcode=..."'.
  10.  
  11. The issue has not been seen in |nfs41_upcall()| in the wild yet, but
  12. better to safeguard it here...
  13.  
  14. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  15. ---
  16. sys/nfs41_driver.c | 22 ++++++++++++++++++----
  17.  1 file changed, 18 insertions(+), 4 deletions(-)
  18.  
  19. diff --git a/sys/nfs41_driver.c b/sys/nfs41_driver.c
  20. index 0679a22..71d4032 100644
  21. --- a/sys/nfs41_driver.c
  22. +++ b/sys/nfs41_driver.c
  23. @@ -1564,14 +1564,28 @@ process_upcall:
  24.              RxContext->InformationToReturn = len;
  25.      }
  26.      else {
  27. +retry_wait:
  28.          status = KeWaitForSingleObject(&upcallEvent, Executive, UserMode, TRUE,
  29.              (PLARGE_INTEGER) NULL);
  30.          print_wait_status(0, "[upcall]", status, NULL, NULL, 0);
  31.          switch (status) {
  32. -        case STATUS_SUCCESS: goto process_upcall;
  33. -        case STATUS_USER_APC:
  34. -        case STATUS_ALERTED:
  35. -        default: goto out;
  36. +            case STATUS_USER_APC:
  37. +            case STATUS_ALERTED:
  38. +                DbgP("nfs41_upcall: KeWaitForSingleObject() "
  39. +                    "returned status(=%ld), "
  40. +                    "retry waiting for '%s' entry=%p xid=%lld\n",
  41. +                    (long)status,
  42. +                    opcode2string(entry->opcode), entry, entry->xid);
  43. +                goto retry_wait;
  44. +            case STATUS_SUCCESS:
  45. +                goto process_upcall;
  46. +            default:
  47. +                DbgP("nfs41_upcall: KeWaitForSingleObject() "
  48. +                    "returned UNEXPECTED status(=%ld), "
  49. +                    "for '%s' entry=%p xid=%lld\n",
  50. +                    (long)status,
  51. +                    opcode2string(entry->opcode), entry, entry->xid);
  52. +                goto out;
  53.          }
  54.      }
  55.  out:
  56. --
  57. 2.42.1
  58.  
  59. From 0f0d7b9c90499edf1cce6820a6bd5b2d1badfcee Mon Sep 17 00:00:00 2001
  60. From: Roland Mainz <roland.mainz@nrubsig.org>
  61. Date: Thu, 9 Nov 2023 12:24:43 +0100
  62. Subject: [PATCH 2/3] libtirpc: Document |_open()| limit+ensure FD_SETSIZE has
  63.  same value
  64.  
  65. libtirpc:
  66. 1. Document the maximum fd number limit of |_open()|
  67. (currently |8192| on Windows 10)
  68. 2. Add sourcecode safeguards to ensure that |FD_SETSIZE| has the
  69. same value (currently |1024|) everywhere we use libtirpc.
  70.  
  71. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  72. ---
  73. build.vc19/nfsd/nfsd.vcxproj |  8 ++++----
  74.  libtirpc/src/sources         |  2 +-
  75.  libtirpc/src/wintirpc.c      | 31 ++++++++++++++++++++++++-------
  76.  libtirpc/tirpc/wintirpc.h    | 24 ++++++++++++++++++++++++
  77.  4 files changed, 53 insertions(+), 12 deletions(-)
  78.  
  79. diff --git a/build.vc19/nfsd/nfsd.vcxproj b/build.vc19/nfsd/nfsd.vcxproj
  80. index b259108..1687a0c 100644
  81. --- a/build.vc19/nfsd/nfsd.vcxproj
  82. +++ b/build.vc19/nfsd/nfsd.vcxproj
  83. @@ -87,7 +87,7 @@
  84.        </PrecompiledHeader>
  85.        <WarningLevel>Level3</WarningLevel>
  86.        <Optimization>Disabled</Optimization>
  87. -      <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;NO_CB_4_KRB5P;STANDALONE_NFSD;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  88. +      <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;FD_SETSIZE=1024;INET6;NO_CB_4_KRB5P;STANDALONE_NFSD;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  89.        <AdditionalIncludeDirectories>..\..\libtirpc\tirpc;..\..\sys;..\..\dll;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
  90.      </ClCompile>
  91.      <Link>
  92. @@ -102,7 +102,7 @@
  93.        </PrecompiledHeader>
  94.        <WarningLevel>Level3</WarningLevel>
  95.        <Optimization>Disabled</Optimization>
  96. -      <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;NO_CB_4_KRB5P;STANDALONE_NFSD;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  97. +      <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;FD_SETSIZE=1024;INET6;NO_CB_4_KRB5P;STANDALONE_NFSD;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  98.        <AdditionalIncludeDirectories>..\..\libtirpc\tirpc;..\..\sys;..\..\dll;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
  99.      </ClCompile>
  100.      <Link>
  101. @@ -119,7 +119,7 @@
  102.        <Optimization>MaxSpeed</Optimization>
  103.        <FunctionLevelLinking>true</FunctionLevelLinking>
  104.        <IntrinsicFunctions>true</IntrinsicFunctions>
  105. -      <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;NO_CB_4_KRB5P;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  106. +      <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;FD_SETSIZE=1024;INET6;NO_CB_4_KRB5P;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  107.        <AdditionalIncludeDirectories>..\..\libtirpc\tirpc;..\..\sys;..\..\dll;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
  108.      </ClCompile>
  109.      <Link>
  110. @@ -138,7 +138,7 @@
  111.        <Optimization>MaxSpeed</Optimization>
  112.        <FunctionLevelLinking>true</FunctionLevelLinking>
  113.        <IntrinsicFunctions>true</IntrinsicFunctions>
  114. -      <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;NO_CB_4_KRB5P;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  115. +      <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;FD_SETSIZE=1024;INET6;NO_CB_4_KRB5P;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  116.        <AdditionalIncludeDirectories>..\..\libtirpc\tirpc;..\..\sys;..\..\dll;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
  117.      </ClCompile>
  118.      <Link>
  119. diff --git a/libtirpc/src/sources b/libtirpc/src/sources
  120. index 87249b5..26f5d59 100644
  121. --- a/libtirpc/src/sources
  122. +++ b/libtirpc/src/sources
  123. @@ -81,7 +81,7 @@ DLLBASE=0x1010000
  124.  #USE_NTDLL=1
  125.  #USE_MSVCRT=1
  126.  USE_LIBCMT=1
  127. -NET_C_DEFINES=-DUNICODE -DFD_SETSIZE=128 -DINET6 -DNO_CB_4_KRB5P -DPORTMAP
  128. +NET_C_DEFINES=-DUNICODE -DFD_SETSIZE=1024 -DINET6 -DNO_CB_4_KRB5P -DPORTMAP
  129.  
  130.  INCLUDES=..\sys; \
  131.         ..\tirpc; \
  132. diff --git a/libtirpc/src/wintirpc.c b/libtirpc/src/wintirpc.c
  133. index e75b023..4db1bb8 100644
  134. --- a/libtirpc/src/wintirpc.c
  135. +++ b/libtirpc/src/wintirpc.c
  136. @@ -166,16 +166,14 @@ struct map_osfhandle_fd
  137.         int     m_fd;
  138.  };
  139.  
  140. -#define MAP_OSFHANDLE_SIZE (1024)
  141. -
  142.  static
  143. -struct map_osfhandle_fd handle_fd_map[MAP_OSFHANDLE_SIZE];
  144. +struct map_osfhandle_fd handle_fd_map[WINTIRPC_MAX_OSFHANDLE_FD_NHANDLE_VALUE];
  145.  
  146.  void wintirpc_register_osfhandle_fd(SOCKET handle, int fd)
  147.  {
  148.         assert(handle != 0);
  149.         assert(handle != SOCKET_ERROR);
  150. -       assert(fd < MAP_OSFHANDLE_SIZE);
  151. +       assert(fd < WINTIRPC_MAX_OSFHANDLE_FD_NHANDLE_VALUE);
  152.  
  153.         handle_fd_map[fd].m_fd = fd;
  154.         handle_fd_map[fd].m_s = handle;
  155. @@ -188,7 +186,7 @@ void wintirpc_unregister_osfhandle(SOCKET handle)
  156.         assert(handle != 0);
  157.         assert(handle != SOCKET_ERROR);
  158.  
  159. -       for (i=0 ; i < MAP_OSFHANDLE_SIZE ; i++) {
  160. +       for (i=0 ; i < WINTIRPC_MAX_OSFHANDLE_FD_NHANDLE_VALUE ; i++) {
  161.                 if (handle_fd_map[i].m_s == handle) {
  162.                         handle_fd_map[i].m_s = SOCKET_ERROR;
  163.                         handle_fd_map[i].m_fd = -1;
  164. @@ -205,7 +203,7 @@ int wintirpc_handle2fd(SOCKET handle)
  165.         assert(handle != 0);
  166.         assert(handle != SOCKET_ERROR);
  167.  
  168. -       for (i=0 ; i < MAP_OSFHANDLE_SIZE ; i++) {
  169. +       for (i=0 ; i < WINTIRPC_MAX_OSFHANDLE_FD_NHANDLE_VALUE ; i++) {
  170.                 if ((handle_fd_map[i].m_s == handle) &&
  171.                         (handle_fd_map[i].m_fd != -1)) {
  172.                         return handle_fd_map[i].m_fd;
  173. @@ -238,9 +236,19 @@ int wintirpc_socket(int af, int type, int protocol)
  174.                 return -1;
  175.         }
  176.  
  177. +       if (fd >= WINTIRPC_MAX_OSFHANDLE_FD_NHANDLE_VALUE) {
  178. +               (void)_close(fd);
  179. +               (void)fprintf(stderr, "wintirpc_socket: fd overflow %d >= %d\n",
  180. +                       fd,
  181. +                       WINTIRPC_MAX_OSFHANDLE_FD_NHANDLE_VALUE);
  182. +               errno = ENOMEM;
  183. +               return -1;
  184. +       }
  185. +
  186.         wintirpc_register_osfhandle_fd(s, fd);
  187.  
  188. -       (void)fprintf(stderr, "wintirpc_socket: %s/%d: sock fd=%d\n", __FILE__, (int)__LINE__, fd);
  189. +       (void)fprintf(stderr, "wintirpc_socket: %s/%d: sock fd=%d\n",
  190. +               __FILE__, (int)__LINE__, fd);
  191.  
  192.         return fd;
  193.  }
  194. @@ -281,6 +289,15 @@ int wintirpc_accept(int in_s_fd, struct sockaddr *addr, int *addrlen)
  195.                 return -1;
  196.         }
  197.  
  198. +       if (out_s_fd >= WINTIRPC_MAX_OSFHANDLE_FD_NHANDLE_VALUE) {
  199. +               (void)_close(out_s_fd);
  200. +               (void)fprintf(stderr, "wintirpc_accept: out_s_fd overflow %d >= %d\n",
  201. +                       out_s_fd,
  202. +                       WINTIRPC_MAX_OSFHANDLE_FD_NHANDLE_VALUE);
  203. +               errno = ENOMEM;
  204. +               return -1;
  205. +       }
  206. +
  207.         wintirpc_register_osfhandle_fd(out_s, out_s_fd);
  208.  
  209.         return out_s_fd;
  210. diff --git a/libtirpc/tirpc/wintirpc.h b/libtirpc/tirpc/wintirpc.h
  211. index e7472aa..66a0f48 100644
  212. --- a/libtirpc/tirpc/wintirpc.h
  213. +++ b/libtirpc/tirpc/wintirpc.h
  214. @@ -74,6 +74,30 @@
  215.  #define __END_DECLS
  216.  #define __THROW
  217.  
  218. +/*
  219. + * Maximum integer value |_open()| and |_open_osfhandle()| can return
  220. + *
  221. + * Right now the Windows headers do not provide this as public value.
  222. + *
  223. + * https://github.com/ojdkbuild/tools_toolchain_sdk10_1607/blob/master/Source/10.0.14393.0/ucrt/inc/corecrt_internal_lowio.h#L94
  224. + * defines it like this:
  225. + * -- snip --
  226. + * #define IOINFO_ARRAY_ELTS    (1 << IOINFO_L2E)
  227. + * #define IOINFO_ARRAYS        128
  228. + * #define _NHANDLE_            (IOINFO_ARRAYS * IOINFO_ARRAY_ELTS)
  229. + * -- snip --
  230. + * ... which makes |_NHANDLE_|==2^6*128==8192
  231. + */
  232. +#define WINTIRPC_MAX_OSFHANDLE_FD_NHANDLE_VALUE (8192)
  233. +
  234. +/* Safeguard */
  235. +#ifndef FD_SETSIZE
  236. +#error FD_SETSIZE not set
  237. +#endif
  238. +#if (FD_SETSIZE < 1024)
  239. +#error FD_SETSIZE should be at least 1024
  240. +#endif
  241. +
  242.  /*
  243.   * Functions imported from BSD
  244.   */
  245. --
  246. 2.42.1
  247.  
  248. From 9b359bca46e82257dbf610377a19da6f4bba64ae Mon Sep 17 00:00:00 2001
  249. From: Roland Mainz <roland.mainz@nrubsig.org>
  250. Date: Thu, 9 Nov 2023 14:40:40 +0100
  251. Subject: [PATCH 3/3] sys/nfs41_driver: Fix random crashes/hangs when <CTRL-C>
  252.  nfsd_debug.exe
  253.  
  254. 1. Fix random kernel crashes in the debug version of the kernel
  255. module when nfsd_debug.exe gets a <CTRL-C>, caused by dereferencing
  256. |NULL| |entry| in |DbgP()|.
  257. Added new debug macro to catch all possible cases, to ensure we are
  258. not getting that issue again.
  259. 2. Disable retry-wait code in |nfs41_upcall()| for now, until
  260. we can figure out a way to prevent it from hanging nfsd_debug.exe
  261. on exit.
  262.  
  263. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  264. ---
  265. sys/nfs41_debug.h  |  2 ++
  266.  sys/nfs41_driver.c | 66 ++++++++++++++++++++++++++++++----------------
  267.  2 files changed, 46 insertions(+), 22 deletions(-)
  268.  
  269. diff --git a/sys/nfs41_debug.h b/sys/nfs41_debug.h
  270. index 6297a1a..7e95ff5 100644
  271. --- a/sys/nfs41_debug.h
  272. +++ b/sys/nfs41_debug.h
  273. @@ -3,6 +3,7 @@
  274.   *
  275.   * Olga Kornievskaia <aglo@umich.edu>
  276.   * Casey Bodley <cbodley@umich.edu>
  277. + * Roland Mainz <roland.mainz@nrubsig.org>
  278.   *
  279.   * This library is free software; you can redistribute it and/or modify it
  280.   * under the terms of the GNU Lesser General Public License as published by
  281. @@ -49,6 +50,7 @@ void print_ea_info(int on, PFILE_FULL_EA_INFORMATION info);
  282.  void print_get_ea(int on, PFILE_GET_EA_INFORMATION info);
  283.  void print_caching_level(int on, ULONG flag, PUNICODE_STRING s);
  284.  const char *opcode2string(int opcode);
  285. +#define ENTRY_OPCODE2STRING(entry) ((entry)?opcode2string((entry)->opcode):"<entry==NULL>")
  286.  void print_open_error(int on, int status);
  287.  void print_wait_status(int on, const char *str, NTSTATUS status,
  288.                         const char *opcode, PVOID entry, LONGLONG xid);
  289. diff --git a/sys/nfs41_driver.c b/sys/nfs41_driver.c
  290. index 71d4032..123e6dd 100644
  291. --- a/sys/nfs41_driver.c
  292. +++ b/sys/nfs41_driver.c
  293. @@ -3,6 +3,7 @@
  294.   *
  295.   * Olga Kornievskaia <aglo@umich.edu>
  296.   * Casey Bodley <cbodley@umich.edu>
  297. + * Roland Mainz <roland.mainz@nrubsig.org>
  298.   *
  299.   * This library is free software; you can redistribute it and/or modify it
  300.   * under the terms of the GNU Lesser General Public License as published by
  301. @@ -583,7 +584,7 @@ NTSTATUS marshal_nfs41_header(
  302.      if (MmIsAddressValid(entry->filename))
  303.          DbgP("[upcall header] xid=%lld opcode=%s filename=%wZ version=%d "
  304.              "session=0x%x open_state=0x%x\n", entry->xid,
  305. -            opcode2string(entry->opcode), entry->filename,
  306. +            ENTRY_OPCODE2STRING(entry), entry->filename,
  307.              entry->version, entry->session, entry->open_state);
  308.      else
  309.          status = STATUS_INTERNAL_ERROR;
  310. @@ -1496,7 +1497,8 @@ retry_wait:
  311.          }
  312.          if (status != STATUS_SUCCESS) {
  313.              print_wait_status(1, "[downcall]", status,
  314. -                opcode2string(entry->opcode), entry, entry->xid);
  315. +                ENTRY_OPCODE2STRING(entry), entry,
  316. +                (entry?entry->xid:-1LL));
  317.              if (status == STATUS_TIMEOUT)
  318.                  status = STATUS_NETWORK_UNREACHABLE;
  319.          }
  320. @@ -1504,29 +1506,38 @@ retry_wait:
  321.  
  322.          status = KeWaitForSingleObject(&entry->cond, Executive, KernelMode, FALSE, NULL);
  323.  #endif
  324. -        print_wait_status(0, "[downcall]", status, opcode2string(entry->opcode),
  325. -            entry, entry->xid);
  326. +        print_wait_status(0, "[downcall]", status,
  327. +            ENTRY_OPCODE2STRING(entry), entry,
  328. +            (entry?entry->xid:-1LL));
  329.      } else
  330.          goto out;
  331.  
  332.      switch(status) {
  333. +    case STATUS_SUCCESS:
  334. +        break;
  335.      case STATUS_USER_APC:
  336.      case STATUS_ALERTED:
  337.          DbgP("nfs41_UpcallWaitForReply: KeWaitForSingleObject() "
  338.              "returned status(=%ld), "
  339.              "retry waiting for '%s' entry=%p xid=%lld\n",
  340.              (long)status,
  341. -            opcode2string(entry->opcode), entry, entry->xid);
  342. -        goto retry_wait;
  343. -    case STATUS_SUCCESS: break;
  344. +            ENTRY_OPCODE2STRING(entry),
  345. +            entry,
  346. +            (entry?entry->xid:-1LL));
  347. +        if (entry) {
  348. +            goto retry_wait;
  349. +        }
  350. +        /* fall-through */
  351.      default:
  352.          ExAcquireFastMutex(&entry->lock);
  353.          if (entry->state == NFS41_DONE_PROCESSING) {
  354.              ExReleaseFastMutex(&entry->lock);
  355.              break;
  356.          }
  357. -        DbgP("[upcall] abandoning %s entry=%p xid=%lld\n",
  358. -            opcode2string(entry->opcode), entry, entry->xid);
  359. +        DbgP("[upcall] abandoning '%s' entry=%p xid=%lld\n",
  360. +            ENTRY_OPCODE2STRING(entry),
  361. +            entry,
  362. +            (entry?entry->xid:-1LL));
  363.          entry->state = NFS41_NOT_WAITING;
  364.          ExReleaseFastMutex(&entry->lock);
  365.          goto out;
  366. @@ -1540,13 +1551,14 @@ NTSTATUS nfs41_upcall(
  367.      IN PRX_CONTEXT RxContext)
  368.  {
  369.      NTSTATUS status = STATUS_SUCCESS;
  370. -    nfs41_updowncall_entry *entry = NULL;
  371.      ULONG len = 0;
  372. -    PLIST_ENTRY pEntry;
  373. +    PLIST_ENTRY pEntry = NULL;
  374.  
  375.  process_upcall:
  376.      nfs41_RemoveFirst(upcallLock, upcall, pEntry);
  377.      if (pEntry) {
  378. +        nfs41_updowncall_entry *entry;
  379. +
  380.          entry = (nfs41_updowncall_entry *)CONTAINING_RECORD(pEntry,
  381.                      nfs41_updowncall_entry, next);
  382.          ExAcquireFastMutex(&entry->lock);
  383. @@ -1564,27 +1576,37 @@ process_upcall:
  384.              RxContext->InformationToReturn = len;
  385.      }
  386.      else {
  387. +/*
  388. + * gisburn: |NFSV41_UPCALL_RETRY_WAIT| disabled for now because it
  389. + * causes nfsd_debug.exe to hang on <CTRL-C>
  390. + */
  391. +#ifdef NFSV41_UPCALL_RETRY_WAIT
  392.  retry_wait:
  393. +#endif /* NFSV41_UPCALL_RETRY_WAIT */
  394.          status = KeWaitForSingleObject(&upcallEvent, Executive, UserMode, TRUE,
  395.              (PLARGE_INTEGER) NULL);
  396.          print_wait_status(0, "[upcall]", status, NULL, NULL, 0);
  397.          switch (status) {
  398. +            case STATUS_SUCCESS:
  399. +                goto process_upcall;
  400.              case STATUS_USER_APC:
  401.              case STATUS_ALERTED:
  402.                  DbgP("nfs41_upcall: KeWaitForSingleObject() "
  403. -                    "returned status(=%ld), "
  404. -                    "retry waiting for '%s' entry=%p xid=%lld\n",
  405. -                    (long)status,
  406. -                    opcode2string(entry->opcode), entry, entry->xid);
  407. +                    "returned status(=%ld)"
  408. +#ifdef NFSV41_UPCALL_RETRY_WAIT
  409. +                    ", retry waiting"
  410. +#endif /* NFSV41_UPCALL_RETRY_WAIT */
  411. +                    "\n",
  412. +                    (long)status);
  413. +#ifdef NFSV41_UPCALL_RETRY_WAIT
  414.                  goto retry_wait;
  415. -            case STATUS_SUCCESS:
  416. -                goto process_upcall;
  417. +#else
  418. +                /* fall-through */
  419. +#endif /* NFSV41_UPCALL_RETRY_WAIT */
  420.              default:
  421.                  DbgP("nfs41_upcall: KeWaitForSingleObject() "
  422. -                    "returned UNEXPECTED status(=%ld), "
  423. -                    "for '%s' entry=%p xid=%lld\n",
  424. -                    (long)status,
  425. -                    opcode2string(entry->opcode), entry, entry->xid);
  426. +                    "returned UNEXPECTED status(=%ld)\n",
  427. +                    (long)status);
  428.                  goto out;
  429.          }
  430.      }
  431. @@ -1608,7 +1630,7 @@ void unmarshal_nfs41_header(
  432.      *buf += sizeof(tmp->errno);
  433.  #ifdef DEBUG_MARSHAL_HEADER
  434.      DbgP("[downcall header] xid=%lld opcode=%s status=%d errno=%d\n", tmp->xid,
  435. -        opcode2string(tmp->opcode), tmp->status, tmp->errno);
  436. +        ENTRY_OPCODE2STRING(tmp), tmp->status, tmp->errno);
  437.  #endif
  438.  }
  439.  
  440. --
  441. 2.42.1

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.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at