Bug 541956

Summary: kernel: sleeping vfs_check_frozen in called in atomic context from do_wp_page [rhel-5.5]
Product: Red Hat Enterprise Linux 5 Reporter: Pavel Emelyanov <xemul>
Component: kernelAssignee: Cong Wang <amwang>
Status: CLOSED ERRATA QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: high Docs Contact:
Priority: high    
Version: 5.5CC: amwang, bbraswel, cward, czhang, dhoward, dzickus, emcnabb, eteo, jarod, jpirko, jskrabal, lwang, moshiro, qcai, rkhan, tao, trevor.hemsley
Target Milestone: rcKeywords: Regression, ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-30 07:09:47 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: 548370    
Attachments:
Description Flags
Proposed fix none

Description Pavel Emelyanov 2009-11-27 17:26:38 UTC
The do_wp_page() takes the ptl_lock and then calls vfs_check_frozen() which may go to sleep if the bdev in question is frozen.

Introduced by linux-2.6-fs-generic-freeze-ioctl-interface.patch in 2.6.18-164.2.1 kernel.

Comment 1 Pavel Emelyanov 2009-11-27 17:29:45 UTC
Created attachment 374278 [details]
Proposed fix

The correct solution is to move the call to vfs_check_frozen from out of this lock all the more so two lines below we have proper unlock-lock-check_pte steps.

Comment 5 RHEL Program Management 2009-12-07 19:49:38 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 7 Qian Cai 2009-12-08 14:08:04 UTC
Is there anyone able to reproduce this?

Comment 8 Eugene Teo (Security Response) 2009-12-08 14:22:43 UTC
(In reply to comment #7)
> Is there anyone able to reproduce this?  

If there is a test kernel with this fix, I can try to get the reporter to test it for us (only if he is able to help us).

Comment 9 Pavel Emelyanov 2009-12-08 14:28:23 UTC
(In reply to comment #7)
> Is there anyone able to reproduce this?  

I'm able to do it and I actually did it when reported the problem.

(In reply to comment #8)
> If there is a test kernel with this fix, I can try to get the reporter to test
> it for us (only if he is able to help us).  

I built the kernel with the attached patch and checked that it helped.

Comment 15 Don Zickus 2009-12-09 18:12:32 UTC
in kernel-2.6.18-178.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Please update the appropriate value in the Verified field
(cf_verified) to indicate this fix has been successfully
verified. Include a comment with verification details.

Comment 18 Linda Wang 2009-12-10 17:22:33 UTC
*** Bug 539328 has been marked as a duplicate of this bug. ***

Comment 30 Trevor Hemsley 2009-12-24 16:22:45 UTC
There's quite a few people reporting this problem (or what is alleged to be this problem) on the CentOS bug tracker under bug #3869.

http://bugs.centos.org/view.php?id=3869

Comment 32 Chris Ward 2010-02-11 10:30:37 UTC
~~ Attention Customers and Partners - RHEL 5.5 Beta is now available on RHN ~~

RHEL 5.5 Beta has been released! There should be a fix present in this 
release that addresses your request. Please test and report back results 
here, by March 3rd 2010 (2010-03-03) or sooner.

Upon successful verification of this request, post your results and update 
the Verified field in Bugzilla with the appropriate value.

If you encounter any issues while testing, please describe them and set 
this bug into NEED_INFO. If you encounter new defects or have additional 
patch(es) to request for inclusion, please clone this bug per each request
and escalate through your support representative.

Comment 33 Pavel Emelyanov 2010-02-11 10:41:38 UTC
I checked the kernel. All works OK. Thanks.

Comment 36 errata-xmlrpc 2010-03-30 07:09:47 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-2010-0178.html