From patchwork Mon Mar 15 13:54:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 401558 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0CAABC2D0B0 for ; Mon, 15 Mar 2021 13:58:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C84C264DAD for ; Mon, 15 Mar 2021 13:58:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232211AbhCON54 (ORCPT ); Mon, 15 Mar 2021 09:57:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:34792 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231926AbhCON5T (ORCPT ); Mon, 15 Mar 2021 09:57:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0307264F00; Mon, 15 Mar 2021 13:57:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816639; bh=fJc62Oz+a/Fiquv8Q8uwC8LC00ejr5byc32G7xfch1I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CZJzyrB4z8SPPRJRSlu7M0PjGrn5/YVNxxyN3B6gyxAwox5dlXuSxuWkuXBuQqUef HmyFHRTgOqpxvG0nqclhwqVLjVEzFcV77NYEKfPJUVebgnUGghdVZqF7K0MooxIgrT oWEX5OHpDyL334rQUzYj2O7S6z7G1FN5WdhqxWik= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maciej Fijalkowski , Daniel Borkmann , =?utf-8?b?QmrDtnJuIFTDtnBl?= =?utf-8?q?l?= Subject: [PATCH 5.4 019/168] samples, bpf: Add missing munmap in xdpsock Date: Mon, 15 Mar 2021 14:54:11 +0100 Message-Id: <20210315135550.976065939@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135550.333963635@linuxfoundation.org> References: <20210315135550.333963635@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Greg Kroah-Hartman From: Maciej Fijalkowski commit 6bc6699881012b5bd5d49fa861a69a37fc01b49c upstream. We mmap the umem region, but we never munmap it. Add the missing call at the end of the cleanup. Fixes: 3945b37a975d ("samples/bpf: use hugepages in xdpsock app") Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20210303185636.18070-3-maciej.fijalkowski@intel.com Signed-off-by: Greg Kroah-Hartman --- samples/bpf/xdpsock_user.c | 2 ++ 1 file changed, 2 insertions(+) --- a/samples/bpf/xdpsock_user.c +++ b/samples/bpf/xdpsock_user.c @@ -783,5 +783,7 @@ int main(int argc, char **argv) else l2fwd_all(); + munmap(bufs, NUM_FRAMES * opt_xsk_frame_size); + return 0; }