Bug 242975 - A number of NFS oops, memory leaks found in upstream.
Summary: A number of NFS oops, memory leaks found in upstream.
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel   
(Show other bugs)
Version: 5.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Steve Dickson
QA Contact: Martin Jenner
: 244238 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2007-06-06 19:07 UTC by Steve Dickson
Modified: 2007-11-30 22:07 UTC (History)
5 users (show)

Fixed In Version: RHBA-2007-0959
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-07 19:51:53 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
he back ported jumbo patch. (14.37 KB, patch)
2007-06-06 19:07 UTC, Steve Dickson
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0959 normal SHIPPED_LIVE Updated kernel packages for Red Hat Enterprise Linux 5 Update 1 2007-11-08 00:47:37 UTC

Description Steve Dickson 2007-06-06 19:07:05 UTC
Description of problem:
Since RHEL5.1 GA there has been a number of  oops and memory leaks the 
have been found in the upstream kernel. This bz will combine all 
of the found issue into one jumbo patch. 

Here is the list of bugs that have been fixed:
commit 46b9f8e1484352f09f229107ba2a758fe386d7f7
Author: Andy Ryan <genanr@allantgroup.com>
Date:   Tue Nov 7 14:36:26 2006 -0600

NFS Exclusive open not supported bug

When trying to open a file with the O_EXCL flag over NFS on a server that does
not support exclusive mode, the file does not open.  The reason,
rpc_call_sync returns a errno number, and not the nfs error number.  I fixed
it by changing the status check in nfs3proc.c.  Either this is how it should
be fixed, or rpc_call_sync should be fixed to return the NFS error.

commit cf1308ff7829017dab0dbcc817c63dc9c212923e
Author: Trond Myklebust <Trond.Myklebust@netapp.com>
Date:   Sun Nov 19 16:44:52 2006 -0500

NFS: Fix missing page_unlock() in nfs_readpage

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

commit 23bf85ba43650e4341672a6bc85aa3f2c02eb633
Author: Trond Myklebust <Trond.Myklebust@netapp.com>
Date:   Tue Nov 21 10:40:23 2006 -0500

SUNRPC: Handle the cases where rpc_alloc_iostats() fails

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
commit bbd5a1f9fc9fad0f8725812d91c51b052e847de8
Author: Trond Myklebust <Trond.Myklebust@netapp.com>
Date:   Wed Oct 18 16:01:05 2006 -0400

SUNRPC: Fix up missing BKL in asynchronous RPC callback functions

commit a995e9eb3258df6ab2e9f958e08003978e50d568
Author: Trond Myklebust <Trond.Myklebust@netapp.com>
Date:   Fri Feb 2 15:37:43 2007 -0800

NLM: Fix double free in __nlm_async_call

rpc_call_async() will always call rpc_release_calldata(), so it is an
error for __nlm_async_call() to do so as well.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

commit f2d0d85e58099d518cb50b1c95fc1fc62bbce1b8
Author: Trond Myklebust <Trond.Myklebust@netapp.com>
Date:   Fri Feb 2 14:46:09 2007 -0800

NFSv4: Fix Oops in nfs4_create_referral_server

The filehandle that is passed into nfs4_create_referral_server is
not initialised. The expectation is that nfs4_create_referral_server will
initialise it, and return it to the caller.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

commit ab91f264cfbafd079dcb1bd02e9803c2dd65de19
Author: Trond Myklebust <Trond.Myklebust@netapp.com>
Date:   Fri Feb 2 14:47:17 2007 -0800

NFSv4: Fix NFS4_enc_server_caps_sz/NFS4_dec_server_caps_sz

Insert missing encode_putfh_maxsz/decode_putfh_maxsz

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
commit df1d5d23d3a1a713c69b0f9ec67c59aeca3ce6b3
Author: Trond Myklebust <Trond.Myklebust@netapp.com>
Date:   Mon Jan 15 13:56:29 2007 -0500

NFS: Fix a readdir/lookup inefficiency.

Make sure that nfs_readdir_lookup() handles negative dentries correctly.
If d_lookup() returns a negative dentry, then we need to d_drop() that
since readdir shows that it should be positive.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

commit ef75c7974b383769ae5741cf930b8aa4dcaef395
Author: Trond Myklebust <Trond.Myklebust@netapp.com>
Date:   Tue Jan 16 10:09:44 2007 -0500

NFS: Also use readdir info to revalidate positive dentries

If the fileid of the cached dentry fails to match that returned by
the readdir call, then we should also d_drop. Try to take into account the
fact that on NFSv4, readdir may return the "mounted_on_fileid" by looking
for submounts.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
commit faebf4e2bb0efad9dda396ea13d5c6ad15d7d7fb
Author: Trond Myklebust <Trond.Myklebust@netapp.com>
Date:   Sat Jan 13 02:28:11 2007 -0500

NFSv4: Don't require that NFSv4 mount paths begin with '/'

Addresses the regression noted in

Also mark a couple of other regressions as requiring fixing.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

commit 60fa3f769f7651a60125a0f44e3ffe3246d7cf39
Author: Trond Myklebust <Trond.Myklebust@netapp.com>
Date:   Sat Apr 14 19:11:52 2007 -0400

NFS: Fix two bugs in the O_DIRECT write code

Do not flag an error if the COMMIT call fails and we decide to resend the
writes. Let the resend flag the error if it fails.

If a write has failed, then nfs_direct_write_result should not attempt to
send a commit. It should just exit asap and return the error to the user.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
---commit 749e146e01cf87ce3c1d6f6077b877471b04df5b
Author: Chuck Lever <chuck.lever@oracle.com>
Date:   Sat May 19 17:22:46 2007 -0400

NFS: Fix handful of compiler warnings in direct.c

This patch fixes a couple of signage issues that were causing an Oops
when running the LTP diotest4 test. get_user_pages() returns a signed
error, hence we need to be careful when comparing with the unsigned
number of pages from data->npages.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

commit d4a8f3677fe2c2fc86443254fe42825e244c194d
Author: Trond Myklebust <Trond.Myklebust@netapp.com>
Date:   Tue May 22 10:22:27 2007 -0400

NFS: Fix nfs_direct_dirty_pages()

We only need to dirty the pages that were actually read in.

Also convert nfs_direct_dirty_pages() to call set_page_dirty() instead of
set_page_dirty_lock(). A call to lock_page() is unacceptable in an rpciod
callback function.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
commit b4946ffb1860597b187d78d61ac6504177eb0ff8
Author: Trond Myklebust <Trond.Myklebust@netapp.com>
Date:   Wed May 30 12:58:00 2007 -0400

NFS: Fix a refcount leakage in O_DIRECT

The current code is leaking a reference to dreq->kref when the calls to
nfs_direct_read_schedule() and nfs_direct_write_schedule() return an
This patch moves the call to kref_put() from nfs_direct_wait() back into
nfs_direct_read() and nfs_direct_write() (which are the functions that
actually took the reference in the first place) fixing the leak.

Thanks to Denis V. Lunev for spotting the bug and proposing the original

Acked-by: Denis V. Lunev <dlunev@gmail.com>
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

Comment 1 Steve Dickson 2007-06-06 19:07:05 UTC
Created attachment 156380 [details]
he back ported jumbo patch.

Comment 2 RHEL Product and Program Management 2007-06-06 19:08:54 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

Comment 3 Don Zickus 2007-06-16 00:35:45 UTC
in 2.6.18-27.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Comment 4 Jeff Layton 2007-06-19 14:51:49 UTC
*** Bug 244238 has been marked as a duplicate of this bug. ***

Comment 8 errata-xmlrpc 2007-11-07 19:51:53 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 the 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.


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