Received: by 10.213.65.68 with SMTP id h4csp146767imn; Thu, 15 Mar 2018 12:16:47 -0700 (PDT) X-Google-Smtp-Source: AG47ELuVZwVpDoPJSHbHltdeAIWlkjxGjImj2ygB3jnb9fmhlRAqa3GCmJRR3fxmW2QwKxDK4JIv X-Received: by 10.167.129.67 with SMTP id d3mr8638822pfn.108.1521141407483; Thu, 15 Mar 2018 12:16:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521141407; cv=none; d=google.com; s=arc-20160816; b=vc1XtX0jemshUQbdeJ2/T848hrpBVQu8kGKUP4h/qbNXQPjZYRb6aEVqyJ3NIFYe5Q mC5yllBf7L5C4QkH9gZEtUeN6K5lCmar1/qqQo7sizaR5a2s5JWZvRitkf9iKc9Lzl42 oNvpTv24G5TbVCr+0XWTpKkvb8RxZGPdC4x3lIlioDP8zOaUYYVIX/xwORlAOx4ZOZ+D qoSb/m7HTWKW/Q0jviAEI3lDD7XpL83EiOReCK5TMyuZ5u6o5Xf6eso+WjO8ptc/ERAn zsXwgAeMrICozss332C6FEpn6H32bf7vjQW3qynE1oIeyrOFG4fxjiE40ikwmFe6SV1a M//Q== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=AlBTYpChJBW+7kJh5YzaX9oNpTT7nvmYtxDZw2kZrLw=; b=H12q9y7EiwrNtPQqxbeUxH2YhzLgEIibaG/QyKd1Lh0bBNnbuud8ICG5OmA/Bnrm/O dK2U85v5l+9ir9lE7cZRUzEHxAYd0RjQC/dafyLG0W62KGdD5EF/8Queru64pFcGufa0 KVfSTYr8W+eukJHffGGtnErngUdPIoIf0n+9BTDrkjzEER53B4jQrlMfh/BhbzkJdWed qk3uSjEm4/IeIVeX6krSjj3Eq7owNFZJbjUCC/BBQ4FH3a2N9CnvMXyy3uk0anTxAaDf ht22l17cqlPJKe/aFqXAnp1sNfh6CdSnhTXu0flk7vWji8ycYm3tp4ymD3rJ1Ato2pP9 gB4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=rJ0sujzZ; 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 a34-v6si4581327pld.8.2018.03.15.12.16.33; Thu, 15 Mar 2018 12:16:47 -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=fail header.i=@lechnology.com header.s=default header.b=rJ0sujzZ; 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 S1753052AbeCOTPW (ORCPT + 99 others); Thu, 15 Mar 2018 15:15:22 -0400 Received: from vern.gendns.com ([206.190.152.46]:38674 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752912AbeCOTPT (ORCPT ); Thu, 15 Mar 2018 15:15:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=AlBTYpChJBW+7kJh5YzaX9oNpTT7nvmYtxDZw2kZrLw=; b=rJ0sujzZF7I1vokk3rOaCZRg31 JhJjy9hTJBb4NSIOzGOduW7gAhzsDXrUoC6DbHIG+K+IvfsjjQwIDDlKN4hsbRR7CYgBU4KLhzgZt g7HDxX3zIn5t/Bp3wMd2gbgCARs/ulfW7i/oK5sI98smKAkRFdyOWclNEf61CvBhyB+koqxy27iaO k4sXcuNzqnYf7bZGKAFGYE0P/TKnWHSEgJZ4zXp06toW0YtE44Joc6kERwrgDXM7BUG1avIzQPPmg d3d9E9qrUjdIbHEXH/w32qAttTixmoEc6JzycHE3LWNQN4klsSa/PXDgDEctqZiWsqht3RzZYndKA CCnFzRrQ==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:39434 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89_1) (envelope-from ) id 1ewYJA-001M3t-4C; Thu, 15 Mar 2018 15:13:00 -0400 Subject: Re: [PATCH] ARM: davinci: DA8XX: fix oops in USB PHY driver due to stack allocated platform platform_data To: linux-arm-kernel@lists.infradead.org Cc: Sekhar Nori , Kevin Hilman , Bartosz Golaszewski , linux-kernel@vger.kernel.org References: <1521136976-32730-1-git-send-email-david@lechnology.com> From: David Lechner Message-ID: <77b0430f-3606-7195-6cde-eb90fc00c3fd@lechnology.com> Date: Thu, 15 Mar 2018 14:14:59 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1521136976-32730-1-git-send-email-david@lechnology.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/15/2018 01:02 PM, David Lechner wrote: > This fixes a possible kernel oops due to using stack allocated platform > data for the USB PHY driver on DA8XX devices. If the platform device > probe is deferred, then we get a corrupt pointer for the platform data. > > We now use a global static struct for the platform data so that the > platform data pointer does not get written over. > > Tested on OMAP-L138 LCDK board using legacy board file. > > Fixes: 9b504750923cb ("ARM: davinci: da8xx: Add USB PHY platform device") > Signed-off-by: David Lechner > --- superseded by v2 that applies cleanly before common clock series