Design constraints for per-client mempools

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

 



On Tue, Mar 01, 2016 at 11:53:12AM +0100, David Henningsson wrote:
> On 2016-03-01 11:25, Ahmed S. Darwish wrote:
> >On Tue, Feb 23, 2016 at 11:45:41AM +0200, Tanu Kaskinen wrote:
> >>On Tue, 2016-02-23 at 11:19 +0200, Tanu Kaskinen wrote:
> >>>
> >>>My first reaction is that why is the pstream object reference counted?
> >>>
> >
> >Seems this was just a regular convention rather than a conscious
> >design decision. This is evidenced by the fact of having only
> >__two__ pa_pstream_ref() calls in the entire tree. At pstream.c
> >do_pstream_read_write() and in the same file at srb_callback().
> >In both places they're just a ref/unref couple done at local
> >context.
> 
> I recently added the one in srb_callback for a good reason:
> 
> commit f277f2c5094fb32c5d879923960eb807b3b1c535
> Author: David Henningsson <david.henningsson at canonical.com>
> Date:   Fri Oct 16 22:12:32 2015 +0200
> 
>     pstream: Fix use-after-free in srb_callback
> 
> ...please make sure this bug does not reappear if you change things around
> :-)
>

Sure.

The pools will be reference counted, so hopefully no other code
paths will be affected -- including the pstream's ref/unref ones.

Thanks,

-- 
Darwish
http://darwish.chasingpointers.com


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux