Feature #3316
open
136: usb_deregister() should be called before usb_serial_deregister() when the device is plugged in
Added by Marina Makienko over 12 years ago.
Updated over 10 years ago.
Due date:
08/10/2012 (over 12 years late)
Description
If usb_deregister() is called after usb_serial_deregister() when the device is plugged in, the following Oops occurs.
Commit: 5742d35
- Status changed from New to Open
- % Done changed from 0 to 10
The error in the Linux kernel was detected in testing this model on the core. It is in the "include/linux/usb/serial.h"
#ifndef __LINUX_USB_SERIAL_H
#define __LINUX_USB_SERIAL_H
#include <linux/kref.h>
#include <linux/mutex.h>
#include <linux/sysrq.h>
#include <linux/kfifo.h>
#define SERIAL_TTY_MAJOR 188 /* Nice legal number now */
#define SERIAL_TTY_MINORS 254 /* loads of devices :) */
#define SERIAL_TTY_NO_MINOR 255 /* No minor was assigned */
struct usb_serial_port {
struct usb_serial *serial;
struct tty_port port;
...
}
The struct tty_port is used in this file but not declared.
If you add
#include <linux/tty.h>
in this file, everything works.
- Due date set to 08/10/2012
- Status changed from Open to Resolved
- % Done changed from 10 to 100
It looks that USB serial drivers don't object against including tty.h header file each time before including usb/serial.h. So most likely this isn't an error and may be treated as made by design. Although may be in future kernel developers will include tty.h inside usb/serial.h as a small optimization.
Marina Makienko wrote:
The error in the Linux kernel was detected in testing this model on the core. It is in the "include/linux/usb/serial.h"
[...]
The struct tty_port is used in this file but not declared.
If you add
#include <linux/tty.h>
in this file, everything works.
- Status changed from Resolved to Open
- Assignee deleted (
Marina Makienko)
- % Done changed from 100 to 70
Target commit (5742d35) is not found. Rerouter variant should be implemented and tested.
Also available in: Atom
PDF