From 2ec961c23a8b216fee2006bd5d6c81e7ca90ee9b Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 17 Aug 2009 12:28:09 +0200 Subject: [PATCH] --- yaml --- r: 157752 b: refs/heads/master c: 18dd0aa5afea7dc33953aa87de696e39074bbf78 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/core/control.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 6196102f40cf..5e5dc6ee5122 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f217ac59b6dd73105abc13da3fe656391fa6d135 +refs/heads/master: 18dd0aa5afea7dc33953aa87de696e39074bbf78 diff --git a/trunk/sound/core/control.c b/trunk/sound/core/control.c index bc64b723415b..a8b7fabe645e 100644 --- a/trunk/sound/core/control.c +++ b/trunk/sound/core/control.c @@ -436,6 +436,10 @@ static int snd_ctl_remove_user_ctl(struct snd_ctl_file * file, ret = -ENOENT; goto error; } + if (!(kctl->vd[0].access & SNDRV_CTL_ELEM_ACCESS_USER)) { + ret = -EINVAL; + goto error; + } for (idx = 0; idx < kctl->count; idx++) if (kctl->vd[idx].owner != NULL && kctl->vd[idx].owner != file) { ret = -EBUSY;