Skip to contentSkip to conversation

- usbserial: Adds missing checks and bug fix.

PATCH Superseded Luiz Fernando Capitulino 1 participant 1 message Nov 22, 2005

lore
Share & tools
lore
#0 lore raw

cover - usbserial: Adds missing checks and bug fix.

Greg,

I'm sending two patches for the usbserial NULL pointer dereference we
discussed last week:

http://marc.theaimsgroup.com/?l=linux-kernel&m=113216151918308&w=2

The first patch adds the missing checks you suggested we should use in
usb-serial driver's entry points, to avoid NULL pointer dereferences.

The second one is the same I've sent before, except that now I'm using
down() in serial_close() instead of down_interruptible() (as you also suggested). I didn't use down() in the first version because I don't wanted processes in a close() waiting for a open() too long. But Eduardo Habkost showed me it will not happen: the only possibility for a open() to sleep after the semaphore was acquired, is when 'open_count' equals 1, and there will be no close, since the port is being opened for the first time.

It's ok for a open() to wait a close().

Both patches were tested with a pl2303 device, running hundreds of my
test-case and using minicom in parallel.

Signature · 1 line
Luiz Fernando N. Capitulino