Documented in 1 files:
Defined in 1 files as a prototype:
Defined in 1 files as a function:
Referenced in 5 files:
- drivers/net/slip/slip.c, line 485
- drivers/tty/n_hdlc.c, line 598
- drivers/tty/n_tty.c
- drivers/tty/tty_ioctl.c
- drivers/tty/vt/keyboard.c, line 1494
Smatch caller information:
drivers/tty/vt/keyboard.c kbd_keycode() -> tty_chars_in_buffer()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | tty | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->driver_data | 1-u64max |
| BUF_SIZE | 0 | tty | (-1),1-s32max |
| BUF_SIZE | 0 | tty | (-1),1-s32max |
| DATA_SOURCE | 0 | tty | r tty_port_tty_get |
| BIT_INFO | 0 | tty->termios.c_lflag | 0x0,0xfffffff7 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | &dev->event_lock | ||
| LOCK2 | global &kbd_event_lock | ||
| LOCK2 | irq | ||
| LOCK2 | rcu_read | ||
| TYPE_LOCK | (struct input_dev)->event_lock |
drivers/tty/n_hdlc.c n_hdlc_tty_ioctl() -> tty_chars_in_buffer()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | tty | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc | 1-u64max |
| PARAM_VALUE | 0 | tty->ldisc_sem.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.next->next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.prev | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.prev->next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.prev->next->next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.prev->prev | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->chars_in_buffer | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->compat_ioctl | 0,1607379221601308672,5008286898947497984,6364353445524312064 |
| PARAM_VALUE | 0 | tty->ops->ioctl | 0,4096-ptr_max |
| CAPPED_DATA | 0 | tty | 1 |
| DATA_SOURCE | 0 | tty | $0 |
| LOCK2 | 0 | &tty->ldisc_sem | |
| TYPE_LOCK | (struct tty_struct)->ldisc_sem |
drivers/tty/tty_ioctl.c set_termios() -> tty_chars_in_buffer()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | tty | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->driver | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc | 1-u64max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.prev | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->termios_rwsem.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->handoff_set | 1 |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->list.next | 2212933610777083904 |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->list.prev | 2212933610777083904 |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | tty->termios_rwsem.wait_lock.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | tty->termios_rwsem.wait_lock.owner | (-1) |
| PARAM_VALUE | 0 | tty->termios_rwsem.wait_lock.owner_cpu | u32max |
| CAPPED_DATA | 0 | &tty->termios_rwsem | 1 |
| DATA_SOURCE | 0 | tty | $0 |
| LOCK2 | &tty->ldisc_sem | ||
| TYPE_LOCK | (struct tty_struct)->ldisc_sem |
drivers/tty/tty_ioctl.c set_termios() -> tty_chars_in_buffer()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | tty | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->driver | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc | 1-u64max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.prev | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->chars_in_buffer | 1-u64max |
| PARAM_VALUE | 0 | tty->termios_rwsem.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->handoff_set | 1 |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->list.next | 2212933610777083904 |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->list.prev | 2212933610777083904 |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | tty->termios_rwsem.wait_lock.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | tty->termios_rwsem.wait_lock.owner | (-1) |
| PARAM_VALUE | 0 | tty->termios_rwsem.wait_lock.owner_cpu | u32max |
| PARAM_VALUE | 0 | tty->write_wait.lock.rlock.dep_map->name | 0-255 |
| CAPPED_DATA | 0 | &tty->termios_rwsem | 1 |
| DATA_SOURCE | 0 | tty | $0 |
| TASK_NOT_RUNNING | |||
| LOCK2 | &tty->ldisc_sem | ||
| TYPE_LOCK | (struct tty_struct)->ldisc_sem |
drivers/tty/tty_ioctl.c set_termios() -> tty_chars_in_buffer()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | tty | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->driver | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc | 1-u64max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.prev | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->chars_in_buffer | 1-u64max |
| PARAM_VALUE | 0 | tty->termios_rwsem.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->handoff_set | 1 |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->list.next | 2212933610777083904 |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->list.prev | 2212933610777083904 |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | tty->termios_rwsem.wait_lock.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | tty->termios_rwsem.wait_lock.owner | (-1) |
| PARAM_VALUE | 0 | tty->termios_rwsem.wait_lock.owner_cpu | u32max |
| PARAM_VALUE | 0 | tty->write_wait.lock.rlock.dep_map->name | 0-255 |
| CAPPED_DATA | 0 | &tty->termios_rwsem | 1 |
| DATA_SOURCE | 0 | tty | $0 |
| TASK_NOT_RUNNING | |||
| LOCK2 | &tty->ldisc_sem | ||
| TYPE_LOCK | (struct tty_struct)->ldisc_sem |
drivers/tty/tty_ioctl.c set_termios() -> tty_chars_in_buffer()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | tty | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->driver | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc | 1-u64max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.prev | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->termios_rwsem.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->handoff_set | 1 |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->list.next | 2212933610777083904 |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->list.prev | 2212933610777083904 |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | tty->termios_rwsem.wait_lock.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | tty->termios_rwsem.wait_lock.owner | (-1) |
| PARAM_VALUE | 0 | tty->termios_rwsem.wait_lock.owner_cpu | u32max |
| CAPPED_DATA | 0 | &tty->termios_rwsem | 1 |
| DATA_SOURCE | 0 | tty | $0 |
| LOCK2 | &tty->ldisc_sem | ||
| LOCK2 | 0 | &tty->atomic_write_lock | |
| TYPE_LOCK | (struct tty_struct)->atomic_write_lock | ||
| TYPE_LOCK | (struct tty_struct)->ldisc_sem |
drivers/tty/tty_ioctl.c tty_wait_until_sent() -> tty_chars_in_buffer()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | tty->link->termios_rwsem.first_waiter->handoff_set | 0-1 |
| PARAM_VALUE | 0 | tty->link->termios_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | tty->ops->close | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->ldisc_ok | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->lookup | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->open | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->set_ldisc | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->set_termios | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->write | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->handoff_set | 0-1 |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->type | 0-1 |
| BUF_SIZE | 0 | tty | s32min,(-1),1-s32max |
| BUF_SIZE | 0 | tty | s32min,(-1),1-s32max |
| DATA_SOURCE | 0 | tty | $0 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | 0 | &tty->driver_data->d_lockref.lock | |
| HALF_LOCKED2 | 0 | &tty->legacy_mutex |
drivers/tty/tty_ioctl.c tty_wait_until_sent() -> tty_chars_in_buffer()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | tty | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->driver_data->port_lock.rlock.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | tty->driver_data->refcount.counter | 0-s32max |
| PARAM_VALUE | 0 | tty->driver_data->write_lock.rlock.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | tty->link->termios_rwsem.first_waiter->handoff_set | 0-1 |
| PARAM_VALUE | 0 | tty->link->termios_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | tty->ops | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->chars_in_buffer | 1-u64max |
| PARAM_VALUE | 0 | tty->ops->close | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->ldisc_ok | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->lookup | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->open | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->set_ldisc | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->set_termios | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->write | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->handoff_set | 0-1 |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | tty->write_wait.lock.rlock.dep_map->name | 0-255 |
| BUF_SIZE | 0 | tty | s32min,(-1),1-s32max |
| BUF_SIZE | 0 | tty | s32min,(-1),1-s32max |
| DATA_SOURCE | 0 | tty | $0 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | 0 | &tty->driver_data->d_lockref.lock | |
| HALF_LOCKED2 | 0 | &tty->legacy_mutex |
drivers/tty/tty_ioctl.c tty_wait_until_sent() -> tty_chars_in_buffer()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | tty | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->driver_data->port_lock.rlock.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | tty->driver_data->refcount.counter | 0-s32max |
| PARAM_VALUE | 0 | tty->driver_data->write_lock.rlock.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | tty->link->termios_rwsem.first_waiter->handoff_set | 0-1 |
| PARAM_VALUE | 0 | tty->link->termios_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | tty->ops | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->chars_in_buffer | 1-u64max |
| PARAM_VALUE | 0 | tty->ops->close | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->ldisc_ok | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->lookup | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->open | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->set_ldisc | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->set_termios | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->write | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->handoff_set | 0-1 |
| PARAM_VALUE | 0 | tty->termios_rwsem.first_waiter->type | 0-1 |
| PARAM_VALUE | 0 | tty->write_wait.lock.rlock.dep_map->name | 0-255 |
| BUF_SIZE | 0 | tty | s32min,(-1),1-s32max |
| BUF_SIZE | 0 | tty | s32min,(-1),1-s32max |
| DATA_SOURCE | 0 | tty | $0 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| HALF_LOCKED2 | 0 | &tty->driver_data->d_lockref.lock | |
| HALF_LOCKED2 | 0 | &tty->legacy_mutex |
drivers/net/slip/slip.c sl_tx_timeout() -> tty_chars_in_buffer()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | tty | 1-u64max |
| PREEMPT_ADD | <- disables preempt | ||
| TASK_NOT_RUNNING | |||
| LOCK2 | &sl->lock | ||
| HALF_LOCKED2 | &dev->tx_global_lock | ||
| TYPE_LOCK | (struct slip)->lock |
drivers/tty/n_tty.c n_tty_ioctl() -> tty_chars_in_buffer()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | tty | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc | 1-u64max |
| PARAM_VALUE | 0 | tty->ldisc_sem.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.next->next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.prev | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.prev->next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.prev->next->next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.prev->prev | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->chars_in_buffer | 0,4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->compat_ioctl | 0,1607379221601308672,5008286898947497984,6364353445524312064 |
| PARAM_VALUE | 0 | tty->ops->ioctl | 0,4096-ptr_max |
| CAPPED_DATA | 0 | tty | 1 |
| DATA_SOURCE | 0 | tty | $0 |
| LOCK2 | 0 | &tty->ldisc_sem | |
| TYPE_LOCK | (struct tty_struct)->ldisc_sem |
drivers/tty/n_tty.c n_tty_poll() -> tty_chars_in_buffer()
| Type | Parameter | Key | Value |
|---|---|---|---|
| PARAM_VALUE | 0 | tty | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->disc_data | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc | 1-u64max |
| PARAM_VALUE | 0 | tty->ldisc_sem.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.next->next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.prev | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.prev->next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.prev->next->next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ldisc_sem.read_wait.prev->prev | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->link | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->ops->write | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->port->buf.work.lockdep_map->name | 0-255 |
| PARAM_VALUE | 0 | tty->read_wait.head.next->next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->read_wait.head.next->prev | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->read_wait.head.prev->next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->read_wait.head.prev->next->next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->read_wait.lock.rlock.dep_map->name | 0-255 |
| PARAM_VALUE | 0 | tty->write_wait.head.next->next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->write_wait.head.next->prev | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->write_wait.head.prev->next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->write_wait.head.prev->next->next | 4096-ptr_max |
| PARAM_VALUE | 0 | tty->write_wait.lock.rlock.dep_map->name | 0-255 |
| DATA_SOURCE | 0 | tty | $0 |
| RX_PATH | |||
| TASK_NOT_RUNNING | |||
| LOCK2 | 0 | &tty->ldisc_sem | |
| HALF_LOCKED2 | &kvm->irq_srcu | ||
| HALF_LOCKED2 | &of->mutex | ||
| HALF_LOCKED2 | &vm->irqfds_lock | ||
| HALF_LOCKED2 | global &irqfds_srcu | ||
| TYPE_LOCK | (struct tty_struct)->ldisc_sem |