Marcin Slusarz
2012-Nov-11 19:00 UTC
[Nouveau] [PATCH] drm/nouveau: fix crash with noaccel=1
Reported-by: Ortwin Gl?ck <odi at odi.ch> Signed-off-by: Marcin Slusarz <marcin.slusarz at gmail.com> --- drivers/gpu/drm/nouveau/nouveau_abi16.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c index cc79c79..cbf1fc6 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c @@ -241,6 +241,10 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS) if (unlikely(!abi16)) return -ENOMEM; + + if (!drm->channel) + return nouveau_abi16_put(abi16, -ENODEV); + client = nv_client(abi16->client); if (init->fb_ctxdma_handle == ~0 || init->tt_ctxdma_handle == ~0) -- 1.7.12
Ortwin Glück
2012-Nov-12 18:12 UTC
[Nouveau] [PATCH] drm/nouveau: fix crash with noaccel=1
I am confirming that it fixes the problem. Thanks! Ortwin On 11.11.2012 20:00, Marcin Slusarz wrote:> > Reported-by: Ortwin Gl?ck <odi at odi.ch> > Signed-off-by: Marcin Slusarz <marcin.slusarz at gmail.com> > --- > drivers/gpu/drm/nouveau/nouveau_abi16.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c > index cc79c79..cbf1fc6 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c > +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c > @@ -241,6 +241,10 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS) > > if (unlikely(!abi16)) > return -ENOMEM; > + > + if (!drm->channel) > + return nouveau_abi16_put(abi16, -ENODEV); > + > client = nv_client(abi16->client); > > if (init->fb_ctxdma_handle == ~0 || init->tt_ctxdma_handle == ~0) >