lkml.org 
[lkml]   [2020]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] kcov, usb: only collect coverage from __usb_hcd_giveback_urb in softirq
On 2020-10-16 15:57:45 [+0200], Andrey Konovalov wrote:
> --- a/drivers/usb/core/hcd.c
> +++ b/drivers/usb/core/hcd.c
> @@ -1646,9 +1646,16 @@ static void __usb_hcd_giveback_urb(struct urb *urb)
>
> /* pass ownership to the completion handler */
> urb->status = status;
> - kcov_remote_start_usb((u64)urb->dev->bus->busnum);
> + /*
> + * This function can be called in task context inside another remote
> + * coverage collection section, but KCOV doesn't support that kind of
> + * recursion yet. Only collect coverage in softirq context for now.
> + */
> + if (in_serving_softirq())

Could this in_serving_softirq() usage be replaced, please?

> + kcov_remote_start_usb((u64)urb->dev->bus->busnum);
> urb->complete(urb);
> - kcov_remote_stop();
> + if (in_serving_softirq())
> + kcov_remote_stop();
>
> usb_anchor_resume_wakeups(anchor);
> atomic_dec(&urb->use_count);

Sebastian

\
 
 \ /
  Last update: 2020-11-13 13:31    [W:0.701 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site