qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH RFC 0/3] error: allow local errors to trigger abort


From: Michael S. Tsirkin
Subject: [Qemu-devel] [PATCH RFC 0/3] error: allow local errors to trigger abort
Date: Tue, 16 Jun 2015 14:53:46 +0200

    
    It's a common idiom:
    
        Error *local_err = NULL;
        ....
        foo(&local_err);
        ...
        if (local_err) {
            error_propagate(errp, local_err);
            return;
        }
    
    Unfortunately it means that call to foo(&local_err) will
    not abort even if errp is set to error_abort.
    
    Instead, we get an abort at error_propagate which is too late.
    
    To fix, add an API to check errp and set local_err to error_abort
    if errp is error_abort.

Michael S. Tsirkin (3):
  error: don't rely on pointer comparisons
  error: allow local errors to trigger abort
  block/nfs: switch to error_init_local

 include/qapi/error.h |  5 +++++
 block/nfs.c          |  2 +-
 util/error.c         | 21 ++++++++++++++++-----
 3 files changed, 22 insertions(+), 6 deletions(-)

-- 
MST




reply via email to

[Prev in Thread] Current Thread [Next in Thread]