tmem: properly drop lock on error path in do_tmem_op()
PATCH 8/11 tmem: properly drop lock on error path in do_tmem_op()
This is part of XSA-15 / CVE-2012-3497.
Reported-by Tim Deegan <[email protected]>
Signed-off-by Jan Beulich <[email protected]>
Acked-by Dan Magenheimer <[email protected]>
xen/common/tmem.c +7 -1
@@ -2659,13 +2659,19 @@ EXPORT long do_tmem_op(tmem_cli_op_t uopif ( 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; }
tmem: properly drop lock on error path in do_tmem_op()
This is part of XSA-15 / CVE-2012-3497.
Reported-by Tim Deegan <[email protected]>
Signed-off-by Jan Beulich <[email protected]>
Acked-by Dan Magenheimer <[email protected]>
xen/common/tmem.c +7 -1
@@ -2659,13 +2659,19 @@ EXPORT long do_tmem_op(tmem_cli_op_t uopif ( 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; }
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel