Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2327285imm; Fri, 7 Sep 2018 14:44:11 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbJVxDLfpA30B1iQmCSlqgBN3yY3T80TD5gQglKLVUQWhb1K3sIkaHzAnv4Nhz2Gt6YG1jS X-Received: by 2002:a63:ba55:: with SMTP id l21-v6mr10391850pgu.399.1536356651737; Fri, 07 Sep 2018 14:44:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536356651; cv=none; d=google.com; s=arc-20160816; b=lYNR24UtR8i+a+kucL8J8z8JMuIic7YSPWkK10G+rmDiViPbstYDHvEEX4tVQRmoe7 dD6VE6ueo6+6VUFU3ZsWUSZl+wGJYhtz7DwbpeElxGxw8ydC72ZST3c9id82JBMK21Rm aX9nJ7epzWXZnp5khOchdU7VOQYT4FBdYal4Takiu9yHvjCLA9ObgEjFUMZ2sb+qF9iY /+s6tV8EsyeBwhdIcoIH/qC3CPouAKUxPh4NyWXwL4MQiFULzDdQcNpDAJp58sxyP3Cq CvFqsHKGNVS9OABNNG63Kx+o6ls05ARGM3aRYFGvNzYMCqI15EZNhJnxrkTsE4kueC03 bbjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from; bh=KSTKDc+2b660d2dzKqpq3CILCLN1kNCkStXAHJ+Nalc=; b=C5LR9PSTnuYIo00M7oUDbzDvwW3EstOZAMR2UdqImNjv7Th/W7z11Yj+LsQ7k5xyq/ +N3+Nv5BiQek+xy7Gnd5aWIEsGfAIC+uqxU6unbnnCyR8p7b3+7Mm//SnEu+q/P5+KUd eilRMu9DdWj1IXrzDOojqTyDObPQs/CbgeveBOvSRekuCZPoX16ClRDWNjk5V70DkXGd aS7UWoRn5xu6dEMJbemZ8P5Ucv2PTmAS8QTQOYlJu4uTpL+rPx5i+naXA2JonaWDvapw kAJv1whsk2PxQ+Wl6gJBi5/OQimLRFJkAJrrdYdP6RWDJpmaVhmX7WeMp+xcRVPtTu32 Ed8w== 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 g20-v6si9421963pgb.239.2018.09.07.14.43.56; Fri, 07 Sep 2018 14:44:11 -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; 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 S1730700AbeIHCZq (ORCPT + 99 others); Fri, 7 Sep 2018 22:25:46 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:56626 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730326AbeIHCZp (ORCPT ); Fri, 7 Sep 2018 22:25:45 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 321DBBBF; Fri, 7 Sep 2018 21:42:50 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bartosz Golaszewski , Mark Brown Subject: [PATCH 3.18 01/29] spi: davinci: fix a NULL pointer dereference Date: Fri, 7 Sep 2018 23:10:22 +0200 Message-Id: <20180907210909.638839912@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180907210909.523240901@linuxfoundation.org> References: <20180907210909.523240901@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bartosz Golaszewski commit 563a53f3906a6b43692498e5b3ae891fac93a4af upstream. On non-OF systems spi->controlled_data may be NULL. This causes a NULL pointer derefence on dm365-evm. Signed-off-by: Bartosz Golaszewski Signed-off-by: Mark Brown Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/spi/spi-davinci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c @@ -230,7 +230,7 @@ static void davinci_spi_chipselect(struc } /* program delay transfers if tx_delay is non zero */ - if (spicfg->wdelay) + if (spicfg && spicfg->wdelay) spidat1 |= SPIDAT1_WDEL; /*