Received: by 2002:ab2:2997:0:b0:1ec:cbc4:63fb with SMTP id n23csp398790lqb; Thu, 29 Feb 2024 04:36:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWlVIhfQkc1MYSSIvk1oXCKE4uac/VPvMd4+iIwp5Ql3HOqn4Wg7ljtYJ0krm/2yMzbvNTPHzLS1IVXr2mXAeDGyZ5OumOngxoD/9IdmA== X-Google-Smtp-Source: AGHT+IGKq2JtYCfmWyo+Rsu/pNlH9SP+C7isMLm9bOYYO3zpmoej7CZjKKuNhIT0GDCMTLZQyp3p X-Received: by 2002:a17:906:1351:b0:a43:5dbc:4bfc with SMTP id x17-20020a170906135100b00a435dbc4bfcmr1400636ejb.1.1709210187303; Thu, 29 Feb 2024 04:36:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709210187; cv=pass; d=google.com; s=arc-20160816; b=KAvNqPzkqH3/IExZK4Xbn+6Y5x+mXrJY5aB4ZLsTN17bdvOD7KC8D8tGYQW9WbPwJY 5NgqGmeea8ziDDRNBKFg9+TgqrEnvEPY3OXGXcPxPhhdEIy4Q9iyO3JyJMZFZRBDoemU Bt0867yBjEFWlAadWg5/q1MiYYQh3EOfdChb3PhDbk8C5oi+38w+MZ6gHEfClE1jyMzR CeUHb0mE4PwR7rPEM0I7syDWfy+1nAncXZk6LQwIG5pQJDSXC/KUDvIwLPE6PcSQv7pB 4EFnxtCdRPLTag6WsO2lyMHpR9xzcYMQ0LOsCsdwhDKNDTeuC5Mo/RgxlsAn+M67SNJM JJYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=eNEa93U+qd+ogp3OwPrQkQbnOlbbuyrXVYKT527DEFs=; fh=eNjMXfIwfPoTxfd9BUbn49ZB1ufy4Z5WRH1ORiDkI+M=; b=TAp6f8rPLrA+1r/p6fPcigBtvO5B1uwKmkHQAWWS31YYq/X58AiSx+qYHuv40YQmsN 5chskCMAFXvD17+0aIWgHZRxiGy1LXUIKkXFo5zGXC/7NC/FRYGLEIRUm79UCVU3eG1r fuHCgGfmpXr3XRQnrl6DBstEPN/FdrKsyYPl17w1WhfhZ7vjEx3ZDux+TYWIdfAJ5p2X hdO20PvLJbhBEy+AoWM8CbkqNJI0vubhojdY4i9AFvCzVFrM5LufUB0An9FrT7KrS2TN TzkR3TLP1PdYlOj2SkqWxQKqaoNA+QyXV4178UsbzpeM5muPOoX6iTZAS25nW8i3zkUx UW1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-86705-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86705-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gt6-20020a1709072d8600b00a44502021f2si341425ejc.195.2024.02.29.04.36.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 04:36:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-86705-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-86705-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86705-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1093D1F25BAF for ; Thu, 29 Feb 2024 12:36:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 13EC47D402; Thu, 29 Feb 2024 12:36:13 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 803FD33FE; Thu, 29 Feb 2024 12:36:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709210172; cv=none; b=mK5q064w11w81+/VsGn/Ln5lko6nRgxkSMIpf4zf0l7fivZ++b415JHn54rytzHbU+5PuU2gxr5zlO0Ae40ypvbCpi/CVGuUx0QtAjuLaFZR5i8C/Pv+CVBOWC4y0hAFUvp73cq3imZPmmeuwQiQy9Q+BqKmBEp28tQi6pIfDPU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709210172; c=relaxed/simple; bh=cEm1nlpXzkO+OrkahjB0Vv9weCQRVfMybCdEiveFC9c=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=vCBb6HdnSO/8hYqCb48VNHbuIwqzOarj0Ke3pdfsUJQHyOSSq/y1UkDGZHA8x7i1gNN72wEnBolsiDkNDI2WRyyfGP1IPvA4ZyJ3XbJYTM1+aW29uj/yXPbo5JSKiwm+Lw3sBWh2EHNJsAIFc15y0o9Gh4c5i/hmg4VvDA5zh5w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37943C433C7; Thu, 29 Feb 2024 12:36:10 +0000 (UTC) Message-ID: Date: Thu, 29 Feb 2024 13:36:08 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] media: fix task hung in vb2_video_unregister_device Content-Language: en-US To: Edward Adam Davis , syzbot+2622b51b35f91a00ea18@syzkaller.appspotmail.com Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-usb@vger.kernel.org, m.szyprowski@samsung.com, mchehab@kernel.org, syzkaller-bugs@googlegroups.com, tfiga@chromium.org References: <0000000000008faf0a06126a0ffb@google.com> From: Hans Verkuil In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2/29/24 13:21, Edward Adam Davis wrote: > vb2_video_unregister_device() will get vb2q_lock, so usbtv_video_free() does > not need vb2q_lock. > > Reported-and-tested-by: syzbot+2622b51b35f91a00ea18@syzkaller.appspotmail.com > Signed-off-by: Edward Adam Davis Duplicate of: https://lore.kernel.org/linux-media/19cdefd3-163b-41a1-b603-764aab4b5b90@xs4all.nl/ I'm waiting for a v2 of that one. Regards, Hans > --- > drivers/media/usb/usbtv/usbtv-video.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/media/usb/usbtv/usbtv-video.c b/drivers/media/usb/usbtv/usbtv-video.c > index 62a583040cd4..b55f432b44d4 100644 > --- a/drivers/media/usb/usbtv/usbtv-video.c > +++ b/drivers/media/usb/usbtv/usbtv-video.c > @@ -963,7 +963,6 @@ int usbtv_video_init(struct usbtv *usbtv) > > void usbtv_video_free(struct usbtv *usbtv) > { > - mutex_lock(&usbtv->vb2q_lock); > mutex_lock(&usbtv->v4l2_lock); > > usbtv_stop(usbtv); > @@ -971,7 +970,6 @@ void usbtv_video_free(struct usbtv *usbtv) > v4l2_device_disconnect(&usbtv->v4l2_dev); > > mutex_unlock(&usbtv->v4l2_lock); > - mutex_unlock(&usbtv->vb2q_lock); > > v4l2_device_put(&usbtv->v4l2_dev); > }