Re: [PATCH RFC 0/6] ALSA: Fix UAF with delayed kobj release

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

 



>
> And now looking back at kobj code and device code, they do refcount
> parent objects.  Maybe the problem is in our side -- the all devices
> are created with the original real device as the parent, including the
> card_dev, while there are some dependencies among children.  So, if we
> build up a proper tree, pci_dev -> card_dev -> ctl_dev, pcm_dev, etc,
> one of the problems could be solved.  It's more or less similar as
> what I suggested initially (referring card_dev at pcm), while changing
> the parent would make it implicitly.

Yes I think this would be the long term proper way to go, that way
parents just put children and remove their reference, then they
cleanup on their own time making everyone happy. My first patch was a
very lazy attempt that, if we wanted to do the right thing we would
obviously have to split the structs and free functions to operate in
their own release. If you have time feel free to take another swing at
the patches, otherwise I won't be able to start until next week.

Curtis



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux