Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4723051rdb; Fri, 15 Sep 2023 10:13:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH5jHKPAZQxLto/DldgreOObGlVO+EtTMXeWBimU5PKUl6Q/iJM59Mm4E9kAvwr0UgOJJyQ X-Received: by 2002:a17:902:ef91:b0:1c4:c4f:b05 with SMTP id iz17-20020a170902ef9100b001c40c4f0b05mr1798453plb.45.1694798034899; Fri, 15 Sep 2023 10:13:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694798034; cv=none; d=google.com; s=arc-20160816; b=nSUtUyTeCeHLZZX8TUCCPbP/DLZj7U3xATaqAXQ3m3cSpqNCnNJMS2QvKWNixygnRv Uvp/VT9lBDjVUyzTfZrGBx5i9ViuQkIlH0PUwJKd6A++U7z9LWBMLBQrrGUzOpncx9IO YqyoJRRV4ojhuvQISX/MmPB9WJ7d19V4VL48K7B860dHpB7Jbgy50zx/zqF62YhzTcdX FPuhWcOHt7PuTEkNuVqu1tKnhIpf4neFBCyLbtwSTWDhdgZ+nd6zfANW/KxfkmdIw1Xr CtQyMFNwzWtPLLy08jP6j0meOmA5v4By1aHjreOHdNOBV3VBEn4MDHgiyTJd4D/k6EYW aYmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ygwFlgRkW+SZwTXzXvL+Qfa5clStUbHzlN7b9EM5/oI=; fh=ORNJH5XTzTVRaNqGvfXHlOf3xVUkZX4n0lVGT+SC7BU=; b=u+LiqxIbUkkf/JyqwCMMC0D7aSWkwUMrFauCBGF1NU1cq0R1HVgL7wJb52uOra9DJP RTo+NPEHnGYL7fL51elmaY+Vwz/Vee6cxHTHzJTtk3LkEeUwgPp4gwa/OdUYIy/nhcy6 KgbrBzo0L3vttx0PaOt8qf0DdldJuvhPpWVV8Dx/tw2G3K4CxkaZdusCe9Idl5m6cVru SlYuB2bcn5tHN6Jag599PBZkFabUIoB6EJg5lLptVIfgae5isVbk5AribFv86EyjQb2q m3LgYxAvo+LE7PezSYX2rC8eVDw510SFE0/gSC3iSNyM4nm0w59QoV3rKTrggic4xNzX 5bMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=EkebDpzU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id p12-20020a170902c70c00b001bdc8611801si3555663plp.186.2023.09.15.10.13.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 10:13:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=EkebDpzU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 880D083DD688; Fri, 15 Sep 2023 10:06:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230179AbjIORFj (ORCPT + 99 others); Fri, 15 Sep 2023 13:05:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234971AbjIORFK (ORCPT ); Fri, 15 Sep 2023 13:05:10 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 450592700 for ; Fri, 15 Sep 2023 10:04:31 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-31c4d5bd69cso2239136f8f.3 for ; Fri, 15 Sep 2023 10:04:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1694797469; x=1695402269; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ygwFlgRkW+SZwTXzXvL+Qfa5clStUbHzlN7b9EM5/oI=; b=EkebDpzU39nqNQej7wDQruu43J5sZzmve9qGE3xTEMhYOn+hiV/EJKphw/uy7sJcsp AdYJ9Dvt9OYnGTb7G/djghZCtx8VzdyHHef/mLIbPncaJdtZhPEzFJG3YEjp8fXgsVHb wNBXFbnnSuzGncI4VCFFVyx8niYn/MTWvXlmU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694797469; x=1695402269; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ygwFlgRkW+SZwTXzXvL+Qfa5clStUbHzlN7b9EM5/oI=; b=XIMAoIBz6+TQ3LjwegOHHbUDkNpC7Pn4rmg2jZTvh+mXGX2Pj8shfK4ae3lGiXgt2X BYayXMje9xgNPitOcNrlePNfwiWQe7wcSVa61ON9OGfROH6ANLKL3U3iOSMRu7OYwIWz PmAdvfxJyd1v9n61yp4vRajj7pHZhlTXa81gNcbbTAOzWKto+ote/UnAeL9XP1gWbwse kAGcfUUkBK8RB4OMU99n5nze+YXdJRUYdlVKPL4b9a9xFxnXfj3OAjTyZTXFsLNl+oA9 QbZR5TZmSXi7P+GQs5PVz98YW4oNzO/HRZh7SmDWzeAbbbQRhsu9bWlEM51h9Y7vnrWO 2XvA== X-Gm-Message-State: AOJu0YzIp9QzoqN8HAUJvf9VKJ3cqs0PLHrfbMqsWFNJz1yYg+6fcm0D RQZVZJ1JEjclqHRjHyjPRfXuvezYiRRANEzzdzSwpbaH X-Received: by 2002:adf:ce11:0:b0:31f:edca:b8d8 with SMTP id p17-20020adfce11000000b0031fedcab8d8mr1772984wrn.13.1694797469343; Fri, 15 Sep 2023 10:04:29 -0700 (PDT) Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com. [209.85.208.43]) by smtp.gmail.com with ESMTPSA id w21-20020a056402129500b0052c9f1d3cfasm2515538edv.84.2023.09.15.10.04.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Sep 2023 10:04:28 -0700 (PDT) Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-52e5900cf77so2869741a12.2 for ; Fri, 15 Sep 2023 10:04:28 -0700 (PDT) X-Received: by 2002:aa7:da03:0:b0:52e:1d58:a709 with SMTP id r3-20020aa7da03000000b0052e1d58a709mr1618992eds.40.1694797468151; Fri, 15 Sep 2023 10:04:28 -0700 (PDT) MIME-Version: 1.0 References: <07c32bf1-6c1a-49d9-b97d-f0ae4a2b42ab@p183> In-Reply-To: <07c32bf1-6c1a-49d9-b97d-f0ae4a2b42ab@p183> From: Linus Torvalds Date: Fri, 15 Sep 2023 10:04:10 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Buggy __free(kfree) usage pattern already in tree To: Alexey Dobriyan Cc: Peter Zijlstra , linux-kernel@vger.kernel.org, Bartosz Golaszewski , Linus Walleij , akpm@linux-foundation.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 15 Sep 2023 10:06:21 -0700 (PDT) On Fri, 15 Sept 2023 at 02:56, Alexey Dobriyan wrote: > > __free() got some usage and some of the usage is buggy: Yeah, that's sad. I think the '__free(kfree)' thing should *only* be used in the form struct obj *p __free(kfree) = kmalloc(...); which is what our docs mention. Anything else is simply buggy. But how do we *notice* this? I do want to stress how I was unhappy about this conversion to begin with https://lore.kernel.org/lkml/CAHk-=wigZt6kVkY0HU1j_LJ5H1KzwPiYnwwk6CbqXqT=sGenjg@mail.gmail.com/ but I reacted to the wrong issue. This stuff needs to be done *way* more carefully. Linus