Kernel Bug Tracker – Bug 8005
a possible bug in "usb/gadget/inode.c"
Last modified: 2008-09-22 11:37:08 UTC
Most recent kernel where this bug did *NOT* occur: no
Problem Description: If take a look at the code at lines 399-428 and lines
443-473 in "drivers/usb/gadget/inode.c", one can see the two pieces of code are
similar, although one is for "read" and the other is for "write". However, the
two "if" conditions at line 399 and 443 are complementing each other; it seems
that one of them is doing a "wrong" direction.
Also, line 460 may use a "unlikely", just like line 416, for a little better
Suggested fix: negate the condition at line 443; add "unlikely" at line 460.
Lingxiao, this is almost a policy to submit a patch when the code seems wrong, not to open a bugzilla :) Would you like to submit the patch to email@example.com?