From patchwork Fri Mar 12 06:56:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai-Heng Feng X-Patchwork-Id: 1451730 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dxc6X0jYsz9sRR; Fri, 12 Mar 2021 17:56:18 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lKbiV-0000BV-Oc; Fri, 12 Mar 2021 06:56:11 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lKbiT-0000BP-JQ for kernel-team@lists.ubuntu.com; Fri, 12 Mar 2021 06:56:09 +0000 Received: from 1.general.khfeng.us.vpn ([10.172.68.174] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lKbiS-00058t-KP for kernel-team@lists.ubuntu.com; Fri, 12 Mar 2021 06:56:09 +0000 From: Kai-Heng Feng To: kernel-team@lists.ubuntu.com Subject: [SRU] [Unstable/OEM-5.10] [PATCH 0/2] Fix USB audio devices without quirk Date: Fri, 12 Mar 2021 14:56:03 +0800 Message-Id: <20210312065605.1220504-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1918670 [Impact] After LP: #1917842, USB audio devices that don't have quirk stop working. [Fix] 1) Only apply quirk if it exists. 2) Check quirk before the driver is freed. [Test] Ckeck if USB audio works fine. The reporter verifed the fix solves the issue. [Where problems could occur] This fix checks NULL more thoroughly, so it's unlikely to indroduce any new issues. Pavel Skripkin (2): ALSA: usb-audio: fix NULL ptr dereference in usb_audio_probe ALSA: usb-audio: fix use after free in usb_audio_disconnect sound/usb/card.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) Acked-by: Tim Gardner