Skip to content

Fix /proc/sys/fs/nfs/nsm_use_hostnames on big endian machines

Thomas Huth linux-fsdevel linux-nfs linux-s390 lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2sysctl: introduce new proc handler proc_doboolinclude/linux/sysctl.h kernel/sysctl.c+44 -03 replies
2/2lockd: change the proc_handler for nsm_use_hostnamesfs/lockd/svc.c+1 -11 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchPan XinhuiKees Cook
1/2A-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] Fix /proc/sys/fs/nfs/nsm_use_hostnames on big endian machines

There is an endianess problem with /proc/sys/fs/nfs/nsm_use_hostnames (which can e.g. be seen on an s390x host) :

 # modprobe lockd nsm_use_hostnames=1
 # cat /proc/sys/fs/nfs/nsm_use_hostnames
 16777216

The nsm_use_hostnames variable is declared as "bool" which is required for the correct type for the module parameter. However, this does not work correctly with the entry in the /proc filesystem since this currently requires "int".

Jia He already provided patches for this problem a couple of years ago, but apparently they felt through the cracks and never got merged. So here's a rebased version to finally fix this issue.

Jia He (2):
sysctl: introduce new proc handler proc_dobool
lockd: change the proc_handler for nsm_use_hostnames

 fs/lockd/svc.c         |  2 +-
 include/linux/sysctl.h |  2 ++
 kernel/sysctl.c        | 42 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 45 insertions(+), 1 deletion(-)
Signature · 1 line
2.27.0