From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0719DC433F5 for ; Thu, 26 May 2022 15:23:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347906AbiEZPXY (ORCPT ); Thu, 26 May 2022 11:23:24 -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-Google-Smtp-Source: ABdhPJzWHC3ppTv3zcLqCIdHi4Ug4Ffpqkgm/RakXbW4uD5vam6wSj7sPIjK90QZ8w8eRdXhHFvMrA== 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 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