From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 69516568A for ; Tue, 24 Nov 2015 19:25:58 +0100 (CET) Received: by wmec201 with SMTP id c201so222505720wme.0 for ; Tue, 24 Nov 2015 10:25:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=3ZrlpL98coUrB9UFJro9P+5e9biCHSLhZ6BCxHK/f8k=; b=ozVflfrxCwopB+gQt/hNp5QfHqkAlCVqhrL+3rXh0O1hVPx6c8eP7SZUlVcssrI79x GWqBaRsTJmVGiMm7wZK0euXsBaaz3oQmQuqWqPX94MF/0lHTIv9aplHi1WQhin2OlD3w rBIIgPAfxEjnF9t19dzktVoYc8ckfSnxhY3P/r+HHKLcvB0nGmjF0jOINAwzGz0Ilmqf pANRUnu5mle8Qq6seyOXg3UR3kRmKsA3epHLQDU/0+2crJV/PVB35CdUtC+qJEGuy2NS qcaW3IjxlxbZjzuc9WWBpv3DPbkz2GlcMeCeCzP9tf8kkNX7hALl3odYDHjQsgnQuYB/ byIA== 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:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=3ZrlpL98coUrB9UFJro9P+5e9biCHSLhZ6BCxHK/f8k=; b=C5nlzzBAbe+i+lLPSYlQaP3f5qvOxD9K3BdPeeXCRA5EWTb+spXpwMDtTKiiYkm94n hlZdP0z1uCMvz1lDpVOMrC3puZwM98BlbeiaBXQjmBjDtzkwHoI99B6w8C581X9AIiLy mxVqYmktAz0iVmcDwz2NIITFzBQLDOxv1bt1F9cJZfnq0BX9C1q7xra2+AXYHizDS9QG 7KvBk9ACSULEMNvQa1jpqJFrwbmP8Bk9tT1xWb86CLR4Mutd5YZ7qyd//eIteMNxzg7c SCTl0fYHFcKkfjJZNB5tz1BoClHGBDTJeEd/ULsIXU21km0blS64p3fWy+WzQKOVLvkm eqZA== X-Gm-Message-State: ALoCoQlf1Fe8aAG2JhVj/2kKmN5WZnSVoifXZ3mOlpw+MI05zq11PIfHhqGz/MBzVdlqQLtZfE0J X-Received: by 10.194.246.132 with SMTP id xw4mr38565276wjc.75.1448389558228; Tue, 24 Nov 2015 10:25:58 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id n127sm19310165wmf.12.2015.11.24.10.25.57 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Nov 2015 10:25:57 -0800 (PST) From: Thomas Monjalon To: Jianfeng Tan Date: Tue, 24 Nov 2015 19:24:40 +0100 Message-ID: <111424458.gvWv4ThTcC@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1447308361-82139-1-git-send-email-jianfeng.tan@intel.com> References: <1447279449-11289-1-git-send-email-jianfeng.tan@intel.com> <1447308361-82139-1-git-send-email-jianfeng.tan@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v3] vhost: fix mmap failure as len not aligned with hugepage size X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 18:25:58 -0000 2015-11-12 14:06, Jianfeng Tan: > This patch fixes a bug under lower version linux kernel, mmap() > fails when length is not aligned with hugepage size. mmap() > without flag of MAP_ANONYMOUS, should be called with length > argument aligned with hugepagesz at older longterm version > Linux, like 2.6.32 and 3.2.72, or mmap() will fail with EINVAL. > This bug was fixed in Linux kernel by commit: > dab2d3dc45ae7343216635d981d43637e1cb7d45 > To avoid failure, make sure in caller to keep length aligned. > > v3 changes: > - fix (u64) -> (void *) convert error on 32-bit system > > v2 changes: > - add Kernel version comments and commit msg > - remove unnecessary alignments when munmap > > Signed-off-by: Jianfeng Tan You forgot to keep Huawei's ack from v2. Applied, thanks