public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: nick <xerofoify@gmail.com>, gleb@kernel.org
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Problem with error paths in various functions calling kvm_io_bus_unregister_dev
Date: Wed, 12 Aug 2015 15:11:43 +0200	[thread overview]
Message-ID: <55CB460F.2000305@redhat.com> (raw)
In-Reply-To: <55CA0091.8090206@gmail.com>



On 11/08/2015 16:02, nick wrote:
> Our we to just assume
> that calls to kvm_io_bug_unregister_dev always succeed as I disagree due to
> it allocating memory in kernel space that can easily fail. In additon I
> was wondering how the maintainers would like me to handle these calls as
> it's difficult due to it already being in error paths. Further more below
> is a link to the files and how the calls to kvm_io_bus_register_dev are 
> executed in the respective error paths.
> http://lxr.free-electrons.com/ident?i=kvm_io_bus_unregister_dev

You're right; the fix is not simple.  The best way is to introduce a new
API to register or unregister multiple devices atomically.  This gets
rid of calls in the error paths.


Paolo

           reply	other threads:[~2015-08-12 13:11 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <55CA0091.8090206@gmail.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55CB460F.2000305@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=gleb@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xerofoify@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox