lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 9 Nov 2020 11:14:10 -0800
From:   Davidlohr Bueso <dave@...olabs.net>
To:     Oliver Neukum <oneukum@...e.com>
Cc:     Johan Hovold <johan@...nel.org>, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org, Davidlohr Bueso <dbueso@...e.de>
Subject: Re: [PATCH] usb/mos7720: process deferred urbs in a workqueue

On Mon, 09 Nov 2020, Oliver Neukum wrote:

>Am Donnerstag, den 05.11.2020, 22:17 -0800 schrieb Davidlohr Bueso:
>> @@ -1888,16 +1732,8 @@ static void mos7720_release(struct usb_serial *serial)
>>                 usb_set_serial_data(serial, NULL);
>>                 mos_parport->serial = NULL;
>>
>> -               /* if tasklet currently scheduled, wait for it to complete */
>> -               tasklet_kill(&mos_parport->urb_tasklet);
>> -
>> -               /* unlink any urbs sent by the tasklet  */
>> -               spin_lock_irqsave(&mos_parport->listlock, flags);
>> -               list_for_each_entry(urbtrack,
>> -                                   &mos_parport->active_urbs,
>> -                                   urblist_entry)
>> -                       usb_unlink_urb(urbtrack->urb);
>> -               spin_unlock_irqrestore(&mos_parport->listlock, flags);
>> +               /* if work is currently scheduled, wait for it to complete */
>> +               cancel_work_sync(&mos_parport->work);
>>                 parport_del_port(mos_parport->pp);
>>
>>                 kref_put(&mos_parport->ref_count, destroy_mos_parport);
>
>Hi,
>
>do you really want to cancel as opposed to wait for work in release()?

Well I tried to maintain the current semantics here. tasklet_kill() is
equivalent to cancel_work_sync() in that they both wait for the delayed
execution to finish running and guarantee that it is no longer queued.

Thanks,
Davidlohr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ