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] [day] [month] [year] [list]
Date:   Mon, 11 Jan 2021 09:28:29 +0100
From:   Takashi Iwai <tiwai@...e.de>
To:     Davidlohr Bueso <dave@...olabs.net>
Cc:     balbi@...nel.org, gregkh@...uxfoundation.org,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        Davidlohr Bueso <dbueso@...e.de>
Subject: Re: [PATCH] usb/gadget: f_midi: Replace tasklet with work

On Mon, 11 Jan 2021 05:28:55 +0100,
Davidlohr Bueso wrote:
> 
> Currently a tasklet is used to transmit input substream buffer
> data. However, tasklets have long been deprecated as being too
> heavy on the system by running in irq context - and this is not
> a performance critical path. If a higher priority process wants
> to run, it must wait for the tasklet to finish before doing so.
> 
> Deferring work to a workqueue and executing in process context
> should be fine considering the callback already does
> f_midi_do_transmit() under the transmit_lock and thus changes in
> semantics are ok regarding concurrency - tasklets being serialized
> against itself.
> 
> Cc: Takashi Iwai <tiwai@...e.de>
> Signed-off-by: Davidlohr Bueso <dbueso@...e.de>

The patch looks good to me.
Reviewed-by: Takashi Iwai <tiwai@...e.de>


BTW, now I found that the driver doesn't have the cancel call for
tasklet or work at the unbind.  Practically seen it's no big problem,
but its lack is a bait for syzbot.  We may need to just call
cancel_work_sync() somewhere, probably at f_midi_drop_out_substreams()
or f_midi_disable(), but it can be in another patch.


thanks,

Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ