Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp157220lqg; Wed, 10 Apr 2024 20:28:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUa491ZzL+SmdCOJL8L0magUstV+f6/yvlDBiIYMnLZT0A9GeYM0dR0KxuPn9vk8VmiuSeOj8exG9pCOnuj8KHeX46LvUuzbpREXOHilw== X-Google-Smtp-Source: AGHT+IEsrlFrVjYl5eCFFDfpUXqBiywYaLGhHQdorKsGqvtSGxokGLl/aCsXc0SFvc5Ugud62EK3 X-Received: by 2002:a05:6102:3a08:b0:47a:3ac5:c839 with SMTP id b8-20020a0561023a0800b0047a3ac5c839mr97544vsu.13.1712806111305; Wed, 10 Apr 2024 20:28:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712806111; cv=pass; d=google.com; s=arc-20160816; b=VUQQL8VKlP6gLviEy6XWfKhjsi7t7THQu+XlIY6xAp0O6ahdwyJpOc9l4PvCBGltnl tPy/OZ8nDyHp57sTCwtUrkOsiNPuJinnpij1jiYcSVlkCSALKUBVqRI2Cxy6mVN/U1yg Ep+cJkIkdmmjjry0rkgbrNJJeDdX/kT9FSDFnCxB7ztaFRRNFFlaDBw77bQu16jRK/az nCETEJlWVo2Y2njSlqP6te994XoQSCpYQR9LpepKGIml8AuFijbWeacykMTMN0xGsHPt /KjuhpCxIbi8MrG7inx1/Jq/y++twmfoAuOIZ8lWpz3NyzUFjm+UTiaEqnU4lTORWzUZ U65A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=hlv6P/4KcumG0V9GT5af7nC/55tHAhLOYtkjPOjZwDo=; fh=+dJ7b60PYqnRfKS4jvI8ryeEru0AA22XUsytD6azWIk=; b=E2kiB0jaHTjGQ5G8FyKos+5jEA8cB5qO667hVZjIFefimegMTx/jbxuGSoVSupjNHG V2e5Dj7poGQ/dPbGJ5S0qNd2qlNdWVZNGxHuESx7N5Z97Mq3UhESSdFbUDE1EqtmXLZy rmie6VlkCn9XQAcjOCn+UkE7YHlexN2SZPuGOgGun1hVPiY0K1AdF+o6S0Y5D1PWZk+V 4YZ+dfyMErUtksgWfS0oXj2e9kQKuXZCMpmYRHW1guk8k/0ENLvw+5w/klPLGbhr9BLJ cO/JBHIifsHyyyWQ7wZza9OlyYW7749Cw7EakqsBc5N2yHlFJRidcDPpK991yEVaBwmW A01g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-139707-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139707-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c9-20020a05621401e900b0069b1f36ee95si619316qvu.438.2024.04.10.20.28.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 20:28:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139707-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-139707-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139707-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0A13D1C2160C for ; Thu, 11 Apr 2024 03:28:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E4D3813BAC5; Thu, 11 Apr 2024 03:27:43 +0000 (UTC) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8991813C677 for ; Thu, 11 Apr 2024 03:27:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.255 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712806063; cv=none; b=DImd8Nq4wJZSbqO2KbM9KwB60ZttLJPIxjBXB2hRqw8+TJygtNkSoFtk5hobBzhqyCxn0zFSRmSNcG16E44khKchFLq/jZA4Uhdv0bYKkCGaLVqNNvtpByIBiAX0cns/2BARLHDVMMS8PXlAtVmdKS2aQXVLq6dAVp7afSkGUeI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712806063; c=relaxed/simple; bh=rHGH6lCkBOQ/TXVwUpLe/mbxZddhNL23jRwKH3SUq1o=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=PO87NC9dJZsSprNhMLNaIUdVk7lrUPTr+f6qR4YcA+a9PRaF1g74Zk9/NTW5hI6szek3xINOmMd5jWYXeXs6vcugqnpafvi3uvcFUsIhsNol/I4u8oBpVeCHuPrZLX0UC0BfA6RhTSWeh/K4sKbfSd37JmYW5GRwkpTIO6LOHe4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.255 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.105]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4VFQ6t6HLsz1R5Sm; Thu, 11 Apr 2024 11:24:54 +0800 (CST) Received: from kwepemm600013.china.huawei.com (unknown [7.193.23.68]) by mail.maildlp.com (Postfix) with ESMTPS id 0F68B14010C; Thu, 11 Apr 2024 11:27:39 +0800 (CST) Received: from huawei.com (10.175.104.67) by kwepemm600013.china.huawei.com (7.193.23.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 11 Apr 2024 11:27:31 +0800 From: Zhihao Cheng To: , , , CC: , Subject: [PATCH v2 0/4] ubi: Fix serious of resource leaking problems Date: Thu, 11 Apr 2024 11:18:59 +0800 Message-ID: <20240411031903.3050278-1-chengzhihao1@huawei.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600013.china.huawei.com (7.193.23.68) v1->v2: Combine Ben[1] and my[2] patches. Modify second patch in [1], don't drop warning message if debugfs failed to be initialized. Modify second patch in [2], move ubiblock_init to the end of ubi_init. Add new patch to replace IS_ERR_OR_NULL with IS_ERR. [1] https://lore.kernel.org/linux-mtd/cover.1712788087.git.ben.hutchings@mind.be/ [2] https://lore.kernel.org/lkml/20240410074033.2523399-3-chengzhihao1@huawei.com/T/ Ben Hutchings (1): mtd: ubi: Ignore all debugfs initialisation failures Zhihao Cheng (3): ubi: ubi_init: Fix missed debugfs cleanup in error handling path ubi: ubi_init: Fix missed ubiblock cleanup in error handling path ubi: debugfs: Replace IS_ERR_OR_NULL with IS_ERR in error checking path drivers/mtd/ubi/build.c | 61 ++++++++++++++++++++--------------------- drivers/mtd/ubi/debug.c | 35 +++++++++-------------- drivers/mtd/ubi/debug.h | 4 +-- 3 files changed, 44 insertions(+), 56 deletions(-) -- 2.39.2