]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/tee/tee_core.c
macvlan: Fix leaking skb in source mode with nodst option
[mirror_ubuntu-jammy-kernel.git] / drivers / tee / tee_core.c
index 2b37bc408fc3d7a293bde9c849bd625ca1c0b553..3fc426dad2df30fc78677d7a441f25dadd64404e 100644 (file)
@@ -43,7 +43,7 @@ static DEFINE_SPINLOCK(driver_lock);
 static struct class *tee_class;
 static dev_t tee_devt;
 
-static struct tee_context *teedev_open(struct tee_device *teedev)
+struct tee_context *teedev_open(struct tee_device *teedev)
 {
        int rc;
        struct tee_context *ctx;
@@ -70,6 +70,7 @@ err:
        return ERR_PTR(rc);
 
 }
+EXPORT_SYMBOL_GPL(teedev_open);
 
 void teedev_ctx_get(struct tee_context *ctx)
 {
@@ -96,11 +97,14 @@ void teedev_ctx_put(struct tee_context *ctx)
        kref_put(&ctx->refcount, teedev_ctx_release);
 }
 
-static void teedev_close_context(struct tee_context *ctx)
+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);
 }
+EXPORT_SYMBOL_GPL(teedev_close_context);
 
 static int tee_open(struct inode *inode, struct file *filp)
 {