Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp8124327rwi; Tue, 25 Oct 2022 02:50:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5fJY0kZTEegxC/58erMeRdMHHURBQVW8M6epkEwMrmifEA44CM+7QVF0R5akywdpOY6Iac X-Received: by 2002:aa7:d9d1:0:b0:461:9556:23e6 with SMTP id v17-20020aa7d9d1000000b00461955623e6mr13395454eds.25.1666691400295; Tue, 25 Oct 2022 02:50:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666691400; cv=none; d=google.com; s=arc-20160816; b=h9L8WrIkcNXMe6Tii5+f6dxyWIp/5L2Y32FXGllu6oZkAhrm7ILlzs8rNwcIdFLNoN Ny4zD7KqWxEdBh6ECGR+tz6R3mNyMyJ/L+mXTDeKG+6qm3NGeo2wzpW+X0a6NxveHk5I mbTtcTenC0qja/aK5KQVHgsPMnLxgFRrsICmr4sa+CFiWwdoVSv6K1Kh/LCquztOwsNK FE2uGlPjlXM3GBC676OhrE+N4yMRkeBeq45pPVicJEgaiZRZXB5dX+dTwrpRzWq36BVb r+IdE3XjDyx5biUVzQKFwBpmNYPZkLUEdfdBNxNuz50GiLnoSx5MAUzzopiF2zQ6k8l8 gwGg== 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=MZsnAEsVBgH1SY91CR++8td8qF2as+jKuxUWas/0RKs=; b=UqZi82ha0Ajgi34kPZvef21/fLnHUqUjcyceqIID2L1ZJyWBlZjC3gn9SNV/WwESj2 /yxB4x9gbVcF+t7m4cOeRTb5tFgHdyV7V8/ByIE53RtQ+aHJwOb4iZDW/j/RuOZm/TVO 2K5Orb7qP609Gpfm7Imkf3vJEhMq3buFSA+UP6RSdPE3D/FrjRpqwOhgZGvjPfp/12Nd CM5A7EqJxdleUrIVUdo7WuYQRjTkfd7bx/EQpIGsg95FDYcrpuM8I3j2SMzS81pWO1Ce JBog6c0d9TBJTg3jVMEX6u3VKyNeok39obYK+iFkh5DSfgV/iiA1VStbJgweLQI0wlgq DdEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Cl79DjzT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f15-20020a50fe0f000000b00452697eda4csi2081167edt.58.2022.10.25.02.49.35; Tue, 25 Oct 2022 02:50:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Cl79DjzT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232036AbiJYJTU (ORCPT + 99 others); Tue, 25 Oct 2022 05:19:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232403AbiJYJS7 (ORCPT ); Tue, 25 Oct 2022 05:18:59 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97B4B16C21F for ; Tue, 25 Oct 2022 02:12:44 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id n12so5484633eja.11 for ; Tue, 25 Oct 2022 02:12:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MZsnAEsVBgH1SY91CR++8td8qF2as+jKuxUWas/0RKs=; b=Cl79DjzTRn03eNRK8pRGb+1+9qKEHx7kjVeCsRj6yDY9YL7wYpqdl8tf2x0/D2AHOe I8oqybJP0UMBnm4fr59i7sQWPu7Sl5IrZ5T8NGNhOWOtVuthXbl8dtBF/GgjGEDz6mu+ 1YaT0i36R7P1uF8QIwOUJ9xqfzdEKsIOzFXyTBM8QKYrpNJdJEfCPHgAnZMmrXz61uD8 mwU3MqcTGBk/dkXb7QVV1T3ZauAt3YABcVh5BO/k/ygdiudD0zgZj/nNP9N5Qkzwb8rC aRp4K23LHOUMnqqXTqj/mtpoHIRqyX961R184lb4TnXIHohD/qDGcFqboazfGfSMU2V0 5oaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MZsnAEsVBgH1SY91CR++8td8qF2as+jKuxUWas/0RKs=; b=WJ/Pl3iTfVZ4wXtYcT1M7FMDG0Cn65NzXgAQSMpk/bkTIUO3brKx9GSN6zNMVRiG6O LWrP9yyIu44BJ9YeXtoHJsuqavubWQYUi3IU6mcoMNvgFiX+vicECcDajPJA6Q46wNMF F52n3oNLoiPkSFob72TIO53ZLGoYsN1f4sWgyvbj7keyrBwSYmjlJsuNIw45054GTibI g58s2A94jq2OkGlYCW4ndK1pb1HLSf2jQLzO+iLMnuXr6y3mdKSAi6K3/+VziQAePJb1 bWSr6Q6QgEoEDiAvmuTcXkyy5rrlwpPoyHKOCRMBLKbeQhKSXtzNSW1IVw/s0clX1IyU 6Blg== X-Gm-Message-State: ACrzQf1tTf7ANYjsPpGLHLQXYZjb6xVobkqu+Mg+PWEP3U+ljH/Nt4DT 7cCvhKWy71ySHuu2h0o8SC8= X-Received: by 2002:a17:907:1c98:b0:78d:3b08:33ef with SMTP id nb24-20020a1709071c9800b0078d3b0833efmr32455822ejc.175.1666689163187; Tue, 25 Oct 2022 02:12:43 -0700 (PDT) Received: from localhost.localdomain (ip-217-105-46-178.ip.prioritytelecom.net. [217.105.46.178]) by smtp.gmail.com with ESMTPSA id bo12-20020a170906d04c00b00780f24b797dsm1061953ejb.108.2022.10.25.02.12.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Oct 2022 02:12:42 -0700 (PDT) From: Nam Cao To: Larry Finger , Florian Schilhabel , Greg Kroah-Hartman Cc: namcaov@gmail.com, Dan Carpenter , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/4] Revert "staging: r8712u: Tracking kmemleak false positives." Date: Tue, 25 Oct 2022 11:12:23 +0200 Message-Id: <26ce206b2c40c7db48c146aa6105789db9dfcc1a.1666688642.git.namcaov@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 5d3da4a20a271e3cf5496a50cbb8118aa019374f. This commit annotated false positive for kmemleak. The reasoning is that the buffers are freed when the driver is unloaded. However, there is actually potential memory leak when probe fails. Signed-off-by: Nam Cao --- drivers/staging/rtl8712/rtl871x_recv.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_recv.c b/drivers/staging/rtl8712/rtl871x_recv.c index de9a568eaffa..4db7eed64a03 100644 --- a/drivers/staging/rtl8712/rtl871x_recv.c +++ b/drivers/staging/rtl8712/rtl871x_recv.c @@ -17,9 +17,7 @@ #define _RTL871X_RECV_C_ #include -#include #include -#include #include #include #include @@ -61,7 +59,6 @@ void _r8712_init_recv_priv(struct recv_priv *precvpriv, GFP_ATOMIC); if (!precvpriv->pallocated_frame_buf) return; - kmemleak_not_leak(precvpriv->pallocated_frame_buf); precvpriv->precv_frame_buf = precvpriv->pallocated_frame_buf + RXFRAME_ALIGN_SZ - ((addr_t)(precvpriv->pallocated_frame_buf) & -- 2.25.1