lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sun,  5 Nov 2023 11:45:01 +0100
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     rostedt@...dmis.org, gregkh@...uxfoundation.org,
        keescook@...omium.org, willy@...radead.org,
        senozhatsky@...omium.org
Cc:     list@...l.com, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: [PATCH] drm/i915/uc: Simplify an error handling path in uc_fw_rsa_data_create()

i915_vma_unpin_and_release() is already called in the error handling path,
there is no need to call it here as well.

It is harmless, because the 2nd call will be a no-op, but it is cleaner
and less verbose.

Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
 drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
index 362639162ed6..228c58f38489 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
@@ -1216,7 +1216,6 @@ static int uc_fw_rsa_data_create(struct intel_uc_fw *uc_fw)
 	vaddr = i915_gem_object_pin_map_unlocked(vma->obj,
 						 intel_gt_coherent_map_type(gt, vma->obj, true));
 	if (IS_ERR(vaddr)) {
-		i915_vma_unpin_and_release(&vma, 0);
 		err = PTR_ERR(vaddr);
 		goto unpin_out;
 	}
-- 
2.34.1

Powered by blists - more mailing lists