Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 648408

Summary: Do not mix FMODE_ and O_ flags with break_lease() and may_open() [rhel-6.0.z]
Product: Red Hat Enterprise Linux 6 Reporter: RHEL Program Management <pm-rhel>
Component: kernelAssignee: Frantisek Hrbata <fhrbata>
Status: CLOSED ERRATA QA Contact: yanfu,wang <yanwang>
Severity: high Docs Contact:
Priority: high    
Version: 6.0CC: bfields, dhoward, harshula, jlayton, kzhang, moshiro, myamazak, pm-eus, steved
Target Milestone: rcKeywords: Regression, ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel-2.6.32-71.9.1.el6 Doc Type: Bug Fix
Doc Text:
Due to a mix-up between FMODE_ and O_ flags, an NFSv4 client could get a WRITE lock on a file that another NFSv4 client already had a READ lock on. As a result, data could be corrupted. With this update, FMODE_ and O_ flags are properly handled and getting a WRITE lock fails in the aforementioned case.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-11 19:47:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 642677, 1020741    
Bug Blocks:    

Description RHEL Program Management 2010-11-01 08:36:24 UTC
This bug has been copied from bug #642677 and has been proposed
to be backported to 6.0 z-stream (EUS).

Comment 3 Frantisek Hrbata 2010-11-22 07:53:51 UTC
in kernel-2.6.32-71.9.1.el6

Comment 5 yanfu,wang 2010-12-15 08:41:14 UTC
reproduced on rhel6-rc4 got the same error as per https://bugzilla.redhat.com/show_bug.cgi?id=642677#c0
verified on kernel-2.6.32-71.13.1.el6 on i386 and x86_64, result passed.
server:
# ./delegation /mnt
Step1: Get READ DELEGATION
       Get Success:(/mnt/file)
Step2: Get a READ lock
       Get READ lock success.
            <== Let the program pending here, goto STEP2
Step3: Release the READ lock
       Release READ lock success.
Step4: Close file

client:
# ./lock /mnttest/file 
Step1: Open file with O_RDWR
       Open Success:(/mnttest/file)
Step2: Get a WRITE lock
ERROR: Get WRITE lock fail
Step4: Close file

Comment 7 errata-xmlrpc 2011-01-11 19:47:45 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0007.html

Comment 8 Martin Prpič 2011-01-12 12:54:19 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Due to a mix-up between FMODE_ and O_ flags, an NFSv4 client could get a WRITE lock on a file that another NFSv4 client already had a READ lock on. As a result, data could be corrupted. With this update, FMODE_ and O_ flags are properly handled and getting a WRITE lock fails in the aforementioned case.