diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2016-08-31 22:58:42 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-08-31 16:17:15 +0200 |
commit | 6b1ca4bcadf9ef077cc5f03c6822ba276ed14902 (patch) | |
tree | 9f30fa84c9ce173059e7250cba2722a3e763b159 /sound/firewire/fireworks/fireworks.h | |
parent | 04b2d9c9c319277ad4fbbb71855c256a9f4d5f98 (diff) | |
download | lwn-6b1ca4bcadf9ef077cc5f03c6822ba276ed14902.tar.gz lwn-6b1ca4bcadf9ef077cc5f03c6822ba276ed14902.zip |
ALSA: fireworks: accessing to user space outside spinlock
In hwdep interface of fireworks driver, accessing to user space is in a
critical section with disabled local interrupt. Depending on architecture,
accessing to user space can cause page fault exception. Then local
processor stores machine status and handles the synchronous event. A
handler corresponding to the event can call task scheduler to wait for
preparing pages. In a case of usage of single core processor, the state to
disable local interrupt is worse because it don't handle usual interrupts
from hardware.
This commit fixes this bug, performing the accessing outside spinlock. This
commit also gives up counting the number of queued response messages to
simplify ring-buffer management.
Reported-by: Vaishali Thakkar <vaishali.thakkar@oracle.com>
Cc: stable@vger.kernel.org
Fixes: 555e8a8f7f14('ALSA: fireworks: Add command/response functionality into hwdep interface')
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/fireworks/fireworks.h')
-rw-r--r-- | sound/firewire/fireworks/fireworks.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/sound/firewire/fireworks/fireworks.h b/sound/firewire/fireworks/fireworks.h index 03ed35237e2b..d73c12b8753d 100644 --- a/sound/firewire/fireworks/fireworks.h +++ b/sound/firewire/fireworks/fireworks.h @@ -108,7 +108,6 @@ struct snd_efw { u8 *resp_buf; u8 *pull_ptr; u8 *push_ptr; - unsigned int resp_queues; }; int snd_efw_transaction_cmd(struct fw_unit *unit, |