35 lines
983 B
Diff
35 lines
983 B
Diff
|
# HG changeset patch
|
||
|
# User Jan Beulich <jbeulich@suse.com>
|
||
|
# Date 1347365906 -7200
|
||
|
# Node ID 109ea6a0c23aa0c5df79e3f5658162aed959ffcf
|
||
|
# Parent 83b97a59888b6d2d0f984b8403bd5764dd55c10c
|
||
|
tmem: properly drop lock on error path in do_tmem_op()
|
||
|
|
||
|
Reported-by: Tim Deegan <tim@xen.org>
|
||
|
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
||
|
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
|
||
|
|
||
|
--- a/xen/common/tmem.c
|
||
|
+++ b/xen/common/tmem.c
|
||
|
@@ -2659,13 +2659,19 @@ EXPORT long do_tmem_op(tmem_cli_op_t uop
|
||
|
if ( client != NULL && tmh_client_is_dying(client) )
|
||
|
{
|
||
|
rc = -ENODEV;
|
||
|
- goto out;
|
||
|
+ if ( tmh_lock_all )
|
||
|
+ goto out;
|
||
|
+ simple_error:
|
||
|
+ errored_tmem_ops++;
|
||
|
+ return rc;
|
||
|
}
|
||
|
|
||
|
if ( unlikely(tmh_get_tmemop_from_client(&op, uops) != 0) )
|
||
|
{
|
||
|
printk("tmem: can't get tmem struct from %s\n",client_str);
|
||
|
rc = -EFAULT;
|
||
|
+ if ( !tmh_lock_all )
|
||
|
+ goto simple_error;
|
||
|
goto out;
|
||
|
}
|
||
|
|