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 X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 680AFC433DB for ; Thu, 18 Feb 2021 20:04:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BBBB464EAF for ; Thu, 18 Feb 2021 20:04:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BBBB464EAF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2PLQHY3piaLGgbAh9OcwCLRlrFs5ZZhqCtU6860AMeM=; b=ZWKQRxYXaJHrEdcYDguur1KDYa JqTiDx2o2TBuidvEzWXsGF55N/aHE2NCzkeJiyMLIt1L0BAB5fO4W79UyP+6YDpggPycUtRRENx9j yZKX5uFt2APrZN/imkxYI2t20SjqUXBQdpQb5och9x7/ogFxxFigiHHhdcTrIJGSGOPyla2i033Ov 9X62N2DJgVGwCFNRpzFldg//0ur9M1uTdjGcGHxVpdXDC6v/BB0gHJctT5kqctD0p29TBY6sPjjaZ 5oQ0CW3s4LYARbX3hr28zWvDrFZHSE3f/kETknf+w7J0BpedUAZRnU1iWytRHU5bIb8aAKBHkWC0W 4QQPEjmQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lCpWF-0002UB-09; Thu, 18 Feb 2021 20:03:23 +0000 Received: from linux.microsoft.com ([13.77.154.182]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lCpWB-0002Tl-WD for linux-arm-kernel@lists.infradead.org; Thu, 18 Feb 2021 20:03:21 +0000 Received: by linux.microsoft.com (Postfix, from userid 1046) id 6DD6A20B6C40; Thu, 18 Feb 2021 12:03:18 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6DD6A20B6C40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1613678598; bh=DZjo1NRFHw7RTdtEBJokhTw9Q/8766pMEGltMN/Ti/w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dNcUB+t/DBJc69TqIwLrUU0VVPQNCOwcQ1QKMhTA18HPD6nmdFcX/EyAbMCemTFiA THQTnlol+QnJnBJm6VkvsFBdZybpGKmBFe82RkYZnhz//s1p+52uED2iQlFmk0xT6N LMq07VwU9LVzisbpd5eJ42PF7BlF9oZ1YR8NM0aY= From: Dhananjay Phadke To: allen.lkml@gmail.com, jens.wiklander@linaro.org, zajec5@gmail.com Subject: [PATCH 1/2] optee: fix tee out of memory failure seen during kexec reboot Date: Thu, 18 Feb 2021 12:03:15 -0800 Message-Id: <20210217092714.121297-2-allen.lkml@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <20210217092714.121297-2-allen.lkml@gmail.com> References: <20210217092714.121297-2-allen.lkml@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210218_150320_494960_0748573D X-CRM114-Status: UNSURE ( 9.44 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, op-tee@lists.trustedfirmware.org, bcm-kernel-feedback-list@broadcom.com, apais@linux.microsoft.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Allen Pais On Wed, 17 Feb 2021 14:57:12 +0530, Allen Pais wrote: > - /* > - * Ask OP-TEE to free all cached shared memory objects to decrease > - * reference counters and also avoid wild pointers in secure world > - * into the old shared memory range. > - */ > - optee_disable_shm_cache(optee); > + if (shutdown) { > + optee_disable_shm_cache(optee); > + } else { > + /* > + * Ask OP-TEE to free all cached shared memory > + * objects to decrease reference counters and > + * also avoid wild pointers in secure world > + * into the old shared memory range. > + */ > + optee_disable_shm_cache(optee); Calling optee_disable_shm_cache() in both if and else. It could be put in front of if(). _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel