Commit 587107b6 authored by Ben Skeggs's avatar Ben Skeggs

drm/nvc0: reject the notifier_alloc ioctl

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 99805566
...@@ -164,10 +164,15 @@ int ...@@ -164,10 +164,15 @@ int
nouveau_ioctl_notifier_alloc(struct drm_device *dev, void *data, nouveau_ioctl_notifier_alloc(struct drm_device *dev, void *data,
struct drm_file *file_priv) struct drm_file *file_priv)
{ {
struct drm_nouveau_private *dev_priv = dev->dev_private;
struct drm_nouveau_notifierobj_alloc *na = data; struct drm_nouveau_notifierobj_alloc *na = data;
struct nouveau_channel *chan; struct nouveau_channel *chan;
int ret; int ret;
/* completely unnecessary for these chipsets... */
if (unlikely(dev_priv->card_type >= NV_C0))
return -EINVAL;
chan = nouveau_channel_get(dev, file_priv, na->channel); chan = nouveau_channel_get(dev, file_priv, na->channel);
if (IS_ERR(chan)) if (IS_ERR(chan))
return PTR_ERR(chan); return PTR_ERR(chan);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment