From 25d27eded1f4fc728e64f443adc339b5229be5d7 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 2 Nov 2009 09:35:44 +0100 Subject: control: use reference-counted pid Instead of storing the PID number, take a reference to the task's pid structure. This protects against duplicates due to PID overflows, and using pid_vnr() ensures that the PID returned by snd_ctl_elem_info() is correct as seen from the current namespace. Signed-off-by: Clemens Ladisch Signed-off-by: Takashi Iwai --- include/sound/control.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/sound/control.h') diff --git a/include/sound/control.h b/include/sound/control.h index 3517745d0a2d..112374dc0c58 100644 --- a/include/sound/control.h +++ b/include/sound/control.h @@ -86,10 +86,12 @@ struct snd_kctl_event { #define snd_kctl_event(n) list_entry(n, struct snd_kctl_event, list) +struct pid; + struct snd_ctl_file { struct list_head list; /* list of all control files */ struct snd_card *card; - pid_t pid; + struct pid *pid; int prefer_pcm_subdevice; int prefer_rawmidi_subdevice; wait_queue_head_t change_sleep; -- cgit