From patchwork Sun Feb 1 03:00:07 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 4950 Received: from hormel.redhat.com (hormel1.redhat.com [209.132.177.33]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n1131WoS019113 for ; Sun, 1 Feb 2009 03:01:32 GMT Received: from listman.util.phx.redhat.com (listman.util.phx.redhat.com [10.8.4.110]) by hormel.redhat.com (Postfix) with ESMTP id 1220C8E0F82; Sat, 31 Jan 2009 22:01:31 -0500 (EST) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id n1131T1E004867 for ; Sat, 31 Jan 2009 22:01:29 -0500 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n1131Vj9006267; Sat, 31 Jan 2009 22:01:31 -0500 Received: from hera.kernel.org (hera.kernel.org [140.211.167.34]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n1130OBZ030375; Sat, 31 Jan 2009 22:00:24 -0500 Received: from htj.dyndns.org (IDENT:U2FsdGVkX18yw0+3c5M77QcSVW2/7URrgk6aYGxRM0I@localhost [127.0.0.1]) by hera.kernel.org (8.14.2/8.14.2) with ESMTP id n1130Cn6029506 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 1 Feb 2009 03:00:15 GMT Received: from [127.0.0.2] (htj.dyndns.org [127.0.0.2]) by htj.dyndns.org (Postfix) with ESMTPSA id 8B2794094A7B7; Sun, 1 Feb 2009 12:00:07 +0900 (KST) Message-ID: <49851037.1090203@kernel.org> Date: Sun, 01 Feb 2009 12:00:07 +0900 From: Tejun Heo User-Agent: Thunderbird 2.0.0.19 (X11/20081227) MIME-Version: 1.0 To: jeff@garzik.org, linux-ide@vger.kernel.org, jens.axboe@oracle.com, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, James.Bottomley@HansenPartnership.com, Mauelshagen@redhat.com, dm-devel@redhat.com References: <1233456951-992-1-git-send-email-tj@kernel.org> <49851012.8070904@kernel.org> In-Reply-To: <49851012.8070904@kernel.org> X-Enigmail-Version: 0.95.7 X-Virus-Scanned: ClamAV 0.93.3/8932/Sat Jan 31 23:12:16 2009 on hera.kernel.org X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hera.kernel.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (hera.kernel.org [127.0.0.1]); Sun, 01 Feb 2009 03:00:16 +0000 (UTC) X-RedHat-Spam-Score: -3.989 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-Scanned-By: MIMEDefang 2.63 on 172.16.48.31 X-loop: dm-devel@redhat.com Cc: Subject: [dm-devel] [PATCH 1/3] dmraid: set read_info to @offset by default in read_raid_dev() X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.5 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com read_info is passed from optional f_read_metatdata() to f_setup_rd(). If f_read_metadata() doesn't exist or doesn't initialize it, read_info contains garbage. Initialize it to @offset by default. Signed-off-by: Tejun Heo --- lib/format/format.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/format/format.c b/lib/format/format.c index 88cb938..4a2594a 100644 --- a/lib/format/format.c +++ b/lib/format/format.c @@ -435,7 +435,7 @@ read_raid_dev(struct lib_context *lc, { struct raid_dev *rd = NULL; void *meta; - union read_info info; + union read_info info = { .u64 = offset }; /* * In case the metadata format handler provides a special