xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] grant table map error in __gnttab_map_grant_ref
@ 2012-02-06 12:20 Liuyongan
  2012-02-06 15:45 ` Andres Lagar-Cavilla
  0 siblings, 1 reply; 9+ messages in thread
From: Liuyongan @ 2012-02-06 12:20 UTC (permalink / raw)
  To: Andres Lagar-Cavilla
  Cc: Zhanghaoyu, xen-devel@lists.xensource.com, Qianhuibin,
	Jan Beulich, hanweidong

>> Date: Sat, 04 Feb 2012 02:43:05 +0000
>> From: Liuyongan <liuyongan@huawei.com>
>> To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
>> Cc: Wang Liang <hzwangliang.wang@huawei.com>,	Zhanghaoyu
>>	<haoyu.zhang@huawei.com>, Qianhuibin <qianhuibin@huawei.com>,
>>	hanweidong <hanweidong@huawei.com>
>> Subject: [Xen-devel] [PATCH] grant table map error in
>>	__gnttab_map_grant_ref
>> Message-ID:
>>	<E4ABEE53CC34664FA3F0BD8AEAF50A191CEFCDA6@szxeml534-mbx.china.huawei.com>
>>
>> Content-Type: text/plain; charset="utf-8"
>>
>>   In file grant_table.c function __gnttab_map_grant_ref, if
>> __get_paged_frame failed, the effect of _set_status  previously called
>> should be rollback, so the flag GTF_reading and _GTF_writing will be
>> recovered.
>> 
>> Signed-off-by: Haoyu Zhang<haoyu.zhang@huawei.com>; Liang
>> Wang<hzwangliang.wang@huawei.com>
>
> Hi,
> great fix! Would you mind submitting the same fix to the unstable tree?

  Feel free to use this patch.
> 
> Acked-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
 
   Well, I donot understand why contents" Message: 3, Message: 4, Message: 5" appear in your initial mail, Any special meaning?

^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <mailman.2630.1328327569.1471.xen-devel@lists.xensource.com>]
* [PATCH] grant table map error in __gnttab_map_grant_ref
@ 2012-02-04  2:43 Liuyongan
  2012-02-06  9:03 ` Jan Beulich
  0 siblings, 1 reply; 9+ messages in thread
From: Liuyongan @ 2012-02-04  2:43 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com
  Cc: Wang Liang, Zhanghaoyu, Qianhuibin, hanweidong

[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]

   In file grant_table.c function __gnttab_map_grant_ref, if __get_paged_frame failed, the effect of _set_status  previously called should be rollback, so the flag GTF_reading and _GTF_writing will be recovered. 
  

Signed-off-by: Haoyu Zhang<haoyu.zhang@huawei.com>; Liang Wang<hzwangliang.wang@huawei.com>

diff -r cbed91e1c878 xen-4.1.2/xen/common/grant_table.c
--- a/xen-4.1.2/xen/common/grant_table.c	Sat Feb 04 18:36:13 2012 +0800
+++ b/xen-4.1.2/xen/common/grant_table.c	Sat Feb 04 18:40:02 2012 +0800
@@ -566,7 +566,7 @@
             gfn = sha1 ? sha1->frame : sha2->full_page.frame;
             rc = __get_paged_frame(gfn, &frame, !!(op->flags & GNTMAP_readonly), rd);
             if ( rc != GNTST_okay )
-                goto unlock_out;
+                goto unlock_out_clear;
             act->gfn = gfn;
             act->domid = ld->domain_id;
             act->frame = frame;
@@ -721,7 +721,8 @@
     if ( op->flags & GNTMAP_host_map )
         act->pin -= (op->flags & GNTMAP_readonly) ?
             GNTPIN_hstr_inc : GNTPIN_hstw_inc;
-
+ 
+ unlock_out_clear:
     if ( !(op->flags & GNTMAP_readonly) &&
          !(act->pin & (GNTPIN_hstw_mask|GNTPIN_devw_mask)) )
         gnttab_clear_flag(_GTF_writing, status);




[-- Attachment #2: grant_table.diff --]
[-- Type: application/octet-stream, Size: 926 bytes --]

diff -r cbed91e1c878 xen-4.1.2/xen/common/grant_table.c
--- a/xen-4.1.2/xen/common/grant_table.c	Sat Feb 04 18:36:13 2012 +0800
+++ b/xen-4.1.2/xen/common/grant_table.c	Sat Feb 04 18:40:02 2012 +0800
@@ -566,7 +566,7 @@
             gfn = sha1 ? sha1->frame : sha2->full_page.frame;
             rc = __get_paged_frame(gfn, &frame, !!(op->flags & GNTMAP_readonly), rd);
             if ( rc != GNTST_okay )
-                goto unlock_out;
+                goto unlock_out_clear;
             act->gfn = gfn;
             act->domid = ld->domain_id;
             act->frame = frame;
@@ -721,7 +721,8 @@
     if ( op->flags & GNTMAP_host_map )
         act->pin -= (op->flags & GNTMAP_readonly) ?
             GNTPIN_hstr_inc : GNTPIN_hstw_inc;
-
+ 
+ unlock_out_clear:
     if ( !(op->flags & GNTMAP_readonly) &&
          !(act->pin & (GNTPIN_hstw_mask|GNTPIN_devw_mask)) )
         gnttab_clear_flag(_GTF_writing, status);

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-02-07  8:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-06 12:20 [PATCH] grant table map error in __gnttab_map_grant_ref Liuyongan
2012-02-06 15:45 ` Andres Lagar-Cavilla
     [not found] <mailman.2630.1328327569.1471.xen-devel@lists.xensource.com>
2012-02-04  4:58 ` Andres Lagar-Cavilla
  -- strict thread matches above, loose matches on Subject: below --
2012-02-04  2:43 Liuyongan
2012-02-06  9:03 ` Jan Beulich
2012-02-06 11:38   ` Liuyongan
2012-02-06 16:45     ` Jan Beulich
2012-02-07  3:53       ` Liuyongan
2012-02-07  8:36         ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).