Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

drm/nvc0: reject the notifier_alloc ioctl



Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 99805566
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -164,10 +164,15 @@ int
nouveau_ioctl_notifier_alloc(struct drm_device *dev, void *data,
			     struct drm_file *file_priv)
{
	struct drm_nouveau_private *dev_priv = dev->dev_private;
	struct drm_nouveau_notifierobj_alloc *na = data;
	struct nouveau_channel *chan;
	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);
	if (IS_ERR(chan))
		return PTR_ERR(chan);