BCC: [email protected]
CC: [email protected]
CC: Ammar Faizi <[email protected]>
CC: "GNU/Weeb Mailing List" <[email protected]>
CC: [email protected]
TO: Dylan Yudaken <[email protected]>
CC: Jens Axboe <[email protected]>

tree:   https://github.com/ammarfaizi2/linux-block axboe/linux-block/for-next
head:   e64191f335e960a46b422bd7642bc4d5dffa805d
commit: 7723238b4361cc43fa91dfc09f7b9a0e1d2d7f6c [7/20] io_uring: signal 
registered eventfd to process deferred task work
:::::: branch date: 11 hours ago
:::::: commit date: 2 days ago
config: arm64-randconfig-c043-20220901 
(https://download.01.org/0day-ci/archive/20220903/[email protected]/config)
compiler: aarch64-linux-gcc (GCC) 12.1.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>
Reported-by: Julia Lawall <[email protected]>

cocci warnings: (new ones prefixed by >>)
>> io_uring/io_uring.c:499:5-24: atomic_dec_and_test variation before object 
>> free at line 501.

vim +499 io_uring/io_uring.c

0451894522108d fs/io_uring.c       Pavel Begunkov 2020-05-26  485  
7723238b4361cc io_uring/io_uring.c Dylan Yudaken  2022-08-30  486  
7723238b4361cc io_uring/io_uring.c Dylan Yudaken  2022-08-30  487  static void 
io_eventfd_ops(struct rcu_head *rcu)
e971db8da1ccbb io_uring/io_uring.c Dylan Yudaken  2022-08-30  488  {
e971db8da1ccbb io_uring/io_uring.c Dylan Yudaken  2022-08-30  489       struct 
io_ev_fd *ev_fd = container_of(rcu, struct io_ev_fd, rcu);
7723238b4361cc io_uring/io_uring.c Dylan Yudaken  2022-08-30  490       int ops 
= atomic_xchg(&ev_fd->ops, 0);
7723238b4361cc io_uring/io_uring.c Dylan Yudaken  2022-08-30  491  
7723238b4361cc io_uring/io_uring.c Dylan Yudaken  2022-08-30  492       if (ops 
& BIT(IO_EVENTFD_OP_SIGNAL_BIT))
7723238b4361cc io_uring/io_uring.c Dylan Yudaken  2022-08-30  493               
eventfd_signal(ev_fd->cq_ev_fd, 1);
e971db8da1ccbb io_uring/io_uring.c Dylan Yudaken  2022-08-30  494  
7723238b4361cc io_uring/io_uring.c Dylan Yudaken  2022-08-30  495       /* 
IO_EVENTFD_OP_FREE_BIT may not be set here depending on callback
7723238b4361cc io_uring/io_uring.c Dylan Yudaken  2022-08-30  496        * 
ordering in a race but if references are 0 we know we have to free
7723238b4361cc io_uring/io_uring.c Dylan Yudaken  2022-08-30  497        * it 
regardless.
7723238b4361cc io_uring/io_uring.c Dylan Yudaken  2022-08-30  498        */
7723238b4361cc io_uring/io_uring.c Dylan Yudaken  2022-08-30 @499       if 
(atomic_dec_and_test(&ev_fd->refs)) {
e971db8da1ccbb io_uring/io_uring.c Dylan Yudaken  2022-08-30  500               
eventfd_ctx_put(ev_fd->cq_ev_fd);
e971db8da1ccbb io_uring/io_uring.c Dylan Yudaken  2022-08-30 @501               
kfree(ev_fd);
e971db8da1ccbb io_uring/io_uring.c Dylan Yudaken  2022-08-30  502       }
7723238b4361cc io_uring/io_uring.c Dylan Yudaken  2022-08-30  503  }
e971db8da1ccbb io_uring/io_uring.c Dylan Yudaken  2022-08-30  504  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to