Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp897722pxb; Wed, 3 Feb 2021 23:11:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJyHmiWv+D+ttg9Y3NVKwcqrUunEbCj5iZrwWahs9gqdKGF4dNzdEYLYV58fZ48KAqwX2KXP X-Received: by 2002:a05:6402:1a56:: with SMTP id bf22mr6820601edb.284.1612422682658; Wed, 03 Feb 2021 23:11:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612422682; cv=none; d=google.com; s=arc-20160816; b=SAUOs6HOCOwbi0xzx5Eu72upucYGvas+sHo7qS/df5zwi2PlxeKLcww5Lz2MkamJn5 X1KiNEwqSnIMayoz4so+tXF6YkNWZsRE8iZExALiqy4fFCZti77B7UXem6AVgg5wSti4 /cGM64MhWKcAeLqlrBe7uUZ0VCNsivm8AAeGIUzZgxT9zbaOBvArN3JuDocrbKSg4qpE d4dJyLqIocPxnD0I59roBn+NNXh/UhQ24mIPXDdpo+TIh6deK965ux7E8YySA2smnX0Q tr9fTjR2fTs0kgTdoC9eKPItvrlwqiJ1qcYoKJ4WGFbYScCGEAGCQut7EdIt6u9UrAxm gNGg== 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; bh=T36Ul6U+Fjw4iCa3L2niKWjifx+lpbVnXPZsgNYFVRI=; b=Fz085nAaZFKVyC3RNS8OqQ6TaZenXj/ybmehT4GicMajnwryhGUBuFvBtidvne5iW+ HsWifET6aUXJAOPg5N36ooNLd996M/GWhQJpGlH+V/T7OQO9LbrmeZzLK8hiSGrlHc4m jox3eN1RoJC2ITV4TnGKq1HjeYZpqWA+ZhGpmx9t6p2Wzx4oCtmFc7gbQSL5DB9lkzHb LJ17tpUusRY0qe7mBxUgKGyufcn43qSkfEoXXKFp/PdAF1tcXzvQb38nAbsSSxRGtmnB TKxUhrDA3hKcxxxUKngDKMvXsHO3opl6iJiKh+kFGmJ8Eru93zITuSaz0wBXqGI+jnd2 rsPA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i25si3363848edb.99.2021.02.03.23.10.58; Wed, 03 Feb 2021 23:11:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234198AbhBDHIx (ORCPT + 99 others); Thu, 4 Feb 2021 02:08:53 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:12020 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234099AbhBDHIe (ORCPT ); Thu, 4 Feb 2021 02:08:34 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DWV2t4N1QzjJqw; Thu, 4 Feb 2021 15:06:30 +0800 (CST) Received: from huawei.com (10.175.101.6) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.498.0; Thu, 4 Feb 2021 15:07:41 +0800 From: Sun Ke To: , , CC: , , , Subject: [PATCH v4 0/2] fix a NULL pointer bug and simplify the code Date: Thu, 4 Feb 2021 02:09:08 -0500 Message-ID: <20210204070910.1401239-1-sunke32@huawei.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.175.101.6] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org v4: Share exception handling code for if branches and move put_nbd adjustment to a separate patch. v3: Do not use unlock and add put_nbd. v2: Use jump target unlock. Sun Ke (2): nbd: Fix NULL pointer in flush_workqueue nbd: share exception handling code by goto put_nbd drivers/block/nbd.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) -- 2.25.4