Re: [libvirt] [PATCH 7/7] util: Add safety net of checks to ensure valid object

2017-07-31 Thread John Ferlan
[...] > > I really don't think these changes are a positive move. > > If you have code that is passing in something that is not a valid object, > then silently doing nothing in virObjectRef / virObjectIsClass is not > going to make the code any more correct. In fact you're turning something >

Re: [libvirt] [PATCH 7/7] util: Add safety net of checks to ensure valid object

2017-07-31 Thread Daniel P. Berrange
On Fri, Jul 28, 2017 at 12:39:01PM -0400, John Ferlan wrote: > The virObject logic "assumes" that whatever is passed to its API's > would be some sort of virObjectPtr; however, if it is not then some > really bad things can happen. > > So far there's been only virObject{Ref|Unref},

Re: [libvirt] [PATCH 7/7] util: Add safety net of checks to ensure valid object

2017-07-28 Thread John Ferlan
On 07/28/2017 01:19 PM, Pavel Hrdina wrote: > On Fri, Jul 28, 2017 at 12:39:01PM -0400, John Ferlan wrote: >> The virObject logic "assumes" that whatever is passed to its API's >> would be some sort of virObjectPtr; however, if it is not then some >> really bad things can happen. >> >> So far

Re: [libvirt] [PATCH 7/7] util: Add safety net of checks to ensure valid object

2017-07-28 Thread Pavel Hrdina
On Fri, Jul 28, 2017 at 12:39:01PM -0400, John Ferlan wrote: > The virObject logic "assumes" that whatever is passed to its API's > would be some sort of virObjectPtr; however, if it is not then some > really bad things can happen. > > So far there's been only virObject{Ref|Unref},

[libvirt] [PATCH 7/7] util: Add safety net of checks to ensure valid object

2017-07-28 Thread John Ferlan
The virObject logic "assumes" that whatever is passed to its API's would be some sort of virObjectPtr; however, if it is not then some really bad things can happen. So far there's been only virObject{Ref|Unref}, virObject{Lock|Unlock}, and virObjectIsClass and the virObject and virObjectLockable