Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp464043yba; Wed, 15 May 2019 04:34:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqy60AZEtgzr85FVMtXxe8DNISsfLNI/BjekGUK2hmS/NgJ9mK9NoFsrq9RLciRGFjb895Wl X-Received: by 2002:a63:cf0d:: with SMTP id j13mr44762571pgg.433.1557920062439; Wed, 15 May 2019 04:34:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557920062; cv=none; d=google.com; s=arc-20160816; b=wJNu9DDTha5dKEOtmnfADRPmStqXFs/o35ksym8+VbVMIpBpdgYSR0yJWxOwcSKBLU clWyr+rmwTKEeTQ/uwCr4n/dH0MqC02i55vVabXYpojzw3Mbqw5Q0hbQBJNy1b4Apetz jrWI/n9KtCk4HOFXpFuQSW3XM/iqX1ybdYG1bOFkVYWh45GZNZTGDDDLaiBUfmDMgwcI O2u4J8T7aA2LWzJEeaX2WtZaKA3WzpgXh9rDUhHCRQdCI8F/IhzG62BJP4YPvDdEWte7 PQcrO1ulkzk5qnPQMfp1TQFEnnTMuri442tBYiaCtaIiUb3z59Lwvk6kazUmGjwN1lPH 2a+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QJqtPj/+V0ubpaOwB3do15RRxxxUeDH9+lrZLuN6rdY=; b=u8exg/KXQSawCnuqsyDhi6eFbXONTyHAIcy2fnu1ymkKfDTZuoQ7hZc625ocJvcn88 uSBmDmYQ5ZHNPQhEUq+y96uTD3qtg4gzJTIfan1HrcFNnTBEfUvpWqsVlU6CXoGHsQn3 QtlTZfkArM5mo/pVwBkf1uIDO4ujvjZ7iqNLnrCYaORZXcjrIfLoq+EbLaY8yj/m9Xp1 7d+b8/4pcP2V148eKQVd148KNq3PdTDuqvy8BDwjXsrSm0bAG+2vJw7JRpPm7N80Lhsp /TMk4SPyjFFOJ8TO3xZlojwS1cKEdWALiZxWRm6oMwBq/gnoPYK9FLpF3RO7k0jZBQTV XH3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DC+AlT5g; 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 l190si1658947pga.255.2019.05.15.04.34.07; Wed, 15 May 2019 04:34:22 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=DC+AlT5g; 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 S1732848AbfEOLbH (ORCPT + 99 others); Wed, 15 May 2019 07:31:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:42772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732840AbfEOLbG (ORCPT ); Wed, 15 May 2019 07:31:06 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 14C5E206BF; Wed, 15 May 2019 11:31:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557919865; bh=MIhzsOA6fwEdEx1ikBp/ndqyYoZ40hTNplsc78QFuCU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DC+AlT5gLvqmW58XL2bJ39yMqrYRv1LqmnnpWArOBJA6fIV81P5DjwpmDjcjmU5Gd 1RezUTSGj0SrbydDAJw/r+y7iG3wx4zGqNdtBBQiXf/YMcqAbBV4g3ucU9BvIAsvME bEhcx0cSpU2pol1Dq6vlCP46gTWbDp5VP3FFrOQs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aaro Koskinen , Stefan Wahren , Vinod Koul , Sasha Levin Subject: [PATCH 5.0 079/137] dmaengine: bcm2835: Avoid GFP_KERNEL in device_prep_slave_sg Date: Wed, 15 May 2019 12:56:00 +0200 Message-Id: <20190515090659.195406339@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190515090651.633556783@linuxfoundation.org> References: <20190515090651.633556783@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit f147384774a7b24dda4783a3dcd61af272757ea8 ] The commit af19b7ce76ba ("mmc: bcm2835: Avoid possible races on data requests") introduces a possible circular locking dependency, which is triggered by swapping to the sdhost interface. So instead of reintroduce the race condition again, we could also avoid this situation by using GFP_NOWAIT for the allocation of the DMA buffer descriptors. Reported-by: Aaro Koskinen Signed-off-by: Stefan Wahren Fixes: af19b7ce76ba ("mmc: bcm2835: Avoid possible races on data requests") Link: http://lists.infradead.org/pipermail/linux-rpi-kernel/2019-March/008615.html Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/bcm2835-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c index ae10f5614f953..bf51192036378 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -674,7 +674,7 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_slave_sg( d = bcm2835_dma_create_cb_chain(chan, direction, false, info, extra, frames, src, dst, 0, 0, - GFP_KERNEL); + GFP_NOWAIT); if (!d) return NULL; -- 2.20.1