Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4957467rdb; Fri, 15 Sep 2023 19:10:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IErOatD3dqr+lHOkaSXIj7PXScSS0NzQkyEzLjXu+59IGj44L+NQhtSFrgS03pPAFZq+qEq X-Received: by 2002:a05:6a00:22d2:b0:690:2ad9:1454 with SMTP id f18-20020a056a0022d200b006902ad91454mr4274973pfj.33.1694830256747; Fri, 15 Sep 2023 19:10:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694830256; cv=none; d=google.com; s=arc-20160816; b=yrLHHMTlSHZRvAs74yE/MoFwmf3Mz34AecLDFUPCezA7wstigGtJ4RkgDBEUf9jx9d wj087i1BedMnFFaNdDHWu7zBCUoTbjCYElkLUKR3AhegHTunXFFgo7+4UPUfq5VCXMUb a5eD38T3YiChk6gcDkXCyS2utubIzTJs2GcwXTN9SXTHlomkspS8RPAGpbmRjWoGfk60 ly8EAOwxq1MUwLTgvrTDZ5mWrgbU754cUXasWLYZxbBoUcOIgaTujt09+DzwQ58j/xX1 Y9ZyTs8zA/LvhPlQsbaCM0AHVZKQ1JWIPLrvzLi9M/6VclD4tpVDhBQYS3NT66rqmlc+ NGHA== 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=Alq0BDEsyekB/QXpHaK8s7l3AYbrPUHormmRBLs8sRE=; fh=MQq9R4MdWjoEH5ixD4p8IEuE7a+sWEYVIX4wnoG2oEo=; b=M/uKwhkVSnZWeJZa5ObDWxN3b7cE+qTNRuy0aq4JRFvRpSgRkPcTQwoWfTywcJUBdx LYkMM4u8laKFKXx2QV8d2W5ZKsGcbq3c5vSDqvRyAYTsUxGRHZwh8hRNnHZoNcTFM0nO pWY9RPaT7egbPBNOfnMwq86oiZ8frNak9Oig+PpdYIVP2PKGLlPeifhxiJzmza8sa4xo woInZa6w7tjGybBFRWm0b6BrUqOUhD1GUSeaToMsPXdPj7qQ87tUddqqPUGC4U561Khk 1dZXNppSaMgEAmbZogZJ+bIBrC5HzGhjdAq1cxp6YoPx49REbavlcTVYU4yVg/Olj/Su YyOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Kzf8nQDE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id c18-20020a631c12000000b005774c943feasi4186313pgc.735.2023.09.15.19.10.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 19:10:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Kzf8nQDE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id BD2C3826BBAA; Fri, 15 Sep 2023 13:41:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235229AbjIOUlX (ORCPT + 99 others); Fri, 15 Sep 2023 16:41:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233313AbjIOUku (ORCPT ); Fri, 15 Sep 2023 16:40:50 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 465DF18D for ; Fri, 15 Sep 2023 13:40:45 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-502defbb0c3so4274728e87.0 for ; Fri, 15 Sep 2023 13:40:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1694810443; x=1695415243; 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=Alq0BDEsyekB/QXpHaK8s7l3AYbrPUHormmRBLs8sRE=; b=Kzf8nQDEUCAQgzRoCyKyoHqCp6Z0m9x7JcjuBVlna4QIMRNJkdoZVW7WTdQd3CFj52 iahyOIlrp4UhV/dgNgb3q/98Ss/W5bIcTJ+eZKyVTGX00KgliNUhZLGI7X3BfOeWFktZ sglnA1xpbSrvFYf4csZas2bzPkzIniUmxarss= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694810443; x=1695415243; 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=Alq0BDEsyekB/QXpHaK8s7l3AYbrPUHormmRBLs8sRE=; b=usL7xZWfsaEM7mv459vfKh0/K0hwMrHDv2rJKoDt0F/cX0uXx3LNNoASL4tNahqeDw THwhtP6Iym1btgRRHSILPSElkYe0GlKpO6vRxAkWX0YvF/4hCKh/V4dM05CSuLAms6hl G/znmTZt0hYD7wyCgIJTWQbvnf7U0Qra9QAfpm4UrJXi7AQuQW5CIMFbuTyAOBD4pDKj V3qiO4g6rK/FI36DfQb94xS2VcGXgW6P7nqgw+2h5biapaCaATY25yCAKlbmCQasjYSk fXwHWH1dTsKcglHqKC/coNW71IrYmT8FqdL5TKlg/lbQ5n1gNmiw52HYGakZ7lWGC68k 0GHg== X-Gm-Message-State: AOJu0YwEVWtE2SLSazBtxwa9hJtVyC16my8qE3zxnpVnw1C4joQSHtUv g0ketCky5lAEDZRf+UBIIk0SclrxB2TTRf6jmzSrUGlD X-Received: by 2002:ac2:46c2:0:b0:500:c2d8:a2a2 with SMTP id p2-20020ac246c2000000b00500c2d8a2a2mr2382210lfo.46.1694810443288; Fri, 15 Sep 2023 13:40:43 -0700 (PDT) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com. [209.85.208.170]) by smtp.gmail.com with ESMTPSA id d25-20020ac244d9000000b00500ba43a43asm745698lfm.86.2023.09.15.13.40.42 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Sep 2023 13:40:42 -0700 (PDT) Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2bceb02fd2bso40891491fa.1 for ; Fri, 15 Sep 2023 13:40:42 -0700 (PDT) X-Received: by 2002:a2e:9f4f:0:b0:2bc:ff44:b85e with SMTP id v15-20020a2e9f4f000000b002bcff44b85emr2659012ljk.30.1694810442091; Fri, 15 Sep 2023 13:40:42 -0700 (PDT) MIME-Version: 1.0 References: <07c32bf1-6c1a-49d9-b97d-f0ae4a2b42ab@p183> In-Reply-To: From: Linus Torvalds Date: Fri, 15 Sep 2023 13:40:25 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Buggy __free(kfree) usage pattern already in tree To: Bartosz Golaszewski Cc: Peter Zijlstra , Alexey Dobriyan , linux-kernel@vger.kernel.org, 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Fri, 15 Sep 2023 13:41:57 -0700 (PDT) On Fri, 15 Sept 2023 at 13:04, Bartosz Golaszewski wrote: > > One more question wrt the __free() coding style. I don't think we really have much of a coding style yet. We currently literally have _one_ use of that __free() thing, and it was problematic. Which is why I'd like to start off fairly strict, but I'm not sure we should make it a "coding style" yet. IOW, my current thinking is "let's always have the constructor and destructor together", and see how it ends up going. Not because I think it's necessarily any kind of final rule, but because I think our whole cleanup thing is new enough that I think we're better off being a bit inflexible, and having a syntax where a simple "grep" ends up showing pretty much exactly what is going on wrt the pairing. Linus