From patchwork Tue Apr 30 17:04:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 2505821 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 4270EDFB75 for ; Tue, 30 Apr 2013 17:04:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760842Ab3D3REd (ORCPT ); Tue, 30 Apr 2013 13:04:33 -0400 Received: from dkim2.fusionio.com ([66.114.96.54]:59058 "EHLO dkim2.fusionio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760807Ab3D3RE2 (ORCPT ); Tue, 30 Apr 2013 13:04:28 -0400 Received: from mx2.fusionio.com (unknown [10.101.1.160]) by dkim2.fusionio.com (Postfix) with ESMTP id 2BFC99A068E for ; Tue, 30 Apr 2013 11:04:28 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fusionio.com; s=default; t=1367341468; bh=DHMrcZTorLi7KsAxEW3Lktse690rpFc52vAVWd6vlJs=; h=From:To:Subject:Date; b=NZRy3/Iap+N38XC3Ois/C1fB8VuyId/IFz/USGmI9CISLyjMTeXI1RubMPU+JBcIe Vg/upDztcwJaAkF/vMdwNpUKyh19+TnxWjwcUkAQdZON7XE9ycYhd9eJu+rtV/OlqY vP1NwLquARP7dVa8phnF2/t9OgQhhOqFDTKtNUGQ= X-ASG-Debug-ID: 1367341467-0421b536821e1f0001-6jHSXT Received: from mail1.int.fusionio.com (mail1.int.fusionio.com [10.101.1.21]) by mx2.fusionio.com with ESMTP id jBQFgsbHPgQBeyNp (version=TLSv1 cipher=AES128-SHA bits=128 verify=NO) for ; Tue, 30 Apr 2013 11:04:27 -0600 (MDT) X-Barracuda-Envelope-From: JBacik@fusionio.com Received: from localhost (76.182.72.146) by mail.fusionio.com (10.101.1.19) with Microsoft SMTP Server (TLS) id 8.3.83.0; Tue, 30 Apr 2013 11:04:27 -0600 From: Josef Bacik To: Subject: [PATCH] Btrfs: fix typo in send.c Date: Tue, 30 Apr 2013 13:04:25 -0400 X-ASG-Orig-Subj: [PATCH] Btrfs: fix typo in send.c Message-ID: <1367341465-5155-1-git-send-email-jbacik@fusionio.com> X-Mailer: git-send-email 1.7.7.6 MIME-Version: 1.0 X-Barracuda-Connect: mail1.int.fusionio.com[10.101.1.21] X-Barracuda-Start-Time: 1367341467 X-Barracuda-Encrypted: AES128-SHA X-Barracuda-URL: http://10.101.1.181:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at fusionio.com X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=BSF_SC0_SA620b, MAILTO_TO_SPAM_ADDR X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.129621 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 MAILTO_TO_SPAM_ADDR URI: Includes a link to a likely spammer email 0.50 BSF_SC0_SA620b Custom Rule SA620b Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org A user reported a bug where we do sizeof(*ptr * count) instead of sizeof(*ptr) * count. Fix this. Reported-by: David Binderman Signed-off-by: Josef Bacik --- fs/btrfs/send.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index ff40f1c..7c8964b 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -4587,8 +4587,8 @@ long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_) } if (!access_ok(VERIFY_READ, arg->clone_sources, - sizeof(*arg->clone_sources * - arg->clone_sources_count))) { + sizeof(*arg->clone_sources) * + arg->clone_sources_count)) { ret = -EFAULT; goto out; }