• T
    ALSA: info: Return error for invalid read/write · 6809cd68
    Takashi Iwai 提交于
    Currently the ALSA proc handler allows read or write even if the proc
    file were write-only or read-only.  It's mostly harmless, does thing
    but allocating memory and ignores the input/output.  But it doesn't
    tell user about the invalid use, and it's confusing and inconsistent
    in comparison with other proc files.
    
    This patch adds some sanity checks and let the proc handler returning
    an -EIO error when the invalid read/write is performed.
    
    Cc: <stable@vger.kernel.org> # v4.2+
    Signed-off-by: NTakashi Iwai <tiwai@suse.de>
    6809cd68
info.c 19.6 KB