1. Nov 12, 2009
  2. Nov 11, 2009
  3. Nov 10, 2009
    • Clemens Ladisch's avatar
      sound: rawmidi: fix MIDI device O_APPEND error handling · b7fe750f
      Clemens Ladisch authored
      Commit 9a1b64ca
      
       in 2.6.30 broke the
      error handling code in rawmidi_open_priv().
      
      If only the output substream of a RawMIDI device has been opened and
      if this device is then opened with O_RDWR | O_APPEND and if the
      initialization of the input substream fails (either because of low
      memory or because the device driver's open callback fails), then the
      runtime structure of the already open output substream will be freed
      and all following writes through the first handle will cause
      snd_rawmidi_write() to use the NULL runtime pointer.
      
      Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b7fe750f