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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BA98C4332F for ; Thu, 30 Dec 2021 03:50:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 80C686B007D; Wed, 29 Dec 2021 22:50:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7BA9E6B007E; Wed, 29 Dec 2021 22:50:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 681FF6B0080; Wed, 29 Dec 2021 22:50:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0162.hostedemail.com [216.40.44.162]) by kanga.kvack.org (Postfix) with ESMTP id 58BD76B007D for ; Wed, 29 Dec 2021 22:50:39 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 0D1EB8249980 for ; Thu, 30 Dec 2021 03:50:39 +0000 (UTC) X-FDA: 78973083798.30.670D87D Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by imf16.hostedemail.com (Postfix) with ESMTP id 83252180002 for ; Thu, 30 Dec 2021 03:50:38 +0000 (UTC) Received: by mail-pg1-f172.google.com with SMTP id m15so20354360pgu.11 for ; Wed, 29 Dec 2021 19:50:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :mime-version:content-transfer-encoding; bh=9ufcOOZj6DSkYrnqVbPAtzoCPF2bpR1xB/9bt+Fbi1A=; b=gLNDXxb44nCUde9kyk0DFreZtWSZigIPGMJw+pXv/bSILddeueg2r+zbEUwV7p9pi1 DUtYtxjmcvzqResD7R55E3TcuxzlyDs8q2FUBUobdDwGujmYp8GrRn5Op0JoOF1XhhGB xTv4cbsUly9p7duySCnB0xyGSqgpXBYOmFkFsPW2zXfROP/e2bu7cA0C6SfD3f1OV3aY A/XKxYv0Eh54q5m9ExIhcZgs3gzB2JmUKe9iJ1qyjuKg9ilm4t/4lNdlClK1seA7qYcO XveJxl3yvKQ0JpEYNKyVcnWprw0pE0Ai01GB6mOEQJfotbW/aUyTOwKAn2n45K+LHDSV cvDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:user-agent:date:subject:from:to:cc:message-id :thread-topic:mime-version:content-transfer-encoding; bh=9ufcOOZj6DSkYrnqVbPAtzoCPF2bpR1xB/9bt+Fbi1A=; b=vi6IBxY2X5pKWqWXLQz2IrP/ThuKaj0biXv4dnWj/ReLE84i1srqDbP+XFKQz6TQLM lRczOSSWPe6jhY2Kv8cMc7uqeGQHeay822RlhWfqUZS81jRlkijFlSbKkRI1VbteYBAI 588OsRKNHJvuDUwokpnPZyo9/JbuUSRaHN4v4ZbPfRWQhoX3YRaJY3cKtjs1NL0nnAXh wuEMQYF48jyx6j24gMsk3hJpdI+Qlz3xslCW0eLAYi8s1H6jbFc8txE8Va7ulGtBr6Ze hcAwP6kQxN1MIjTRBX7hcUSCMWbXXIbqm9dCcdzqVLaINK/mOuig2VQxavzC6eU1D93Q IhUg== X-Gm-Message-State: AOAM5304zotuWNBK8juwHv9lze1oG/WhumQF0VSlDMVmms3eIbRUue9F ICjAyEmjI2RVQlVqAgHqF+k= X-Google-Smtp-Source: ABdhPJxGY67BylkZ2HMQnVsKWqo8/dkSZItxGn04J+RyJV/gc1mzsS2UZi8cQkVwiRp51ZG3J4iJhw== X-Received: by 2002:a63:191a:: with SMTP id z26mr26120907pgl.593.1640836237527; Wed, 29 Dec 2021 19:50:37 -0800 (PST) Received: from [30.135.82.251] ([23.98.35.75]) by smtp.gmail.com with ESMTPSA id f14sm26196298pfv.215.2021.12.29.19.50.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Dec 2021 19:50:37 -0800 (PST) User-Agent: Microsoft-MacOutlook/16.56.21121100 Date: Thu, 30 Dec 2021 11:50:34 +0800 Subject: [Resource Leak] Missing closing files in tools/bpf/bpf_asm.c From: Ryan Cai To: , CC: , , Message-ID: <3772BC47-11E0-420D-A0CA-3F3EF279B26B@gmail.com> Thread-Topic: [Resource Leak] Missing closing files in tools/bpf/bpf_asm.c Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 83252180002 X-Stat-Signature: apoa8e1oxyyq6xeocd5556tb679kc4tc Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=gLNDXxb4; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf16.hostedemail.com: domain of ycaibb@gmail.com designates 209.85.215.172 as permitted sender) smtp.mailfrom=ycaibb@gmail.com X-HE-Tag: 1640836238-289221 X-Bogosity: Ham, tests=bogofilter, spamicity=0.182007, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Dear Kernel maintainers, 1. In ksm_read_sysfs, the file opened at Line 74 may not closed when going to Line 83. Location: https://github.com/torvalds/linux/blob/512b7931ad0561ffe14265f9ff554a3c081b476b/tools/testing/selftests/vm/ksm_tests.c#L74-L83 2. In ksm_write_sysfs, the file opened at Line 56 may not closed when going to Line 64. Location: https://github.com/torvalds/linux/blob/512b7931ad0561ffe14265f9ff554a3c081b476b/tools/testing/selftests/vm/ksm_tests.c#L55-L65 Should they be bugs? I can send a patch for these. Best, Ryan