From patchwork Wed Mar 4 17:29:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Righi X-Patchwork-Id: 1249144 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=) 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 48Xgr02Rcgz9sSG; Thu, 5 Mar 2020 04:30:07 +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 1j9XqK-0005WE-H8; Wed, 04 Mar 2020 17:30:00 +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 1j9XqI-0005Vv-N3 for kernel-team@lists.ubuntu.com; Wed, 04 Mar 2020 17:29:58 +0000 Received: from mail-wr1-f70.google.com ([209.85.221.70]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1j9XqI-0003gC-E8 for kernel-team@lists.ubuntu.com; Wed, 04 Mar 2020 17:29:58 +0000 Received: by mail-wr1-f70.google.com with SMTP id d7so1149491wrr.0 for ; Wed, 04 Mar 2020 09:29:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=eVcQpcun6QOo4EkdkVGQ3iRGXTgAEQrM9/vskHmrQaQ=; b=YwCP0g4X/SZ/LJN5Bcf1f98Rn4HKeqLSbzc2CzLEcLLYSPi/QQSQbHpP4SqhjXVYLt izXRPvYnleaNuUNyRGzksjFiGqLU6WWPzAjwsfQYUOxtRQ7O6ddLAR62ejNMuWYC6F5t 2yZKW9sFvvveuLk1G2mFN34lsQ85YJmcpyiXNOPLMs7KoTfrLPhUdWTZHY0BvZx7JCWh SDPvBsRKLDR4NAHBnkI9Mgmf06cLJcP6lA+1Zqw28VBn1sL7Ta/DEc7xizds2TuCtNCt 4w8Q/2qGSdk21n09YzKvR9Tov6IQX23mR41+XNVNFMEXmL5ASjLiNb8d45HKpAxHbcqR yadA== X-Gm-Message-State: ANhLgQ1UiJnKTV68sUP3cUn6ud2Fz19FXrr0TV8gqRipqQei69w6G6Ec 7eVX06A7Nh64B6NVZ0wz1Tr8BMbp3KWqdp0Jr/vinIvNy9k8tRdCDvw53uOMfs8/43qUc8GY42t IkyZuCptTVOxQYi1da0XB02DJ622286kNbps8++Jukw== X-Received: by 2002:a1c:2045:: with SMTP id g66mr4506231wmg.15.1583342997835; Wed, 04 Mar 2020 09:29:57 -0800 (PST) X-Google-Smtp-Source: ADFU+vtMpSnvEUanuhfKxfyDAiUJGAmu6ClreVmDoP9Q6ULJOODhhFPXZUu+Xo91/04jcusvKAsQgA== X-Received: by 2002:a1c:2045:: with SMTP id g66mr4506210wmg.15.1583342997490; Wed, 04 Mar 2020 09:29:57 -0800 (PST) Received: from xps-13.homenet.telecomitalia.it (host96-127-dynamic.32-79-r.retail.telecomitalia.it. [79.32.127.96]) by smtp.gmail.com with ESMTPSA id o11sm29667010wrn.6.2020.03.04.09.29.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2020 09:29:57 -0800 (PST) From: Andrea Righi To: kernel-team@lists.ubuntu.com Subject: [SRU][B / hwe][PATCH 0/2] ptp: fix general protection fault in ptp_clock_unregister() Date: Wed, 4 Mar 2020 18:29:50 +0100 Message-Id: <20200304172952.273241-1-andrea.righi@canonical.com> X-Mailer: git-send-email 2.25.0 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/1864754 [Impact] Disconnecting a thunderbolt docking station on a Dell Inc. XPS 13 9360/0D4J15 can cause a general protection fault (with kernel 5.3.0-40 and above). The bug has been introduced by this upstream commit: ffe3bcaf02c4 ("ptp: fix the race between the release of ptp_clock and cdev") Reverting the commit is not a viable option, because it would re-introduce another bug. The fix is to do something similar to this: 75718584cb3c64e6269109d4d54f888ac5a5fd15 ("ptp: free ptp device pin descriptors properly") and call posix_clock_unregister() in ptp_clock_release(). NOTE: this bug is also present upstream! In addition to that it seems that we can also trigger a kernel oops with the igb driver if this additional upstream fix is not applied: 94bc1e522b32c866d85b5af0ede55026b585ae73 ("igb/igc: Don't warn on fatal read failures when the device is removed") [Test case] Bug reporter provided the test case by physically disconnecting the docking station. The problems can be easily reproduced. [Fix] Apply upstream commit: 94bc1e522b32c866d85b5af0ede55026b585ae73 ("igb/igc: Don't warn on fatal read failures when the device is removed") And a custom patch to call call posix_clock_unregister() from ptp_clock_release(). [Regression potential] About the upstream commit the regression potential is minimal. The other custom fix seems to be pretty straightforward. We may consider to post this upstream and wait for a better feedback from the community. ---------------------------------------------------------------- Andrea Righi (1): UBUNTU: SAUCE: ptp: free ptp clock properly Lyude Paul (1): igb/igc: Don't warn on fatal read failures when the device is removed drivers/net/ethernet/intel/igb/igb_main.c | 3 ++- drivers/net/ethernet/intel/igc/igc_main.c | 3 ++- drivers/ptp/ptp_clock.c | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-)