diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-01-29 10:40:41 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2020-01-29 10:57:16 +0100 |
commit | 51c493fdf0ee04da0eb1d077f0f89bb470645f68 (patch) | |
tree | db7a6e60a4841f8f149eced48c17f7b18b085966 /fs/aio.c | |
parent | 141714cc1faf875442fd01b27308dc36ec9b3265 (diff) |
UPSTREAM: ALSA: pcm: Add missing copy ops check before clearing buffer
[ this is a fix specific to 4.4.y and 4.9.y stable trees;
4.14.y and older already contain the right fix ]
The stable 4.4.y and 4.9.y backports of the upstream commit
add9d56d7b37 ("ALSA: pcm: Avoid possible info leaks from PCM stream
buffers") dropped the check of substream->ops->copy_user as copy_user
is a new member that isn't present in the older kernels.
Although upstream drivers should work without this NULL check, it may
cause a regression with a downstream driver that sets some
inaccessible address to runtime->dma_area, leading to a crash at
worst.
Since such drivers must have ops->copy member on older kernels instead
of ops->copy_user, this patch adds the missing check of ops->copy for
fixing the regression.
Change-Id: Ib7b856364a75695268f2dfcf3315d92478508ada
Reported-and-tested-by: Andreas Schneider <asn@cryptomilk.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'fs/aio.c')
0 files changed, 0 insertions, 0 deletions