From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4C6F6C46467 for ; Mon, 2 Jan 2023 23:43:13 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A61198554C; Tue, 3 Jan 2023 00:42:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1672702960; bh=5qW+C/0ENRniJw0WFaYCYKebcxOk1QyOWyJruz7LHEY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=s08K0VX1kwcjT8rClBBfdc9/bvNNmRBGqRSFvHf+Gx/4e+WOOFq1w/Dok6zCYk0QQ 8f3QHfU4q5Qoz1C6ex4vvVeZVF9cOZnJkcFv7jjV7yFTqZj2fYQrgQpK/D1J3EQPTp T08amuaijFshbahGlKpNUEzYaRKV93pwQZwva6aUEOEGulmRaBgElIXyg0CtOexCNW WQaWcItGu877ioesY78ksN4YjVzoqk694UGZMTqzYZ//WAYObXi3aUkTjS+WMvZ5be FN44IGwWhOeWhKdbH3qp3NNr4Qit7VUQfK5kNLNZ+oPUFlH9K6KVI5KN7kpxVA3dZI hcR5yBaQSRhdw== Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 1D190854D0; Tue, 3 Jan 2023 00:42:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1672702947; bh=5qW+C/0ENRniJw0WFaYCYKebcxOk1QyOWyJruz7LHEY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=deTO0zFAaDH/nfcou3//boqraKhI5Lp8W68WoxwUHOSKD6uApvoptVww3AWKKXIP+ hoRn+7NRQCVinxL2+RGmHxlTg4bodq5elRrzzSVCAY25Wub1V/u1DWDLxQgko9qmbg 5kaFREVkbcjnZmj0278u/BaGvKBb0+8piNRlG1IV0vQMl0uVQuP/GrjhCNgINBXOlq r7hZ3A9xkYijkU2nndqzTG8iKRgQKu0khRf0bscGNU5K1jCAodwhuCeWWizY0K5pwt +QCecptBfz3zfyYzaCwScuMIs5n2Bz07Ph4D6PLW5RDocEWD0woUF7ZDlNNepLqIoL RJVZFzMimUjug== Message-ID: Date: Tue, 3 Jan 2023 00:27:33 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH 3/4] usb: ohci-at91: Add `ohci_t` field in `ohci_at91_priv` Content-Language: en-US To: Sergiu Moga , michal.simek@amd.com, jim.t90615@gmail.com, sumit.garg@linaro.org, weijie.gao@mediatek.com, sjg@chromium.org, eugen.hristev@microchip.com, cristian.birsan@microchip.com Cc: u-boot@lists.denx.de, Mihai Sain References: <20221223123454.362757-1-sergiu.moga@microchip.com> <20221223123454.362757-4-sergiu.moga@microchip.com> From: Marek Vasut In-Reply-To: <20221223123454.362757-4-sergiu.moga@microchip.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On 12/23/22 13:34, Sergiu Moga wrote: > From: Cristian Birsan > > The `ohci_register` function expects that the OHCI driver's > priv is a struct whose first field is of type `ohci_t`. > The original conversion to DM did not have it and this > inconsistency revealed itself whenever U-Boot required > multiple memory allocations resulting in a memory overwrite > of where this field would supposedly be. > > Thus, add this missing field and automatically increase > the implicit size of the driver's priv to avoid whatever > future memory allocations may take place from overwriting > it. > > Fixes: de1cf0a9c6 ("drivers: usb: ohci-at91: Enable OHCI functionality and register into DM") > Signed-off-by: Cristian Birsan > Signed-off-by: Sergiu Moga > Tested-by: Mihai Sain Either squash into 2/4 or -- if this should be applied on current release -- submit as separate patch.