lkml.org 
[lkml]   [2021]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [syzbot] KASAN: use-after-free Read in addr_handler (4)
    On Wed, Oct 06, 2021 at 11:18:00AM +0800, Hillf Danton wrote:
    > +++ b/drivers/infiniband/core/addr.c
    > @@ -795,6 +795,11 @@ void rdma_addr_cancel(struct rdma_dev_ad
    > * guarentees no work is running and none will be started.
    > */
    > cancel_delayed_work_sync(&found->work);
    > + /*
    > + * flush is needed if work is queued again while it is running, as
    > + * cancel waits nothing.
    > + */
    > + flush_work(&found->work);

    The _sync() above does the same, cancel doesn't return while the work
    is running

    Jason

    \
     
     \ /
      Last update: 2021-10-06 13:42    [W:3.822 / U:0.144 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site