From patchwork Thu Jun 23 14:49:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel J Blueman X-Patchwork-Id: 909062 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5NEsekt011986 for ; Thu, 23 Jun 2011 14:54:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754853Ab1FWOth (ORCPT ); Thu, 23 Jun 2011 10:49:37 -0400 Received: from mail-qy0-f174.google.com ([209.85.216.174]:38363 "EHLO mail-qy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752130Ab1FWOtg (ORCPT ); Thu, 23 Jun 2011 10:49:36 -0400 Received: by qyk29 with SMTP id 29so3346589qyk.19 for ; Thu, 23 Jun 2011 07:49:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to:cc :content-type; bh=4OtFctLDmeOBHm56RUKInwgDM5WUiPX4Q7Bd9dcDzzo=; b=kl1565WV0KiNyfbHdeCE20izaMCP96Z2L0KaYaGBeYfWDOXm3wSXlHhp455HdWQj0S 61boJCwhhfZamu9GinUxWOCSBssTxJwm8Ll1WYGSKa9I7U+3QcAJOrNr0bgSTPkePA0P OnR6OXc1bxMzFEnT5YBuyKE81hGMPtevDocDQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=p5Wi+whMADZ25PnL8Ubri9Z+fsyB38hN21PRahjRKMYEocpR0k75TPsF71lllTx5xP jBBriiEmm2VRw0MdMHRTyjS99d3LQXXo2mcG68njFDo6IOQXjxP/dZfy8i5SdKWGFmJL DNKmRZ/qlCIlXW1lpJG8Xglg1DY1IHyE552SQ= MIME-Version: 1.0 Received: by 10.224.198.68 with SMTP id en4mr1711389qab.223.1308840575710; Thu, 23 Jun 2011 07:49:35 -0700 (PDT) Received: by 10.224.6.133 with HTTP; Thu, 23 Jun 2011 07:49:35 -0700 (PDT) Date: Thu, 23 Jun 2011 22:49:35 +0800 Message-ID: Subject: [PATCH] btrfs: fix cast address space annotation in ioctl.c From: Daniel J Blueman To: Chris Mason Cc: Linux BTRFS Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 23 Jun 2011 14:54:40 +0000 (UTC) One of the casts in ioctl.c loses the __user annotation; cast so it is correctly maintained. Signed-off-by: Daniel J Blueman if (copy_to_user(user_dest, dest_orig, alloc_size)) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index a3c4751..79c32d8 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -2708,7 +2708,7 @@ long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg) up_read(&info->groups_sem); } - user_dest = (struct btrfs_ioctl_space_info *) + user_dest = (struct btrfs_ioctl_space_info __user *) (arg + sizeof(struct btrfs_ioctl_space_args));