All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: alsa-lib patches
@ 2005-05-15 14:57 Kevin F.Quinn
  2005-05-15 17:30 ` James Courtier-Dutton
  0 siblings, 1 reply; 10+ messages in thread
From: Kevin F.Quinn @ 2005-05-15 14:57 UTC (permalink / raw)
  To: alsa-devel

Clemens Ladisch wrote:
> Martin Stransky wrote:
> > About mixer patch - some user had a problem with ICH6 and this patch helped.
> >
> > +static snd_mixer_t *qsort_mixer;
>
> This will break with multithreading.
>
> > +static int compar(const void *a, const void *b) {
> > +       return qsort_mixer->compare(*(const snd_mixer_elem_t * const *) a,
> > +                                   *(const snd_mixer_elem_t * const *) b);
> > +}
>
> So the actual problem is that qsort() calls us with a pointer to a
> pointer to the mixer_elem_t, but the compare function takes a single
> pointer.
>
>
> If we don"t want to change the mixer API, we have to use some
> pthread_mutex to protext qsort_mixer.

Some of us have been watching this at Gentoo, as we agree the patch applied to remove the nested function in src/mixer/mixer.c is broken.

See https://bugs.gentoo.org/show_bug.cgi?id=82242 (skip straight to the end, comment #13) where the PaX team have supplied a patch that ought to work, along the lines of a change made to src/control/hcontrol.c over a year ago which fixed the same issue there.  Patch at https://bugs.gentoo.org/attachment.cgi?id=58918

Cheers,
Kev.




-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_ids93&alloc_id\x16281&op=click

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-05-17  9:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-15 14:57 alsa-lib patches Kevin F.Quinn
2005-05-15 17:30 ` James Courtier-Dutton
2005-05-15 17:21   ` Sergey Vlasov
2005-05-15 19:04     ` James Courtier-Dutton
2005-05-15 20:24     ` Kevin F.Quinn
2005-05-15 20:34       ` Lee Revell
2005-05-15 22:15         ` Kevin F.Quinn
2005-05-15 22:33           ` Lee Revell
2005-05-16  8:53       ` Sergey Vlasov
2005-05-17  9:35       ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.