Message ID | 20211103090255.998070-4-jens.wiklander@linaro.org |
---|---|
State | Accepted |
Commit | f18397ab3ae23e8e43bba9986e66af6d4497f2ad |
Headers | show
Delivered-To: patches@linaro.org Received: by 2002:ad5:5208:0:0:0:0:0 with SMTP id p8csp392898iml; Wed, 3 Nov 2021 02:03:04 -0700 (PDT) X-Received: by 2002:a05:6512:3d0b:: with SMTP id d11mr25499622lfv.481.1635930184190; Wed, 03 Nov 2021 02:03:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635930184; cv=none; d=google.com; s=arc-20160816; b=qJsm1QbM5t/iq8L6yxMjk7/8LGgrDIAY0Un1hRSNKZpsagxVjhSy1D7M+4unJsKGEs 6fvUBpwHthyCu9vS1PMCDe6dGQMOTHM5RjrHu3jzzGzq2lr9lsk0J/62kEvdozhn29e+ F7qLu4QoXdgFNzZoK2jhi+7JP5mbjyYQCA2M6uG0KFZoudjSooIXECUJgTNqKH2CK2J5 4KbfpxB48ui3qkBkkai5OTUnhG1z7rsKFj+YZwJKf2BExpEkwVs5HCHCWCIjPPSwcm97 oFCzUpeb2qcULDO2bcAXx49hHghn5/wK2T2bJSStZ69h294pQsmvzo7JMvpIKALudmE3 eBrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=wDFhL54jBz3G05V/OraPaakr11gEhiPI9haVEV4Ys5E=; b=lkqD0dCMpcxgmd5E6YaBz2/PPuFB0lrcuOctUByWEb+iL0Smfn+TFC1Dd9MLBVSNA0 n2jisaSVue6VbaZthXWiIQoAGZ4OLslhGdejILs6R+MBuqWrPYkjkubx4n7scGVOcMNP tGk99jmcMc1iS4OCDMzNpu/ukZn83sxBJnPl7Pj1GtF47Zpo/TYgrESi1jzlO2dMWBTq lr7RE+db4k3VufubaXtoONDFRcXhV6buPBYqlFN24xPwNZMS/e/Qh060vRY4sZc2pu+j +i0bGPfZxKAHDDWPG4XXPJ/hs7x2Iy8Ce4sq7MBVRVGOuQYPsKHDHJ/Ax844EiVu7G10 5/xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JrbkOJN0; spf=pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=jens.wiklander@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <jens.wiklander@linaro.org> Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a6sor745598ljq.29.2021.11.03.02.03.04 for <patches@linaro.org> (Google Transport Security); Wed, 03 Nov 2021 02:03:04 -0700 (PDT) Received-SPF: pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JrbkOJN0; spf=pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=jens.wiklander@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wDFhL54jBz3G05V/OraPaakr11gEhiPI9haVEV4Ys5E=; b=JrbkOJN0AVTm6aU03vDx3RA7J3nBQq4dZa143tOdEgrSo7btHpTOx99WIZ/Ux9cVAI P4y1XDNIgA+r0IulEXK4zuoXLG5PAPr5bc9n6widMRrpCG+vIrQIkNOlIimZgXPkgsZq tG7os6N3rCTTTlwnplk24JpP02zL/aP6hFgKgtJdb8kmF/yM/Qxx10WXQz4GSsXcuH76 OXlNleVoGGpr1KaXJdrMvws8NoRfIoxTcPVYbHGHSkTZUC8Pt+WzWxi79zukB3Swp+SF 1Ul/eZQRyUinBps9OsfaaQrMNS+AwOiskYcVb9gyowMOWDyGhF6wBIHTH6mjoehruamB zyzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wDFhL54jBz3G05V/OraPaakr11gEhiPI9haVEV4Ys5E=; b=KJZH9P7iZRyYNHSjBQ1kklSQRvSSZshgqJZmo0WT7UKlRYBHUOeL6qQFnr5SiQsSHj 2EL8ea7y+b5HI6HG1ncZmDBv2XHftakV4gDsiFWsSD+Y2nhT7ahXVmJSgRSnkiABXI6+ O8JOFOfjCEbSDUf9i26iyrQIz2O0alXAK+ySsDqkaq+PNKVecoQ9ubt2qcTTa2Xy+HCe s0IxyIbskwk3PO3Zhw8tXUXnFKmM0wVFFP37xuHHJHM216tELt00v5wz0mcdnPNxNhAj g5HP9k8w+Z5qbOSq4vL2jwJiREsWdHN/2xuzx/R76jqaO8dNtt89/O8Ps/skocFlUl3V 9y1A== X-Gm-Message-State: AOAM5324Qg7KR/6rKOu/DbrZnhnrux3peMpM/AL3wGIUO7Tq8mvf3Zwj vJ6VewHQFJDXKWH6xMI4q3WN0Nmh X-Google-Smtp-Source: ABdhPJy2IrqOF3ogwb+7EqZn1rFu3bhrk8vJtGRNZ5plknFzvRDWYEdyK53VxBLOuXPASCA5Skn+bQ== X-Received: by 2002:a2e:9e13:: with SMTP id e19mr45531615ljk.494.1635930183843; Wed, 03 Nov 2021 02:03:03 -0700 (PDT) Return-Path: <jens.wiklander@linaro.org> Received: from jade.urgonet (h-94-254-48-165.A175.priv.bahnhof.se. [94.254.48.165]) by smtp.gmail.com with ESMTPSA id w16sm124373lfr.233.2021.11.03.02.03.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Nov 2021 02:03:03 -0700 (PDT) From: Jens Wiklander <jens.wiklander@linaro.org> To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, op-tee@lists.trustedfirmware.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org Cc: Jerome Forissier <jerome@forissier.org>, Etienne Carriere <etienne.carriere@linaro.org>, Sumit Garg <sumit.garg@linaro.org>, Vincent Guittot <vincent.guittot@linaro.org>, Rob Herring <robh+dt@kernel.org>, Jonathan Corbet <corbet@lwn.net>, Ard Biesheuvel <ardb@kernel.org>, Marc Zyngier <maz@kernel.org>, jens.vankeirsbilck@kuleuven.be, Jens Wiklander <jens.wiklander@linaro.org> Subject: [PATCH v8 3/6] tee: fix put order in teedev_close_context() Date: Wed, 3 Nov 2021 10:02:52 +0100 Message-Id: <20211103090255.998070-4-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211103090255.998070-1-jens.wiklander@linaro.org> References: <20211103090255.998070-1-jens.wiklander@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit |
Series |
Asynchronous notifications from secure world
|
expand
|
diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c index 2b37bc408fc3..85102d12d716 100644 --- a/drivers/tee/tee_core.c +++ b/drivers/tee/tee_core.c @@ -98,8 +98,10 @@ void teedev_ctx_put(struct tee_context *ctx) static void teedev_close_context(struct tee_context *ctx) { - tee_device_put(ctx->teedev); + struct tee_device *teedev = ctx->teedev; + teedev_ctx_put(ctx); + tee_device_put(teedev); } static int tee_open(struct inode *inode, struct file *filp)