Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2388024pxy; Tue, 3 Aug 2021 05:25:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyI+XLHHDMfRGzaOwPXoE9tB/u9S5XhjP8pl2PSqAmIS/8V5XucUs7dEdNd7U6hEwyeLoOl X-Received: by 2002:a50:9e82:: with SMTP id a2mr20711611edf.115.1627993516805; Tue, 03 Aug 2021 05:25:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627993516; cv=none; d=google.com; s=arc-20160816; b=p5y6q8h7IoU5ly/Cw4DynN1IN8bYB+jB6uV9bnOmbhl4UCJbdDdGL+Kw8M+FSyHcbp pWbDfyqO3n4cTplIfl/kcCWXhKtJ+tVtr1ZOHDrCQtjtIz73mW+/vlYUOuZzFST8ONYo 3JGtd9ffci5EBw4tnPF82UooAmGv/g9U2+kLkJyws/WPxv5KVt5TyzVJAnvZXcYGTqnB NOw6pPrUQvtWjZFFBKJ9pZYASfarOhOrDEJWlBFV2uesPm/Wr/7/KNL2xFLywLMQAjlH 3VD2bjK2Kz+cJnAWJFlTPlz7Pg6NA2YDuMkOgPCCB1TcswLZ/Y7ym4ZQpJCf2yLxegRj qqIA== 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=XtlBN5e/EVpe5xwv2aVry/eQDKWqwL83Vio3Gr+T1UA=; b=A7j4mpCPQlz15txiBype8xHSvK/D/pU1FNmIRHmSjG+nHC6XFcMr/2Edxn3+FCtKos cdHwjPZZy9yxW29EN+o++sN0/jvr0DletLi/D4Pgx2vGkIWwvdWVMFm4yUtDa56+qZ+1 c/cA2K4T/5JEh7jxYpRzB8Gn6e6GLf2YsKfKU2aRufoixeW9XMxAJUMQlKY7U6WdSBOP j9WBDk2OI/148635ShLIc28DUlLaGf6DXpj3hH98Uuw9/CTfu+/EP0gsD/sIvqhm4wac 0RdAsTWLNARv4PbmHqgSr9oxhRnjHUo1s0dRyqfg2D5r3c5IOf5J2/RLMhkvMqIuAqeF dnBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MDI+Ew8C; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rv25si13362651ejb.101.2021.08.03.05.24.53; Tue, 03 Aug 2021 05:25:16 -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=@gmail.com header.s=20161025 header.b=MDI+Ew8C; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235744AbhHCMXl (ORCPT + 99 others); Tue, 3 Aug 2021 08:23:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235573AbhHCMXk (ORCPT ); Tue, 3 Aug 2021 08:23:40 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 831AEC061757 for ; Tue, 3 Aug 2021 05:23:28 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id hw6so22178665ejc.10 for ; Tue, 03 Aug 2021 05:23:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XtlBN5e/EVpe5xwv2aVry/eQDKWqwL83Vio3Gr+T1UA=; b=MDI+Ew8CkVlcfRk09T7+lidlFk5Se+Ws6iehNSQhtwW5KrOnmtn/0m8QeRTLIFO3GY H2Twro7MvsBZLrgje+WVN3RVG/w0CC1kaG2DsUUDDpOZblATI+PicPhly91dTSNjVCj0 2IBf1jaM8MHnTlfnqqVjxJmU3EZKvI9HN1GAZ5IlXEHODyYq/xMa7TL7LSMZO8M98Lzr FqIFeu86o3y5duVTTzCWIl5eSmiYDHHvAEsrtBk33JQ8qL4S81NvKGIw34RlA4bjEhke Wx1xKOSrh9b0MtsUWjN8o+9LqUnwZAlquEYqCl/egdFNn0lvT1w9QXieL04GrVCMW1wX YT0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XtlBN5e/EVpe5xwv2aVry/eQDKWqwL83Vio3Gr+T1UA=; b=byGvx6Qe425cN0m0aU50+L6xhorS+5oN9be3Jv1nUaOu6bICaM/8h0HIuPX3oO8gBV wup3gatXqt4GLxZTUVO5gkG2kO5YZsk8Slybapf0bOPl3kGUFaVQ864bAfQMeCmDU2PU e6tGxw5ChomZAWHvykvNbvywYxYps4389ZW9o24yxxn3U+7KM+AfkRGh4gHemfUoznO1 wZxQLyMm91kEWQFoznTN/T3b1gTGOUlfgoK3qsShYzkPVeZ3b/D10EGCrGYxiP39nKJx tCKFqdIDfg82/vBarp+OEEe16AIXKdl1V9HMz31SX4Vo3JwfH0//kKMZVD6sk0IlBCpz 5ewg== X-Gm-Message-State: AOAM532ItXcFE3+ql9LFL5nHFw8Eic+pCJc/uBePlxQPScz1/vw43N2L BAHZedeSWo5WVs0un9tREI0= X-Received: by 2002:a17:906:9c84:: with SMTP id fj4mr19921594ejc.180.1627993407065; Tue, 03 Aug 2021 05:23:27 -0700 (PDT) Received: from localhost.localdomain (host-82-51-42-96.retail.telecomitalia.it. [82.51.42.96]) by smtp.gmail.com with ESMTPSA id s12sm6142403ejz.36.2021.08.03.05.23.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Aug 2021 05:23:26 -0700 (PDT) From: "Fabio M. De Francesco" To: gregkh@linuxfoundation.org, Fabio Aiuto Cc: hdegoede@redhat.com, Larry.Finger@lwfinger.net, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: commit c7e88ecbe328 ("staging: r8188eu: remove rtw_buf_free() function") Date: Tue, 03 Aug 2021 14:23:25 +0200 Message-ID: <26260563.P9vmH3Ooqy@localhost.localdomain> In-Reply-To: <20210803072129.GA1422@agape.jhs> References: <20210803072129.GA1422@agape.jhs> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, August 3, 2021 9:21:30 AM CEST Fabio Aiuto wrote: > > Do you have any idea of what happened? This > topic could give us all deeper understanding > of kernel memory management. > Hi Fabio, I've just briefly looked at that c7e88ecbe328. I have no time to dig it deeper but at a first look it seems that the following line is the culprit: kfree(&pmlmepriv->assoc_req); It should be: kfree(pmlmepriv->assoc_req); The second line frees the memory location whose address is saved in assoc_rec; the first line instead frees assoc_req itself. Regards, Fabio