* [Bug 87554] [NV1A] 3.19-rc1 NULL dereference on modprobe in pramin_fini
[not found] ` <bug-87554-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
@ 2014-12-21 15:21 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-12-21 15:59 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2014-12-21 15:21 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 1757 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=87554
--- Comment #1 from Bruno <bonbons67-H4aWS73dXupiYsDpGMXq6A@public.gmane.org> ---
Matching objdump -d -S nouveau.ko:
000136c0 <pramin_fini>:
static void
pramin_fini(void *data)
{
136c0: 55 push %ebp
136c1: 89 e5 mov %esp,%ebp
136c3: 53 push %ebx
136c4: 89 c3 mov %eax,%ebx
static inline void
nv_wr32(void *obj, u32 addr, u32 data)
{
struct nouveau_subdev *subdev = nv_subdev(obj);
nv_spam(subdev, "nv_wr32 0x%06x 0x%08x\n", addr, data);
iowrite32_native(data, subdev->mmio + addr);
136c6: 8b 00 mov (%eax),%eax
136c8: 8b 50 24 mov 0x24(%eax),%edx
136cb: 8b 43 04 mov 0x4(%ebx),%eax
136ce: 81 c2 00 17 00 00 add $0x1700,%edx
136d4: e8 fc ff ff ff call 136d5 <pramin_fini+0x15>
struct priv *priv = data;
nv_wr32(priv->bios, 0x001700, priv->bar0);
kfree(priv);
136d9: 89 d8 mov %ebx,%eax
136db: e8 fc ff ff ff call 136dc <pramin_fini+0x1c>
}
136e0: 5b pop %ebx
136e1: 5d pop %ebp
136e2: c3 ret
136e3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
136e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
Source code:
static void
pramin_fini(void *data)
{
struct priv *priv = data;
nv_wr32(priv->bios, 0x001700, priv->bar0);
kfree(priv);
}
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2552 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 7+ messages in thread* [Bug 87554] [NV1A] 3.19-rc1 NULL dereference on modprobe in pramin_fini
[not found] ` <bug-87554-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
2014-12-21 15:21 ` [Bug 87554] " bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2014-12-21 15:59 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-12-21 22:07 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2014-12-21 15:59 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 1545 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=87554
--- Comment #2 from Bruno <bonbons67-H4aWS73dXupiYsDpGMXq6A@public.gmane.org> ---
Created attachment 111111
--> https://bugs.freedesktop.org/attachment.cgi?id=111111&action=edit
Consider ->init NULL return as a failure
Things are crashing because pramin_init returns NULL (and not a ERR_PTR).
Would the following change be a proper fix?:
static int
shadow_method(struct nouveau_bios *bios, struct shadow *mthd, const char
*name)
{
const struct nvbios_source *func = mthd->func;
if (func->name) {
nv_debug(bios, "trying %s...\n", name ? name : func->name);
if (func->init) {
mthd->data = func->init(bios, name);
if (IS_ERR(mthd->data)) {
mthd->data = NULL;
return 0;
+ } else if (!mthd->data) {
+ return 0;
}
}
mthd->score = shadow_score(bios, mthd);
if (func->fini)
func->fini(mthd->data);
nv_debug(bios, "scored %d\n", mthd->score);
mthd->data = bios->data;
mthd->size = bios->size;
bios->data = NULL;
bios->size = 0;
}
return mthd->score;
}
If so, please apply attached patch.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2647 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 7+ messages in thread* [Bug 87554] [NV1A] 3.19-rc1 NULL dereference on modprobe in pramin_fini
[not found] ` <bug-87554-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
2014-12-21 15:21 ` [Bug 87554] " bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-12-21 15:59 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2014-12-21 22:07 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-12-22 6:15 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2014-12-21 22:07 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 312 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=87554
--- Comment #3 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> ---
http://cgit.freedesktop.org/~darktama/nouveau/commit/?id=b19dbc526bb963670dafc86da92d9fa2755b1997
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1182 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 7+ messages in thread* [Bug 87554] [NV1A] 3.19-rc1 NULL dereference on modprobe in pramin_fini
[not found] ` <bug-87554-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
` (2 preceding siblings ...)
2014-12-21 22:07 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2014-12-22 6:15 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-12-23 16:18 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2015-10-22 5:08 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
5 siblings, 0 replies; 7+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2014-12-22 6:15 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 579 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=87554
Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rjgleits-Bdlq13kUjeyLZ21kGMrzwg@public.gmane.org
--- Comment #4 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> ---
*** Bug 87576 has been marked as a duplicate of this bug. ***
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1993 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 7+ messages in thread* [Bug 87554] [NV1A] 3.19-rc1 NULL dereference on modprobe in pramin_fini
[not found] ` <bug-87554-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
` (3 preceding siblings ...)
2014-12-22 6:15 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2014-12-23 16:18 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2015-10-22 5:08 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
5 siblings, 0 replies; 7+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2014-12-23 16:18 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 290 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=87554
--- Comment #5 from Tobias Klausmann <tobias.klausmann-AqjdNwhu20eELgA04lAiVw@public.gmane.org> ---
*** Bug 87641 has been marked as a duplicate of this bug. ***
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1243 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 7+ messages in thread* [Bug 87554] [NV1A] 3.19-rc1 NULL dereference on modprobe in pramin_fini
[not found] ` <bug-87554-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
` (4 preceding siblings ...)
2014-12-23 16:18 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2015-10-22 5:08 ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
5 siblings, 0 replies; 7+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2015-10-22 5:08 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 563 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=87554
Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> ---
Should be fixed in 3.19-final.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2002 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 7+ messages in thread