From patchwork Thu Jun 12 22:57:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Buchbinder X-Patchwork-Id: 4345551 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 77AC3BEEAA for ; Thu, 12 Jun 2014 22:57:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB71220254 for ; Thu, 12 Jun 2014 22:57:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4B2212022A for ; Thu, 12 Jun 2014 22:57:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751173AbaFLW5w (ORCPT ); Thu, 12 Jun 2014 18:57:52 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:64062 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750795AbaFLW5v (ORCPT ); Thu, 12 Jun 2014 18:57:51 -0400 Received: by mail-pa0-f45.google.com with SMTP id rd3so839062pab.4 for ; Thu, 12 Jun 2014 15:57:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=n7M+E75FHRLZjq0e0w4u7NF7nFR6ZQ2HXj8Y9PSATHs=; b=jEPsAGPPs9iteSCrKe7EyKutBgrzb0oyN4ITN39KlHdYk7xTO5qYUFw0NTbPCCaBGx GiOdcLR85eWh52rEs01T5WWjNiirAUcjrKTRgDYHv9V9newiORBchZ8c1mTT1+hjtuIt eq34J5mdW5f3NcvEWU61/ojCTlN2FbE7FH7TxEXzn4ow+zXfUbpj9PfTrin+6fVfl9lA PIxhpNru4BQlxwJCr3LA3b8IpuVe0R88LpKee+zqMdNY866IVOVmJw0NXYFOvSneEHL0 sx6ouS1Mvqz6ZI+7Zm8ZhE1ivwuJAhs5ZhRNW3RXMipSgH7Y3TPi2JDX+M5rC/gwsuYl hIyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=n7M+E75FHRLZjq0e0w4u7NF7nFR6ZQ2HXj8Y9PSATHs=; b=Iwp+hnmnCv1bSR+0egCaqAhNdTfsY9Ko3zAwDtpv0FV+J3V2dLpSN8ZPPWbhtPka44 19XWkA45LPU2fRmU5o59aSwryIZS/jaq9CGYItSUetlfdtc7pPxhpW9bk64fSEgwtYv+ eupSlBPpsT2xcLCyl/pdFeW/H04IaKrM4D9DYSvdKAjVAetKLsjlU3mVFvB03EhARVOL aavSxRUq/cInyzcv4TDK+9cuW3TNx4Aa2u70IS4C0HVD9pCm0DC2NOI647/MnA95CEd6 AVc1cdxk53EOTkhQxcN4Ibah+hyMPS50pLJ83N+yreRxXdXpObANs0ybaHbvQZKQNzoE k5QA== X-Gm-Message-State: ALoCoQmNQW7q58Od/8aAOeROEWoDmWWv+trSadve7jcmUNcVLN+3T6NOlbwF2vHAZLYoiOXzE0RmpugHucXSmzPNtOUlnDnx7XsF0tX0Vdr2K63ZE8z180AkMlARV6GjAh7842B9ki6MYlUQgd+O8FChZx27t3sZxA== X-Received: by 10.66.142.73 with SMTP id ru9mr24271120pab.41.1402613870750; Thu, 12 Jun 2014 15:57:50 -0700 (PDT) Received: from abuchbinder-glaptop.corp.google.com (dhcp-172-19-65-142.mtv.corp.google.com [172.19.65.142]) by mx.google.com with ESMTPSA id jb5sm8856pbd.73.2014.06.12.15.57.49 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Jun 2014 15:57:50 -0700 (PDT) From: Adam Buchbinder To: linux-btrfs@vger.kernel.org Cc: dave@jikos.cz, Adam Buchbinder Subject: [PATCH] Properly size the leafsize field in the mdrestore_struct struct. Date: Thu, 12 Jun 2014 15:57:33 -0700 Message-Id: <1402613853-14956-1-git-send-email-abuchbinder@google.com> X-Mailer: git-send-email 2.0.0.526.g5318336 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It's 32 bits as defined in ctree.h, but the struct had it as 64 bits. Found using MemorySanitizer. Signed-off-by: Adam Buchbinder Signed-off-by: Satoru Takeuchi Reviewed-by: Satoru Takeuchi --- btrfs-image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/btrfs-image.c b/btrfs-image.c index cf1fe2d..98d765a 100644 --- a/btrfs-image.c +++ b/btrfs-image.c @@ -128,7 +128,7 @@ struct mdrestore_struct { struct rb_root chunk_tree; struct list_head list; size_t num_items; - u64 leafsize; + u32 leafsize; u64 devid; u8 uuid[BTRFS_UUID_SIZE]; u8 fsid[BTRFS_FSID_SIZE];