Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762544AbaGROfi (ORCPT ); Fri, 18 Jul 2014 10:35:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30034 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762519AbaGROff (ORCPT ); Fri, 18 Jul 2014 10:35:35 -0400 Date: Fri, 18 Jul 2014 10:35:04 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Tomas Henzl cc: "Alasdair G. Kergon" , Mike Snitzer , Jonathan Brassow , Edward Thornber , "Martin K. Petersen" , Jens Axboe , Christoph Hellwig , dm-devel@redhat.com, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org Subject: Re: [PATCH 1/15] block copy: initial XCOPY offload support In-Reply-To: <53C91B1E.7060703@redhat.com> Message-ID: References: <53C91B1E.7060703@redhat.com> User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 18 Jul 2014, Tomas Henzl wrote: > > + if (src_sector + nr_sects < src_sector || > > + dst_sector + nr_sects < dst_sector) > > + return -EINVAL; > > Hi Mikulas, > this^ is meant as an overflow test or what is the reason? > Thanks, Tomas Yes. It is a test for overflow. Mikulas -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/