From patchwork Thu Oct 4 05:42:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai-Heng Feng X-Patchwork-Id: 978648 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com 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 42Qhbr3Tlqz9s7W; Thu, 4 Oct 2018 15:42:16 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1g7wOl-0005UU-MD; Thu, 04 Oct 2018 05:42:07 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1g7wOj-0005UA-Nz for kernel-team@lists.ubuntu.com; Thu, 04 Oct 2018 05:42:05 +0000 Received: from 61-220-137-37.hinet-ip.hinet.net ([61.220.137.37] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1g7wOi-0000KZ-UZ for kernel-team@lists.ubuntu.com; Thu, 04 Oct 2018 05:42:05 +0000 From: Kai-Heng Feng To: kernel-team@lists.ubuntu.com Subject: [SRU] [Bionic/Cosmic/Unstable] [PATCH v2 0/1] Fix usbcore.quirks when used at boot Date: Thu, 4 Oct 2018 13:42:00 +0800 Message-Id: <20181004054201.2812-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.17.1 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: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1795784 [Impact] Use usbcore.quirks kernel parameter let the boot stuck. [Test] Without the patch, the usbcore.quirks= doesn't work when usbcore is builtin. The issue is fixed with the patch. [Fix] If the parameter is used at boot, parse the list after the slab is initialized. When the kcalloc fails, reset the count to 0. [Regression Potential] Low. The change limits to quirk parsing, the usbcore behaviour stays the same. Harry Pan (1): usb: core: safely deal with the dynamic quirk lists drivers/usb/core/quirks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Acked-by: Seth Forshee Acked-By: AceLan Kao