diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-11-23 19:07:21 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-12-21 02:17:23 -0500 |
commit | 587107b690f567690982fb504047e7b0a6590344 (patch) | |
tree | 12c9bedb3edb38a498c0cf47a7da93594e2ba5ff /drivers/gpu/drm/nouveau/nouveau_notifier.c | |
parent | 99805566d93d69b7daf2373aba9fae52a62396f4 (diff) |
drm/nvc0: reject the notifier_alloc ioctl
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_notifier.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_notifier.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_notifier.c b/drivers/gpu/drm/nouveau/nouveau_notifier.c index a050b7b69782..fe29d604b820 100644 --- a/drivers/gpu/drm/nouveau/nouveau_notifier.c +++ b/drivers/gpu/drm/nouveau/nouveau_notifier.c | |||
@@ -164,10 +164,15 @@ int | |||
164 | nouveau_ioctl_notifier_alloc(struct drm_device *dev, void *data, | 164 | nouveau_ioctl_notifier_alloc(struct drm_device *dev, void *data, |
165 | struct drm_file *file_priv) | 165 | struct drm_file *file_priv) |
166 | { | 166 | { |
167 | struct drm_nouveau_private *dev_priv = dev->dev_private; | ||
167 | struct drm_nouveau_notifierobj_alloc *na = data; | 168 | struct drm_nouveau_notifierobj_alloc *na = data; |
168 | struct nouveau_channel *chan; | 169 | struct nouveau_channel *chan; |
169 | int ret; | 170 | int ret; |
170 | 171 | ||
172 | /* completely unnecessary for these chipsets... */ | ||
173 | if (unlikely(dev_priv->card_type >= NV_C0)) | ||
174 | return -EINVAL; | ||
175 | |||
171 | chan = nouveau_channel_get(dev, file_priv, na->channel); | 176 | chan = nouveau_channel_get(dev, file_priv, na->channel); |
172 | if (IS_ERR(chan)) | 177 | if (IS_ERR(chan)) |
173 | return PTR_ERR(chan); | 178 | return PTR_ERR(chan); |