diff options
author | Dave Airlie <airlied@redhat.com> | 2020-03-12 12:42:41 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-03-12 12:42:56 +1000 |
commit | 9e12da086e5e38f7b4f8d6e02a82447f4165fbee (patch) | |
tree | 96e6029378ccb9ae3f9530d019c8216a3ca4a556 /drivers/gpu/drm/drm_scatter.c | |
parent | d3bd37f587b4438d47751d0f1d5aaae3d39bd416 (diff) | |
parent | bc1a4130fc0309cc2f43b9cc616ebbc295e886ff (diff) |
Merge tag 'drm-misc-next-2020-03-09' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for 5.7:
UAPI Changes:
Cross-subsystem Changes:
Core Changes:
Driver Changes:
- fb-helper: Remove drm_fb_helper_{add,add_all,remove}_one_connector
- fbdev: some cleanups and dead-code removal
- Conversions to simple-encoder
- zero-length array removal
- Panel: panel-dpi support in panel-simple, Novatek NT35510, Elida
KD35T133,
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20200309135439.dicfnbo4ikj4tkz7@gilmour
Diffstat (limited to 'drivers/gpu/drm/drm_scatter.c')
-rw-r--r-- | drivers/gpu/drm/drm_scatter.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_scatter.c b/drivers/gpu/drm/drm_scatter.c index d5c386154246..ca520028b2cb 100644 --- a/drivers/gpu/drm/drm_scatter.c +++ b/drivers/gpu/drm/drm_scatter.c @@ -99,6 +99,9 @@ int drm_legacy_sg_alloc(struct drm_device *dev, void *data, if (!drm_core_check_feature(dev, DRIVER_SG)) return -EOPNOTSUPP; + if (request->size > SIZE_MAX - PAGE_SIZE) + return -EINVAL; + if (dev->sg) return -EINVAL; |