From patchwork Thu Apr 8 16:58:49 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Garzik X-Patchwork-Id: 49737 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 1338FB7C06 for ; Fri, 9 Apr 2010 02:58:52 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758745Ab0DHQ6u (ORCPT ); Thu, 8 Apr 2010 12:58:50 -0400 Received: from havoc.gtf.org ([69.61.125.42]:57452 "EHLO havoc.gtf.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758158Ab0DHQ6t (ORCPT ); Thu, 8 Apr 2010 12:58:49 -0400 Received: by havoc.gtf.org (Postfix, from userid 500) id 0D7642F8339; Thu, 8 Apr 2010 12:58:49 -0400 (EDT) Date: Thu, 8 Apr 2010 12:58:49 -0400 From: Jeff Garzik To: Andrew Morton , Linus Torvalds Cc: linux-ide@vger.kernel.org, LKML Subject: [git patches] libata fix Message-ID: <20100408165848.GA14360@havoc.gtf.org> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus to receive the following updates: include/linux/ata.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Mark Lord (1): libata: Fix accesses at LBA28 boundary (old bug, but nasty) (v2) --- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/ata.h b/include/linux/ata.h index b4c85e2..700c5b9 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -1025,8 +1025,8 @@ static inline int ata_ok(u8 status) static inline int lba_28_ok(u64 block, u32 n_block) { - /* check the ending block number */ - return ((block + n_block) < ((u64)1 << 28)) && (n_block <= 256); + /* check the ending block number: must be LESS THAN 0x0fffffff */ + return ((block + n_block) < ((1 << 28) - 1)) && (n_block <= 256); } static inline int lba_48_ok(u64 block, u32 n_block)