From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org
Subject: [Bug 58087] [-next] nouveau corrupts kernel mm allocator
Date: Wed, 12 Dec 2012 21:14:33 +0000
Message-ID:
References:
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1312685936=="
Return-path:
In-Reply-To:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Sender: nouveau-bounces+gcfxn-nouveau=m.gmane.org-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Errors-To: nouveau-bounces+gcfxn-nouveau=m.gmane.org-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
List-Id: nouveau.vger.kernel.org
--===============1312685936==
Content-Type: multipart/alternative; boundary="1355346873.180DD6D31.17145"; charset="us-ascii"
--1355346873.180DD6D31.17145
Date: Wed, 12 Dec 2012 21:14:33 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
https://bugs.freedesktop.org/show_bug.cgi?id=58087
--- Comment #2 from Peter Hurley ---
(In reply to comment #1)
> Created attachment 71290 [details] [review]
> fix
- vm = *pvm = kzalloc(sizeof(*vm), GFP_KERNEL);
+ vm = kzalloc(sizeof(*vm), GFP_KERNEL);
How/why *not* setting cli->base.vm to NULL fixes this?
Also, this assignment idiom is common in the nouveau driver code. Is the above
fix just one of many necessary?
core/subdev/vm/base.c: vm = *pvm = kzalloc(sizeof(*vm), GFP_KERNEL);
core/core/object.c: object = *pobject = kzalloc(size, GFP_KERNEL);
core/core/ramht.c: co = ho = nouveau_ramht_hash(ramht, chid, handle);
core/core/handle.c: handle = *phandle = kzalloc(sizeof(*handle),
GFP_KERNEL);
nouveau_abi16.c: cli->abi16 = abi16 = kzalloc(sizeof(*abi16),
GFP_KERNEL);
nouveau_bo.c: struct nouveau_channel *chan = chan = drm->channel; /*
COMMENT: THIS ONE IS INTERESTING */
nouveau_chan.c: chan = *pchan = kzalloc(sizeof(*chan), GFP_KERNEL);
nouveau_display.c: disp = drm->display = kzalloc(sizeof(*disp), GFP_KERNEL);
nouveau_pm.c: pm = drm->pm = kzalloc(sizeof(*pm), GFP_KERNEL);
nv04_fence.c: priv = drm->fence = kzalloc(sizeof(*priv), GFP_KERNEL);
nv10_fence.c: fctx = chan->fence = kzalloc(sizeof(*fctx), GFP_KERNEL);
nv10_fence.c: priv = drm->fence = kzalloc(sizeof(*priv), GFP_KERNEL);
nv50_fence.c: fctx = chan->fence = kzalloc(sizeof(*fctx), GFP_KERNEL);
nv50_fence.c: priv = drm->fence = kzalloc(sizeof(*priv), GFP_KERNEL);
nv84_fence.c: fctx = chan->fence = kzalloc(sizeof(*fctx), GFP_KERNEL);
nv84_fence.c: priv = drm->fence = kzalloc(sizeof(*priv), GFP_KERNEL);
nvc0_fence.c: fctx = chan->fence = kzalloc(sizeof(*fctx), GFP_KERNEL);
nvc0_fence.c: priv = drm->fence = kzalloc(sizeof(*priv), GFP_KERNEL);
--
You are receiving this mail because:
You are the assignee for the bug.
--1355346873.180DD6D31.17145
Date: Wed, 12 Dec 2012 21:14:33 +0000
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"
Comment # 2
on bug 58087
from Peter Hurley
(In reply to comment #1)
> Created attachment 71290 [details] [review] [review]
> fix
- vm = *pvm = kzalloc(sizeof(*vm), GFP_KERNEL);
+ vm = kzalloc(sizeof(*vm), GFP_KERNEL);
How/why *not* setting cli->base.vm to NULL fixes this?
Also, this assignment idiom is common in the nouveau driver code. Is the above
fix just one of many necessary?
core/subdev/vm/base.c: vm = *pvm = kzalloc(sizeof(*vm), GFP_KERNEL);
core/core/object.c: object = *pobject = kzalloc(size, GFP_KERNEL);
core/core/ramht.c: co = ho = nouveau_ramht_hash(ramht, chid, handle);
core/core/handle.c: handle = *phandle = kzalloc(sizeof(*handle),
GFP_KERNEL);
nouveau_abi16.c: cli->abi16 = abi16 = kzalloc(sizeof(*abi16),
GFP_KERNEL);
nouveau_bo.c: struct nouveau_channel *chan = chan = drm->channel; /*
COMMENT: THIS ONE IS INTERESTING */
nouveau_chan.c: chan = *pchan = kzalloc(sizeof(*chan), GFP_KERNEL);
nouveau_display.c: disp = drm->display = kzalloc(sizeof(*disp), GFP_KERNEL);
nouveau_pm.c: pm = drm->pm = kzalloc(sizeof(*pm), GFP_KERNEL);
nv04_fence.c: priv = drm->fence = kzalloc(sizeof(*priv), GFP_KERNEL);
nv10_fence.c: fctx = chan->fence = kzalloc(sizeof(*fctx), GFP_KERNEL);
nv10_fence.c: priv = drm->fence = kzalloc(sizeof(*priv), GFP_KERNEL);
nv50_fence.c: fctx = chan->fence = kzalloc(sizeof(*fctx), GFP_KERNEL);
nv50_fence.c: priv = drm->fence = kzalloc(sizeof(*priv), GFP_KERNEL);
nv84_fence.c: fctx = chan->fence = kzalloc(sizeof(*fctx), GFP_KERNEL);
nv84_fence.c: priv = drm->fence = kzalloc(sizeof(*priv), GFP_KERNEL);
nvc0_fence.c: fctx = chan->fence = kzalloc(sizeof(*fctx), GFP_KERNEL);
nvc0_fence.c: priv = drm->fence = kzalloc(sizeof(*priv), GFP_KERNEL);
You are receiving this mail because:
- You are the assignee for the bug.
--1355346873.180DD6D31.17145--
--===============1312685936==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
--===============1312685936==--