Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp694487ioo; Thu, 26 May 2022 12:25:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLhdajuC3XdownASFEw5AE1quJFvNW8c9spAEg5usmui+bKRfEfkZXcTkOwQ91GW3Mll8d X-Received: by 2002:a05:6a00:10d0:b0:4f7:5af4:47b6 with SMTP id d16-20020a056a0010d000b004f75af447b6mr40440930pfu.6.1653593146590; Thu, 26 May 2022 12:25:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653593146; cv=none; d=google.com; s=arc-20160816; b=y5XjvGB2RrO3LDGh0esDMwP4xHAR77veiuOuu37Z9hZ46nW0ANs7tJPqWk3SLXhlP6 dFfS+D/7Ra2VOucCe+wS4OyOzgiGGlfY7iPyd5/iYy40v2A7UwESt60F/JdTOvQxCGc6 OwhKAl59haa4ephOsvJ2bQjYyhM2S23wc8nZIwqeCd+wkx4oVacQIXxI6uRprMH2fXJU ipH/stiH/4zamOwurOF/yjDgvMW3bNXg7JfX+U7icAVBzA1IqfE8qleurOxYdJueSPv2 0C0JAUosyv7wgeu0qNXqYEWAQqDdQzdq/XhLdPbtBG9+dx0Z5OkGEncHLE5EQ5H1Qmtx N0FA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=UlmIoIXHwMXi02CIUIbYx/gDCtgYsd+85qsswfbTi60=; b=sgBD6usdjhvgIJvAcoIogBWkJqM8WE/5MfHRyBnYMY8u37Rr3lISCNR6gH4w0KRbog gqBAFBcZkBYJcrI2VxDtitmNqYJQhKFAcTSnv93qTFTkLbddojSL/hGcbtoGvNAjaQaC eHmcayBo1nlFJ3ZUXudu7oPx/iLfYPmZJufnfW56Hdm9Vi7LEi/ydzq05knqL52p8hlj weIKy6mxF6n5UTyq5z8X4g93sX2cTaMoD1UGM2kG7sLTmrVVksJ4eIJTnMmYjkdHU/YT 2+RMErQRrrM34lyVqNM5ewDoGFeCP34aeIiwKAjSrbX0hfnivEsu5py/ah0CegCGWmPl t/fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lcukDgRz; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n36-20020a635924000000b003c5e1a93396si3754315pgb.289.2022.05.26.12.25.35; Thu, 26 May 2022 12:25:46 -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=@linaro.org header.s=google header.b=lcukDgRz; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237416AbiEZPXX (ORCPT + 99 others); Thu, 26 May 2022 11:23:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239364AbiEZPXV (ORCPT ); Thu, 26 May 2022 11:23:21 -0400 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEC15BA9AD for ; Thu, 26 May 2022 08:23:19 -0700 (PDT) Received: by mail-io1-xd34.google.com with SMTP id n145so1892425iod.3 for ; Thu, 26 May 2022 08:23:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UlmIoIXHwMXi02CIUIbYx/gDCtgYsd+85qsswfbTi60=; b=lcukDgRzh6gqWw1h4Mle/1Y2mwmaULeGkm0dSvmCLjxX12jRc6cTNrpe3/kQIxT6VR BLFPWnpia3CncNic9LXJLWTKkCBk/Yl5RfugOYnyqcbxW8FC0MPaZUFSo6EOkEb66LyY YyesJnY7SKTCOURIvcjvF2gghQy6pcRElIObu1Q2HpWpBNrHJhkr98uD54pYKMZyj+hU AMxISzEFRMnoio7S9FzHH8F/a6ZkAJKul0WzTN+WSMGfYUVVnvWqSptpab+au9Qrs1Y2 9gQpq/vDsHRVDggbiBVgy9IzzOQ+w4ibpW4q9prTuCl0uH78qkayL5VaOxo1saThzq4P N8+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UlmIoIXHwMXi02CIUIbYx/gDCtgYsd+85qsswfbTi60=; b=mX3k7nGdz6+bpPPHw0rmogNGN9GpVZuiIx+muJpP0Pyl47Ze6tv9gERL43oEL3JmZz h5pjLOp5sNaMVOPMveutOqsgUSOGto9v2JxRLY8YkPcUMNHEOExddAU7i1lua7+33zDH Fcdz8MHch5BCzhd7+VhjN84zKyaDeZ2tLdzJhpDddqN+Cxem2dwmImkGY+bdEW+pS8nh P99a+SAX5necQb7FhJkaWI5cXbAAmJ9KFZ8MvGiXjLFQq1QwqJ+vFlrMAeHFRnvKQQrL FwqPySES9XCDKKu2aAWDiESwKzT58qxrvZz/bOcdtn1ZdCpxpDrLPnv3egBS38JYIT+L IiIQ== X-Gm-Message-State: AOAM533IODXck1M3ettmi5tWFTiA3Fi6JRd9i75+/msCKOrGZWk2qLrJ oVFnOq8dbmbJbTYq78ryEj6aCg== X-Received: by 2002:a05:6638:1486:b0:32b:e870:b2a7 with SMTP id j6-20020a056638148600b0032be870b2a7mr19634359jak.200.1653578599316; Thu, 26 May 2022 08:23:19 -0700 (PDT) Received: from presto.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id b59-20020a0295c1000000b0032b3a78176fsm466847jai.51.2022.05.26.08.23.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 08:23:18 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: mka@chromium.org, evgreen@chromium.org, bjorn.andersson@linaro.org, quic_cpratapa@quicinc.com, quic_avuyyuru@quicinc.com, quic_jponduru@quicinc.com, quic_subashab@quicinc.com, elder@kernel.org, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net v2 0/2] net: ipa: fix page free in two spots Date: Thu, 26 May 2022 10:23:12 -0500 Message-Id: <20220526152314.1405629-1-elder@linaro.org> X-Mailer: git-send-email 2.32.0 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,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 When a receive buffer is not wrapped in an SKB and passed to the network stack, the (compound) page gets freed within the IPA driver. This is currently quite rare. The pages are freed using __free_pages(), but they should instead be freed using page_put(). This series fixes this, in two spots. These patches work for the current linus/master branch, but won't apply cleanly to earlier stable branches. (Nevertheless, the fix is a trivial substitution everwhere __free_pages() is called.) Version 2 is just rebased on today's net/master branch. -Alex Alex Elder (2): net: ipa: fix page free in ipa_endpoint_trans_release() net: ipa: fix page free in ipa_endpoint_replenish_one() drivers/net/ipa/ipa_endpoint.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) -- 2.32.0