Re: Top 10 kernel oopses for the week ending January 12th, 2008

From: Jiri Kosina
Date: Tue Jan 15 2008 - 05:36:46 EST


On Sun, 13 Jan 2008, Adrian Bunk wrote:

> > Rank 1: implement (hid code)
> > WARN_ON at drivers/hid/hid-core.c:784
> > Reported 23 times (39 total reports)
> > This appears to be the kernel doing a WARN_ON based on unexpected ioctl() arguments
> > More info: http://www.kerneloops.org/search.php?search=implement
> >...
> The only complete bug reports seems to be from one user who loaded a
> module whose distribution might be considered a criminal act in some
> countries.

The most usual case is hid2hci utility, that tries to switch modes on
Bluetooth HID peripherials (via hiddev). When these "switching" packets
are not compliant with HID report descriptor of the device, this WARN_ON()
happens.

Unfortunately there is no standard specifying how these packets should
look like, so it is guess-game and some rev-eng, that Marcel has put into
hid2hci for individual vendors, and sometimes this just happens not to
work.

I have had the commit below queued in my tree for 2.6.25 for quite some
time

commit dbacd67dc33f7b0d5fe64323668cf266d18f4b3f
Author: Jiri Kosina <jkosina@xxxxxxx>
Date: Fri Nov 30 11:12:58 2007 +0100

HID: remove redundant WARN_ON()s in order not to scare users

The WARN_ON() in implement() and extract() spit out stacktraces and
a lot of other information that might make users think that there is
something seriously wrong with the system. WARN_ON() should not be
deliberately triggerable by userspace application, which these can be.
Usually this WARN_ON() triggers when hid2hci utility is sending the
data that don't correspond to the device's report descriptor.

Convert these messages to more friendly printk().

--
Jiri Kosina
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/