RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2114577 - Regression in setting nfs mount options
Summary: Regression in setting nfs mount options
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: kernel
Version: 8.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Scott Mayhew
QA Contact: Yongcheng Yang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-02 20:38 UTC by Frank Sorenson
Modified: 2023-08-02 23:32 UTC (History)
4 users (show)

Fixed In Version: kernel-4.18.0-418.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2114872 (view as bug list)
Environment:
Last Closed: 2022-11-08 10:39:11 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gitlab redhat/rhel/src/kernel rhel-8 merge_requests 3235 0 None None None 2022-08-04 20:22:33 UTC
Red Hat Issue Tracker RHELPLAN-129951 0 None None None 2022-08-02 20:43:07 UTC
Red Hat Knowledge Base (Solution) 6970393 0 None None None 2022-08-03 07:25:56 UTC
Red Hat Product Errata RHSA-2022:7683 0 None None None 2022-11-08 10:40:16 UTC

Description Frank Sorenson 2022-08-02 20:38:16 UTC
Description of problem:

A patch between 8.5 and 8.6 kernels broke some nfs mount options, such as 'noresvport'


Version-Release number of selected component (if applicable):

kernel-4.18.0-372*

(all kernels beginning with kernel-4.18.0-356.el8~13^2~30)


How reproducible:

easy, see steps below

Steps to Reproduce:

 # mount server:/export /mnt -onoresvport
 # netstat -anpt | grep -w 2049


Actual results:

source TCP port is still in the 'reserved' port range


Expected results:

source TCP port is 1024+


Additional info:

this became broken with the following commit in the RHEL 8.6 kernel:

cf2c7c1aa904 NFSv4: Initialise connection to the server in nfs4_alloc_client()


this is fixed with this upstream commit:

commit 468d126dab45718feeb728319be20bd869a5eaa7
Author: Trond Myklebust <trond.myklebust>
Date:   2022-02-02 18:52:01 -0500

    NFS: Fix initialisation of nfs_client cl_flags field
    
    For some long forgotten reason, the nfs_client cl_flags field is
    initialised in nfs_get_client() instead of being initialised at
    allocation time. This quirk was harmless until we moved the call to
    nfs_create_rpc_client().
    
    Fixes: dd99e9f98fbf ("NFSv4: Initialise connection to the server in nfs4_alloc_client()")
    Cc: stable.org # 4.8.x
    Signed-off-by: Trond Myklebust <trond.myklebust>
    Signed-off-by: Anna Schumaker <Anna.Schumaker>

Comment 3 Yongcheng Yang 2022-08-16 02:56:58 UTC
Verified in kernel 4.18.0-418.el8 https://beaker.engineering.redhat.com/jobs/6915912

# with default "resvport"
[22:04:54 root@ ~~]# mount localhost:/exportdir/home /mnt/nfs-mount-options-all -o vers=4.2,resvport
[22:04:54 root@ ~~]# grep /mnt/nfs-mount-options-all /proc/mounts
localhost:/exportdir/home /mnt/nfs-mount-options-all nfs4 rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp6,timeo=600,retrans=2,sec=sys,clientaddr=::1,local_lock=none,addr=::1 0 0
[22:04:54 root@ ~~]# ss -n state established dport :nfs
Netid Recv-Q Send-Q Local Address:Port Peer Address:PortProcess
tcp   0      0              [::1]:821         [::1]:2049       
                            ^^^^^^^^^^
[22:04:54 root@ ~~]# umount /mnt/nfs-mount-options-all

# with "noresvport"
[22:04:54 root@ ~~]# mount localhost:/exportdir/home /mnt/nfs-mount-options-all -o vers=4.2,noresvport
[22:04:54 root@ ~~]# grep /mnt/nfs-mount-options-all /proc/mounts | grep 'noresvport'
localhost:/exportdir/home /mnt/nfs-mount-options-all nfs4 rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,noresvport,proto=tcp6,timeo=600,retrans=2,sec=sys,clientaddr=::1,local_lock=none,addr=::1 0 0
[22:04:55 root@ ~~]# ss -n state established dport :nfs
Netid Recv-Q Send-Q Local Address:Port  Peer Address:PortProcess
tcp   0      0              [::1]:41520        [::1]:2049       
                            ^^^^^^^^^^^^
[22:04:55 root@ ~~]# umount /mnt/nfs-mount-options-all

Comment 7 errata-xmlrpc 2022-11-08 10:39:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: kernel security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:7683


Note You need to log in before you can comment on or make changes to this bug.