]> git.baikalelectronics.ru Git - kernel.git/commit
sound: rawmidi: fix double init when opening MIDI device with O_APPEND
authorClemens Ladisch <clemens@ladisch.de>
Wed, 21 Oct 2009 07:09:38 +0000 (09:09 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 10 Nov 2009 15:20:43 +0000 (16:20 +0100)
commitb179f1ec7f304cd6856f1b744b99c5bd2c3020d1
treea194af444f11846d078ca3fb87bdb61f5188464e
parentceedf3ea5d0dd4a11ef172092b76fde063bf7f5d
sound: rawmidi: fix double init when opening MIDI device with O_APPEND

Commit 3c4c7477def325abd54b15e2b08b3dac7bb8f5f4 in 2.6.30 moved the
substream initialization code to where it would be executed every time
the substream is opened.

This had the consequence that any further opening would drop and leak
the data in the existing buffer, and that the device driver's open
callback would be called multiple times, unexpectedly.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/rawmidi.c