|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] tmem: propagate ENOMEM result in error handling
commit 2cb8e71744b9c0e0663b8a0419606a73f01562e9
Author: Matthew Daley <mattd@xxxxxxxxxxx>
AuthorDate: Fri Apr 4 11:08:24 2014 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Apr 4 11:08:24 2014 +0200
tmem: propagate ENOMEM result in error handling
...otherwise if pcd_associate fails due to out-of-memory, the caller of
do_tmem_put will think the call was successful.
While at it, fix up the style issue.
Signed-off-by: Matthew Daley <mattd@xxxxxxxxxxx>
Reviewed-by: Bob Liu <bob.liu@xxxxxxxxxx>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
xen/common/tmem.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 342a6db..73007f7 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1646,8 +1646,11 @@ copy_uncompressed:
if ( tmem_dedup_enabled() && !is_persistent(pool) )
{
- if ( pcd_associate(pgp,NULL,0) == -ENOMEM )
+ if ( pcd_associate(pgp, NULL, 0) == -ENOMEM )
+ {
+ ret = -ENOMEM;
goto del_pgp_from_obj;
+ }
}
insert_page:
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |