[bug report] io_uring: add multishot mode for IORING_OP_POLL_ADD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Jens Axboe,

This is a semi-automatic email about new static checker warnings.

The patch e7bf437da251: "io_uring: add multishot mode for
IORING_OP_POLL_ADD" from Feb 22, 2021, leads to the following Smatch
complaint:

    fs/io_uring.c:5009 io_poll_double_wake()
    warn: variable dereferenced before check 'poll' (see line 5004)

fs/io_uring.c
  5003			return 0;
  5004		if (!(poll->events & EPOLLONESHOT))
                      ^^^^^^^^^^^^
Dereference

  5005			return poll->wait.func(&poll->wait, mode, sync, key);
  5006	
  5007		list_del_init(&wait->entry);
  5008	
  5009		if (poll && poll->head) {
                    ^^^^
Checked too late.

  5010			bool done;
  5011	

regards,
dan carpenter



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux