Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2506083lqo; Mon, 20 May 2024 07:57:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVwY+maf0nU0rUyKEnOM+xYCk/qjE5x8TAsh9kxuEBZJM9m7WN67/qVr/0r59LH0ot+J8QYtEadDH43hvhGH9kTYUDFVVs8K3jo1wOLNQ== X-Google-Smtp-Source: AGHT+IG1BmJDjjDjanSOsbzPPkKnFNw9N1LoV4CF/IbzX9j9AJMzk6/gnlQ/2keYW5sjDIiu8vJk X-Received: by 2002:a17:906:dac3:b0:a59:b6a8:4d74 with SMTP id a640c23a62f3a-a5a2d3bebeemr2375070166b.0.1716217072204; Mon, 20 May 2024 07:57:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716217072; cv=pass; d=google.com; s=arc-20160816; b=IH48pHmx0PApaN0wBufLiMGL+oDUKwTk1mgMvwOZZCYIJuETaQORlPTMBwFDZ+NnSD gF+i+xZkIe+BqmpEOmsxoEwFL0SK69OVMsYW6iouXRMSPh7JE2djQXtwkJWj+LwVxNnV CNwFeo8o6I5OlgHZOVZB+4Xir4Ldrpi1kxLCAtkR5Fflzn+lTsMMxdaKxQFycZ3JD/+2 znJrtUukFwZmlGiREJdWadRFFChZo44JprYdtSBPN466D1Oek7EcAG0mv5EEIAik0xc0 /PCIaBsMHzzV1ZmRY0W6ZxVet2G8vpXokruDoCfUcLOLh5ccCHIhUzYc9Lp/4MHe9bep ufPQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=pqExNRlZ9YMgYlHmBKpnUxOb8arKtC+EULy04/MTidk=; fh=NPneWzOXVoHx0KHPuc3dkdnABDm7OaeYQ0ws5tKCRqI=; b=hBfcW0IVPTYi7BQtCEv4316mt6Bunio8EoZeesFc7s76ARrYtepniVLhyufO8rztOv ElOBkTmGQ20LVp+cLrCf1an+ElY+hJjCIbl3uTXegKh3k7/+4BwwWWaGPgiz1shzr5vB RQthDqAbXX2e0tiBlIbKeCsobAr6GUhbpy6K2AtdYYCt4j7LYiOy2Iwe8bVESQ6odh0O KmuYvvuOMIYv/lqx816HvUEb7Ma0qv41JxWBNiJvdGLgNRpGh5NmSXQDMPWu4unynlUW pb27H/4QY6g91BeznRotYueXBalp3Tn7YBkllFLFxy62F1Jf7YW8qpaP5aOk6voNy6UA kR8A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=fintech.ru); spf=pass (google.com: domain of linux-kernel+bounces-183857-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183857-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17bfc555si1312034466b.870.2024.05.20.07.57.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 07:57:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183857-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=fintech.ru); spf=pass (google.com: domain of linux-kernel+bounces-183857-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183857-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 273031F2324D for ; Mon, 20 May 2024 14:47:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 108F4136E06; Mon, 20 May 2024 14:47:25 +0000 (UTC) Received: from exchange.fintech.ru (exchange.fintech.ru [195.54.195.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C93145026; Mon, 20 May 2024 14:47:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.54.195.159 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716216444; cv=none; b=fe0d5sphvEl4ZOU4ZilSkPrRKAfI5Q/A5all0UkBwQRX5EEn2LFkDENakLWPuyNN3EPYhVbw9LYDQcUVXEVmP9F8rItzp++C4p6Zq0aibK+xMk6Eunxbh3eRk3yQ2OxB3EuvqhrIh0ptNnHJmmozo9Ys79jeHqyXU1O/1nuIUHQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716216444; c=relaxed/simple; bh=NszCYuGG62vA2thKcJ8SoYDRFimKvFGOM29xafLKn54=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=MF8uMF+4J/0tY9u+S4D4arEfEPA13cNMZ8/NAP98TP0fSID1fPMkkD7Jc0lD3WdokmIMnaAlIQWTrajyEb5mFl4/FCv+7q/eArNm5XXNHi9xY7pOcPyWvw2UtgEhHaqyabgou0hur2ptq4CM6XsJQr5IXKmvTAqG5pqlRAZANuE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fintech.ru; spf=pass smtp.mailfrom=fintech.ru; arc=none smtp.client-ip=195.54.195.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fintech.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fintech.ru Received: from Ex16-01.fintech.ru (10.0.10.18) by exchange.fintech.ru (195.54.195.159) with Microsoft SMTP Server (TLS) id 14.3.498.0; Mon, 20 May 2024 17:47:11 +0300 Received: from localhost (10.0.253.138) by Ex16-01.fintech.ru (10.0.10.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Mon, 20 May 2024 17:47:11 +0300 From: Nikita Zhandarovich To: syzbot CC: Nikita Zhandarovich , , , , , , , , Subject: Re: [syzbot] [staging?] [usb?] memory leak in _r8712_init_xmit_priv (2) Date: Mon, 20 May 2024 07:46:41 -0700 Message-ID: <20240520144641.17643-1-n.zhandarovich@fintech.ru> X-Mailer: git-send-email 2.25.1 In-Reply-To: <000000000000809328060a8a4c1c@google.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: Ex16-02.fintech.ru (10.0.10.19) To Ex16-01.fintech.ru (10.0.10.18) Hi, > BUG: memory leak > unreferenced object 0xffff888107a5c000 (size 4096): > comm "kworker/1:0", pid 22, jiffies 4294943134 (age 18.720s) > hex dump (first 32 bytes): > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > backtrace: > [] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline] > [] slab_post_alloc_hook mm/slab.h:766 [inline] > [] slab_alloc_node mm/slub.c:3478 [inline] > [] __kmem_cache_alloc_node+0x2dd/0x3f0 mm/slub.c:3517 > [] kmalloc_trace+0x25/0x90 mm/slab_common.c:1098 > [] kmalloc include/linux/slab.h:600 [inline] > [] _r8712_init_xmit_priv+0x2b2/0x6e0 drivers/staging/rtl8712/rtl871x_xmit.c:130 > [] r8712_init_drv_sw+0xc3/0x290 drivers/staging/rtl8712/os_intfs.c:311 > [] r871xu_drv_init+0x1c6/0x920 drivers/staging/rtl8712/usb_intf.c:386 > [] usb_probe_interface+0x16b/0x3a0 drivers/usb/core/driver.c:396 > [] call_driver_probe drivers/base/dd.c:579 [inline] I am inclined to think that this issue might be false positive. During repro the device is initialized correctly, does some work and then exits, calling all required functions to clean things up (i.e. _free_xmit_priv()), including pxmitbuf->pallocated_buf. Kmemleak triggers disappear if you set longer intervals between scannning for them (obviously). And if all the things get cleared up when the device disconnects, isn't that correct and expected behaviour? Could the scanner just "lose track" of some of the objects here? Or am I missing something? Regards, Nikita