Received: by 10.213.65.68 with SMTP id h4csp291818imn; Fri, 16 Mar 2018 03:20:13 -0700 (PDT) X-Google-Smtp-Source: AG47ELtjfbbSClElX78IXLhk6Eq9KUlnw42sq+XNrm6bVEzYJa5oPEo3bpUslN6DCJuIIcZsQ/pQ X-Received: by 2002:a17:902:f81:: with SMTP id 1-v6mr1499679plz.265.1521195613765; Fri, 16 Mar 2018 03:20:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521195613; cv=none; d=google.com; s=arc-20160816; b=OwSaXA60F0Z9JhbgqJ7QFD3rul5VsfEPalURHCTwtNuRKFrW8wDfuawsPUaEDPYKoS SaSu14JkTMf1fSa7wtGonqFZcJ8OIitJ0WpGzxdL7hBWYmibhXc7frcst9242DC8vAz4 5Dbjkmo0UwV4TQo+/W0qW0GnD6yCio+6olTEm1UwM7UYBtUUxSbxti30q/XJQIGiRxuz 4amDlm+OxPwmrZVwlRBQlSzq/2jpQ/Mxoz4aYGx9Rlumoq8ckiBaDP4/65JpiDTF8ItE HALvA2Ti6LaJYJzsVuMBMexlXWHaDfg/SLUgX5baOsLbHpOeAn0ItUAM8GdJUVga36kZ y6Ew== 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=JfsP1x3Tm5Uf9muN2StVCuK7x+nHTa7X9vxlqIuCrFA=; b=nrlyqbTKUm0Lg+9QhCT8sol9NNnbO9Pi5Y1FZpNINY4S2aIduvRQQHyDYE/MHT9/fc 5gqGKVClGEtqhz6j4IC5vV26uUDTYfwtDnI8BJzZ5n2GFD0sh/ZWl9JKEwRQu069HiJ5 5lwFiUb8rwnV0DvrI6YMD41TajEP7B39u8HYQf6J1CiC/3jk/aLtKkLzWGNB9K49qbrF pMTSdN8sArAXRkQ2ti3UFGw6br85tpw+i4kqyFll43fWQ4H43u255EAyCKMkLeoAo3DO zLsoqchE3NI8RWwoWfHk9pUeejBJ3gXW1whqeKDPka4XTvxBdNrVBYYdCiYr7WLt0iJb B31A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=dmZxbR3Z; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1-v6si6021127plk.697.2018.03.16.03.19.59; Fri, 16 Mar 2018 03:20:13 -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=@ti.com header.s=ti-com-17Q1 header.b=dmZxbR3Z; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753284AbeCPKSY (ORCPT + 99 others); Fri, 16 Mar 2018 06:18:24 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:29095 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750982AbeCPKSW (ORCPT ); Fri, 16 Mar 2018 06:18:22 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w2GAHIv3021001; Fri, 16 Mar 2018 05:17:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1521195438; bh=G8/pHmpAUkG68x/tPJfV+erpCB/CYSy4WqU/VN3HIlw=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=dmZxbR3ZtQWHiYw2AvijSUR3NHE6GfWB3JuvGaZxbz6Z5iUKHAukQ90HI0c0/Afuz zoQG3BHdEAhv98jJYvHsvgwLFNlc0yWFzBRsvMhEoLqfRNz14c7WZQz083iljA23EU s/F5/I+tTXHlIzyehGkpsFAJhFgK2xc2Q4mn67eM= Received: from DLEE101.ent.ti.com (dlee101.ent.ti.com [157.170.170.31]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w2GAHIr5026100; Fri, 16 Mar 2018 05:17:18 -0500 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Fri, 16 Mar 2018 05:17:17 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Fri, 16 Mar 2018 05:17:17 -0500 Received: from [172.24.190.172] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w2GAHFXg010898; Fri, 16 Mar 2018 05:17:16 -0500 Subject: Re: [PATCH] ARM: davinci: DA8XX: fix oops in USB PHY driver due to stack allocated platform platform_data To: David Lechner , CC: Kevin Hilman , Bartosz Golaszewski , References: <1521136976-32730-1-git-send-email-david@lechnology.com> From: Sekhar Nori Message-ID: <382a269a-f486-8c1a-23b2-9620a01a073c@ti.com> Date: Fri, 16 Mar 2018 15:47:14 +0530 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" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 15 March 2018 11:32 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. Oops. That should have been caught in review. > > Fixes: 9b504750923cb ("ARM: davinci: da8xx: Add USB PHY platform device") The offending commit seems to be bdec5a6b5789 ("ARM: da8xx: use platform data for CFGCHIP syscon regmap") in my tree which should be in linux-next. I don't think we have this issue in mainline. Right? > Signed-off-by: David Lechner Thanks, Sekhar