Received: by 10.223.185.116 with SMTP id b49csp6375156wrg; Wed, 28 Feb 2018 08:22:57 -0800 (PST) X-Google-Smtp-Source: AH8x226VZKBUlyK31ge7/zTnptuBuZllmaji+VKvrf525H9FM7/t96DcgtRvCZU3ENcCU2KQLJmQ X-Received: by 10.99.145.199 with SMTP id l190mr14154944pge.397.1519834976883; Wed, 28 Feb 2018 08:22:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519834976; cv=none; d=google.com; s=arc-20160816; b=vHGcGwjidyXg2/u3KRHOgnwuJ6ax7+uL+k8Kxf6v6bAtUoidpQsbRDQllFy/9aCoPM YVyoUsiNo6JrY1UO7QX2zceD5Yog+PG1kLA0U+nOgU40QpuK/SUsJAGaMsTM73MQ9LYr w+ooXEvLdac1RyVoIpmJkNzozlNRX3krWCR8DDVpl01OR4haPj+PTd1dhINZ/QqDrYQW 7+njgQhgoFOalh+wF1k22jHJ+fZ1OwF8vwrkSLl7gJt90+kvMMVkFVgPy7h1AuKLknyT EyRTY7KOMCOF7WvCmJrvH23iEmw5V7O7uUs9ZrZeWDLmVWlW9S4iId4lU/JCAunptdQe EyEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=S3RSs0grV+zG9qCS7c0tFekP4eVBO8OEJRizJ2ihYaU=; b=DkT5zM1qvFvnzxLka/5Ce3B12hw0ruYq6094UXz5YGFCB4W0tVVWB4BCmOMianon5e 3WRByagENPU65xZRoQDwlthx6fReZuXuRjyXLL1RMPpW7FiZkmNqPs5B9v7Z81oU7JyM iHRFSlSbC0ZJNwcPnTAWowTYVtw+72hG5Wr/Ozbb8TboVDY4OgZ8a+X96HyXkfhxZhq9 K2ceMZOlA+KSJ7JJ7rRFXBwNxF+f/AF1lj3KtMnyzZEyUt7d/S3tzGKl4BWcVejPa6lP UOr4GbcBRQGMuXsLEY4mw2jFUfBqFewEYl6ljNddiWI1YMf3ajq0H91DdP3Ro6o1ak/0 P71A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e89si1459463pfm.198.2018.02.28.08.22.42; Wed, 28 Feb 2018 08:22:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935242AbeB1QUz (ORCPT + 99 others); Wed, 28 Feb 2018 11:20:55 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:35396 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935224AbeB1QUw (ORCPT ); Wed, 28 Feb 2018 11:20:52 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Yt-0006XW-NQ; Wed, 28 Feb 2018 15:22:31 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yf-0008Up-IZ; Wed, 28 Feb 2018 15:22:17 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Adam Wallis" , "Vinod Koul" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 082/254] dmaengine: dmatest: warn user when dma test times out In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Adam Wallis commit a9df21e34b422f79d9a9fa5c3eff8c2a53491be6 upstream. Commit adfa543e7314 ("dmatest: don't use set_freezable_with_signal()") introduced a bug (that is in fact documented by the patch commit text) that leaves behind a dangling pointer. Since the done_wait structure is allocated on the stack, future invocations to the DMATEST can produce undesirable results (e.g., corrupted spinlocks). Ideally, this would be cleaned up in the thread handler, but at the very least, the kernel is left in a very precarious scenario that can lead to some long debug sessions when the crash comes later. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=197605 Signed-off-by: Adam Wallis Signed-off-by: Vinod Koul Signed-off-by: Ben Hutchings --- drivers/dma/dmatest.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c @@ -633,6 +633,7 @@ static int dmatest_func(void *data) * free it this time?" dancing. For now, just * leave it dangling. */ + WARN(1, "dmatest: Kernel stack may be corrupted!!\n"); dmaengine_unmap_put(um); result("test timed out", total_tests, src_off, dst_off, len, 0);