kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Problem with error paths in various functions calling kvm_io_bus_unregister_dev
       [not found] <55CA0091.8090206@gmail.com>
@ 2015-08-12 13:11 ` Paolo Bonzini
  0 siblings, 0 replies; only message in thread
From: Paolo Bonzini @ 2015-08-12 13:11 UTC (permalink / raw)
  To: nick, gleb; +Cc: kvm, linux-kernel



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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-08-12 13:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <55CA0091.8090206@gmail.com>
2015-08-12 13:11 ` Problem with error paths in various functions calling kvm_io_bus_unregister_dev Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).