Bug 217993

Summary: blktap: Possible grant table leaks
Product: Red Hat Enterprise Linux 5 Reporter: Herbert Xu <herbert.xu>
Component: kernel-xenAssignee: Xen Maintainance List <xen-maint>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 5.0.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-01-26 20:55:32 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:

Description Herbert Xu 2006-12-01 05:18:03 UTC
We need changesets 11835-11837 from xen-unstable.

[BLKTAP]: Kill duplicate fast_flush_area call

The dispatch_rw_block_io may call fast_flush_area twice if
create_lookup_pte_addr fails (there is a flush call at fail_flush
already).  The second call simply causes warnings to be printed
on the console.  This patch removes the duplicate call.

Signed-off-by: Herbert Xu <herbert.org.au>

[BLKTAP]: Kill bogus fast_flush_area

The function dispatch_rw_block_io may call fast_flush_area even before a
pending request has been initialised.  This patch deletes that call.

Signed-off-by: Herbert Xu <herbert.org.au>

[BLKTAP]: Fix potential grant entry leaks on error

As it stands grant entries for the actual data are mapped in bulk.
If one of the earlier entries fail to be mapped, it can cause all
subsequent entries to be leaked if they were successfully mapped.

This patch changes it so that we will continue to reap grant entries
even when an error is detected.

There is still a potential leak if create_lookup_pte_addr fails
in fast_flush_area.  This leak is not affected by this patch.

Signed-off-by: Herbert Xu <herbert.org.au>

Comment 1 Jay Turner 2006-12-01 14:17:44 UTC
QE ack for RHEL5.

Comment 3 Don Zickus 2007-01-03 01:16:27 UTC
in 2.6.18-1.2943.el5

Comment 4 Jay Turner 2007-01-26 20:55:32 UTC
2.6.18-7.el5 included in 20070125.0.