<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 17: Check pointer handling of the Xbox controller device driver</title><link>https://sourceforge.net/p/xbox-linux/bugs/17/</link><description>Recent changes to 17: Check pointer handling of the Xbox controller device driver</description><atom:link href="https://sourceforge.net/p/xbox-linux/bugs/17/feed.rss" rel="self"/><language>en</language><lastBuildDate>Tue, 30 Oct 2007 08:48:26 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/xbox-linux/bugs/17/feed.rss" rel="self" type="application/rss+xml"/><item><title>Check pointer handling of the Xbox controller device driver</title><link>https://sourceforge.net/p/xbox-linux/bugs/17/</link><description>I have tried out the Xbox input device driver for Linux v0.1.7. I get unpleasant results.
http://xbox-linux.cvs.sourceforge.net/xbox-linux/kernel-2.6/drivers/usb/input/xpad.c?revision=1.34&amp;view=markup

What is really wrong in the following situation?

Excerpt from the boot log \(dmesg\):
"Linux version 2.6.23.1-default \(root@Sonne\) \(gcc version 4.2.1 \(SUSE Linux\)\) \#4 SMP PREEMPT Tue Oct 23 20:41:32 CEST 2007
...
input: Microsoft Xbox 360 Controller as
/devices/pci0000:00/0000:00:0b.0/usb2/2-2/2-2:1.0/input/input3
input: Microsoft Xbox 360 Controller as
/devices/pci0000:00/0000:00:0b.0/usb2/2-2/2-2:1.1/input/input4
input: Microsoft Xbox 360 Controller as
/devices/pci0000:00/0000:00:0b.0/usb2/2-2/2-2:1.2/input/input5
Unable to handle kernel NULL pointer dereference at 0000000000000006 RIP:
\[&amp;lt;ffffffff880f8ae9&amp;gt;\] :xpad:xpad\_probe+0x378/0x4a3
PGD 7d005067 PUD 7d004067 PMD 0
Oops: 0000 \[1\] PREEMPT SMP
CPU 0
Modules linked in: rtc\_core soundcore xpad rtc\_lib snd\_page\_alloc floppy
sg linear ohci\_hcd ehci\_hcd usbcore edd dm\_mod ext3 mbcache jbd fan
sata\_sil24 sata\_nv pata\_amd libata thermal processor
Pid: 1410, comm: modprobe Not tainted 2.6.23.1-default \#4
RIP: 0010:\[&amp;lt;ffffffff880f8ae9&amp;gt;\]  \[&amp;lt;ffffffff880f8ae9&amp;gt;\]
:xpad:xpad\_probe+0x378/0x4a3
RSP: 0018:ffff81007d8f1cd8  EFLAGS: 00010216
RAX: 0000000000000000 RBX: ffff81007c661da8 RCX: ffff81007cfb1080
RDX: 0000000000000200 RSI: ffff81007c661c00 RDI: 000000000000000e
RBP: ffff81007c035000 R08: 0000000000000017 R09: ffff81007c661dba
R10: 0000000000000041 R11: ffffc20000aceeb0 R12: ffff81007c661d80
R13: ffff81007c944800 R14: 0000000000000006 R15: ffff810037df5800
FS:  00002ad16eb0c6f0\(0000\) GS:ffffffff8050d000\(0000\) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000006 CR3: 000000007d002000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process modprobe \(pid: 1410, threadinfo ffff81007d8f0000, task
ffff810037e220c0\)
Stack:  000000000000001b ffffffff802d159e ffff81007c420fa8 ffffffff880a0e5d
ffffffff880fa910 ffff810037df5800 ffffffff880fa740 ffffffff880fa7a8
ffffffff880fa7a8 ffffc20000aceeb0 000000000000001b ffffffff880a1b46
Call Trace:
\[&amp;lt;ffffffff802d159e&amp;gt;\] sysfs\_create\_link+0x10b/0x165
\[&amp;lt;ffffffff880a0e5d&amp;gt;\] :usbcore:usb\_match\_one\_id+0x26/0x82
\[&amp;lt;ffffffff880a1b46&amp;gt;\] :usbcore:usb\_probe\_interface+0x89/0xb8
\[&amp;lt;ffffffff8036f667&amp;gt;\] driver\_probe\_device+0xd3/0x150
\[&amp;lt;ffffffff8036f786&amp;gt;\] \_\_driver\_attach+0x0/0x93
\[&amp;lt;ffffffff8036f7e0&amp;gt;\] \_\_driver\_attach+0x5a/0x93
\[&amp;lt;ffffffff8036eae1&amp;gt;\] bus\_for\_each\_dev+0x43/0x6e
\[&amp;lt;ffffffff8036ee09&amp;gt;\] bus\_add\_driver+0x7d/0x19b
\[&amp;lt;ffffffff8022c17c&amp;gt;\] default\_wake\_function+0x0/0xe
\[&amp;lt;ffffffff880a164d&amp;gt;\] :usbcore:usb\_register\_driver+0x85/0xe8
\[&amp;lt;ffffffff880c901b&amp;gt;\] :xpad:usb\_xpad\_init+0x1b/0x3a
\[&amp;lt;ffffffff80250a25&amp;gt;\] sys\_init\_module+0x1695/0x1782
\[&amp;lt;ffffffff8020bf9e&amp;gt;\] system\_call+0x7e/0x83


Code: 0f b6 78 06 0f b6 40 02 c7 46 08 00 00 00 00 c7 46 04 01 00
RIP  \[&amp;lt;ffffffff880f8ae9&amp;gt;\] :xpad:xpad\_probe+0x378/0x4a3
RSP &amp;lt;ffff81007d8f1cd8&amp;gt;
CR2: 0000000000000006
..."

Another try from the command line:
Sonne:~ \# modprobe --verbose xpad
insmod /lib/modules/2.6.23.1-default/kernel/drivers/input/joystick/xpad.ko
Killed

I get a little improvement despite of the reported crash. - The green LED around the big "X" button is not blinking any more.   ;-\)

How can this null pointer issue be fixed?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Markus Elfring</dc:creator><pubDate>Tue, 30 Oct 2007 08:48:26 -0000</pubDate><guid>https://sourceforge.net5345fa9ed8efc1078b8d6614aad4c9cb6461ff68</guid></item></channel></rss>