Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1148113pxv; Fri, 9 Jul 2021 19:32:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwo4bqboTkjauSRMjKGO/6lcjbWOZMU29eh0T3zlGGEfPstmUY5nE48qF3KykZWvwXlsVBY X-Received: by 2002:a05:6402:1591:: with SMTP id c17mr25332572edv.146.1625884377473; Fri, 09 Jul 2021 19:32:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625884377; cv=none; d=google.com; s=arc-20160816; b=M65DNOWEJbDxhuCWJ5mi4k5/hUnsuGA18RymUohJ2v5M1Jx1FYB4POCl+Hu+++VUve gqY34oFiyjAGBSMqkzBuSFmhnSb+nfz/OslACM4Vpd7/ZBdo+bwh89hNRUAnIUewSLu3 WOBsVtTWy5Zi2yMQKPjy5q4GKX8+ueVT5T1xwZWa4WECZOLOKntNs55FUuRScbfvquD/ mB3hv6v+vLhaQ2GH9wLeDSB2pxMC9f4PW26iMQIiEFhW6v3BiFifa4tC6AcNifCpWYez shj7o4H+MfpVKJOleyRW9vb4GDU4mYQb6wvseksOq29FZuqnIsDW1JECdhSwtHcjMaPM Hamg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=inX6mkJdoHfjk+DwLaBH1OWScPd7tT+YrSJBQG7M8C8=; b=VxIccJhA7rHo8hGMVIamGInTQXc0UXwGYSCY7oa7sHZkIaXaKUttyOVnMurBvBTMQB l75dSlfqi9oYQoDfq7+VsDEYi0mHAwTONIXWbMGKyOM9ttM8jGckt+UaPj2WYRTJO3Iq zoTci+zcagllaHLLyuiI2ICoWBnFVKiWcdvZFs9W/7RITsicArWAKo4kylY155DbEfoS MCksAV4dJ6UL55xXXpTSj/YPx217ijoMwzCu/ge/68kGfueYeAESjyoTuXb3dgQ/LDHw pUtHRVYjdVCOdi0bqm5wepxCJs7IRlS1RWbqOvmhHvaBwquqdKOtMIU8Jg2sHhykfqC7 VRIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KZCTNXHG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u6si8639996eju.284.2021.07.09.19.32.34; Fri, 09 Jul 2021 19:32:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KZCTNXHG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232422AbhGJCdq (ORCPT + 99 others); Fri, 9 Jul 2021 22:33:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:42542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234440AbhGJC31 (ORCPT ); Fri, 9 Jul 2021 22:29:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CABDD613DC; Sat, 10 Jul 2021 02:26:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883992; bh=MPu6yhW027A+a3bpr3RxNiEK5BOI8kgsJdNz0Na3NPQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KZCTNXHGF2IGPlBo9j4fGSRf5s4FSSjJEOaRdiwz5roF/hqZxlXjGBZ9o2pGpt5Oc 1H5WB6ddbDUidjdDJvU3DTcEqhm1W2LZqMMqoh2wV5le57gwywxoFQhQTLOxGTI20p 4PjzK+2128Ad1DzB8ZlNVkcN59U/ZlKIdWaEPjr9Vz0RowYmkHYbpuS0pM81LMV/Gn e4f6tAHdoZM8XL6bTTI40BxADZtjZbQwVhmwDF75iUN8WCrVCVxCswCkceolsI3Ns3 caYvEo75QYpJs/iwYwmHjSgpfVZ9XeV9hH+HNwcsvje8iXLINdjbY4OAwCzGg9lzfY QPh6YP8iCPbQQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Koby Elbaz , Oded Gabbay , Sasha Levin Subject: [PATCH AUTOSEL 5.10 68/93] habanalabs: remove node from list before freeing the node Date: Fri, 9 Jul 2021 22:24:02 -0400 Message-Id: <20210710022428.3169839-68-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710022428.3169839-1-sashal@kernel.org> References: <20210710022428.3169839-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Koby Elbaz [ Upstream commit f5eb7bf0c487a212ebda3c1b048fc3ccabacc147 ] fix the following smatch warnings: goya_pin_memory_before_cs() warn: '&userptr->job_node' not removed from list gaudi_pin_memory_before_cs() warn: '&userptr->job_node' not removed from list Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Signed-off-by: Sasha Levin --- drivers/misc/habanalabs/gaudi/gaudi.c | 1 + drivers/misc/habanalabs/goya/goya.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c b/drivers/misc/habanalabs/gaudi/gaudi.c index 044b2ae196f9..37edd663603f 100644 --- a/drivers/misc/habanalabs/gaudi/gaudi.c +++ b/drivers/misc/habanalabs/gaudi/gaudi.c @@ -3708,6 +3708,7 @@ static int gaudi_pin_memory_before_cs(struct hl_device *hdev, return 0; unpin_memory: + list_del(&userptr->job_node); hl_unpin_host_memory(hdev, userptr); free_userptr: kfree(userptr); diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c index 986ed3c07208..5b5d6275c249 100644 --- a/drivers/misc/habanalabs/goya/goya.c +++ b/drivers/misc/habanalabs/goya/goya.c @@ -3190,6 +3190,7 @@ static int goya_pin_memory_before_cs(struct hl_device *hdev, return 0; unpin_memory: + list_del(&userptr->job_node); hl_unpin_host_memory(hdev, userptr); free_userptr: kfree(userptr); -- 2.30.2