Re: [PATCH 3/3] msi: free msi_desc entry only after we've released the kobject

2013-09-25 Thread Veaceslav Falico
On Wed, Sep 25, 2013 at 03:34:58PM -0600, Bjorn Helgaas wrote: On Mon, Sep 16, 2013 at 7:47 PM, Veaceslav Falico wrote: Currently, we first do kobject_put(&entry->kobj) and the kfree(entry), however kobject_put() doesn't guarantee us that it was the last reference and that the kobj isn't used c

Re: [PATCH 3/3] msi: free msi_desc entry only after we've released the kobject

2013-09-25 Thread Bjorn Helgaas
On Mon, Sep 16, 2013 at 7:47 PM, Veaceslav Falico wrote: > Currently, we first do kobject_put(&entry->kobj) and the kfree(entry), > however kobject_put() doesn't guarantee us that it was the last reference > and that the kobj isn't used currently by someone else, so after we > kfree(entry) with th

[PATCH 3/3] msi: free msi_desc entry only after we've released the kobject

2013-09-16 Thread Veaceslav Falico
Currently, we first do kobject_put(&entry->kobj) and the kfree(entry), however kobject_put() doesn't guarantee us that it was the last reference and that the kobj isn't used currently by someone else, so after we kfree(entry) with the struct kobject - other users will begin using the freed memory,