Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 663853

Summary: [REG][5.6] kernel panic occurs by reading an empty file on optional mount "sync/noac" of NFSv4.
Product: Red Hat Enterprise Linux 5 Reporter: Masayoshi Yamazaki <myamazak>
Component: kernelAssignee: Jeff Layton <jlayton>
Status: CLOSED ERRATA QA Contact: Petr Beňas <pbenas>
Severity: high Docs Contact:
Priority: urgent    
Version: 5.6CC: bfields, dhoward, dhowells, jlayton, jpirko, jwilson, kzhang, pbenas, pstehlik, rwheeler, steved, syeghiay, yanwang
Target Milestone: rcKeywords: Regression, ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-13 22:03:54 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:    
Bug Blocks: 664416    
Attachments:
Description Flags
patch -- set lock_context field in nfs_readpage_sync none

Comment 4 Jeff Layton 2010-12-17 11:37:00 UTC
Thank Fujitsu for the patch.

It didn't occur to me to try reading a zero-length file in order to trigger this, but that definitely does. The patch fixes it. I've also gone through the code pretty carefully and I think this fixes the last of the places where the lock_context field should have been set.

This bug was not in 5.5 GA, but it may be recent 5.5.z kernels (not sure which one is the latest released kernel).

Comment 5 RHEL Program Management 2010-12-17 11:39:53 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 8 Jeff Layton 2010-12-17 12:14:15 UTC
Actually, this patch has a bug. It doesn't clean up the reference counts correctly in an error condition. I'll fix and re-post internally...

Comment 10 Jeff Layton 2010-12-17 14:08:15 UTC
Created attachment 469376 [details]
patch -- set lock_context field in nfs_readpage_sync

This patch fixes the problems with the original. The cleanup of the lock context in the original patch was wrong.

Comment 14 Jarod Wilson 2010-12-20 15:07:41 UTC
in kernel-2.6.18-238.el5
You can download this test kernel (or newer) from http://people.redhat.com/jwilson/el5

Detailed testing feedback is always welcomed.

Comment 17 Petr Beňas 2010-12-21 09:57:05 UTC
Reproduced in 2.6.18-237.el5 and verified in 2.6.18-238.el5.

Comment 20 errata-xmlrpc 2011-01-13 22:03:54 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-0017.html