From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D02B3C4363A for ; Mon, 5 Oct 2020 15:18:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7D478207BC for ; Mon, 5 Oct 2020 15:18:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601911098; bh=QANsWJBcybVZjCKHtkB8uPRvP8CkCvd8RdqxgHOFkw0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=QwIJvjxzJi2T6AqNwEDC41mvD5FSPjqQ+NWlKoIrVqGzXU0MYNb99KeTqVFO94V3f s2XMd8nrpsD07rsMWJAi38/xwcHMbU/I2xqgSWszNaTLzRTT0oAWwdKptCX4NxR2Jm dfp3UnBwUSUP8ipHhvubrOcXqrNlc6eFyt9950Z0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726713AbgJEPSR (ORCPT ); Mon, 5 Oct 2020 11:18:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:46070 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726429AbgJEPSR (ORCPT ); Mon, 5 Oct 2020 11:18:17 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 47FB920774; Mon, 5 Oct 2020 15:18:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601911095; bh=QANsWJBcybVZjCKHtkB8uPRvP8CkCvd8RdqxgHOFkw0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=H4n4Myg6MYeEk+ful+9jc7e5PUpuHFg1RrmEpFyyaDQqPxKkh2EFR/A9CUweeMed9 fm3K7+Owe8eic0CP72kObf9bG+1wPwT7oeeLej3/lrbYwfNn6rsLnnrFbqtBqtEdi7 vvqiERDzH2tKLFBCF8vfDO4ZjFXoOyC8iaKMaduc= Date: Mon, 5 Oct 2020 17:18:57 +0200 From: Greg Kroah-Hartman To: Andrey Konovalov Cc: Valentina Manea , Shuah Khan , Alan Stern , USB list , LKML , Dmitry Vyukov , Nazime Hande Harputluoglu , syzkaller Subject: Re: Is usb_hcd_giveback_urb() allowed in task context? Message-ID: <20201005151857.GA2309511@kroah.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 05, 2020 at 05:08:11PM +0200, Andrey Konovalov wrote: > Dear USB and USB/IP maintainers, > > While fuzzing the USB/IP stack with syzkaller we've stumbled upon an issue. > > Currently kcov (the subsystem that is used for coverage collection) > USB-related callbacks assume that usb_hcd_giveback_urb() can only be > called from interrupt context, as indicated by the comment before the > function definition. In the USB/IP code, however, it's called from the > task context (see the stack trace below). > > Is this something that is allowed and we need to fix kcov? Or is this > a bug in USB/IP? It's a bug in kcov, and is not true as you have found out :) thanks, greg k-h