From owner-svn-src-all@FreeBSD.ORG Tue Dec 29 23:28:14 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C0271065670; Tue, 29 Dec 2009 23:28:14 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C1338FC15; Tue, 29 Dec 2009 23:28:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTNSDiL039962; Tue, 29 Dec 2009 23:28:13 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTNSDRB039960; Tue, 29 Dec 2009 23:28:13 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <200912292328.nBTNSDRB039960@svn.freebsd.org> From: "Justin T. Gibbs" Date: Tue, 29 Dec 2009 23:28:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201234 - head/sys/xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2009 23:28:14 -0000 Author: gibbs Date: Tue Dec 29 23:28:13 2009 New Revision: 201234 URL: http://svn.freebsd.org/changeset/base/201234 Log: Correct bug introduced while purging the -ERRNO Linuxism from the grant table API. Valid grant refs are in the range of positive 32bit integers. ENOSPACE, being 29, is also a positive integer. Return GNTTAB_LIST_END (-1) instead when gnttab_claim_grant_reference() fails. Modified: head/sys/xen/gnttab.c Modified: head/sys/xen/gnttab.c ============================================================================== --- head/sys/xen/gnttab.c Tue Dec 29 23:27:15 2009 (r201233) +++ head/sys/xen/gnttab.c Tue Dec 29 23:28:13 2009 (r201234) @@ -325,7 +325,7 @@ gnttab_claim_grant_reference(grant_ref_t grant_ref_t g = *private_head; if (unlikely(g == GNTTAB_LIST_END)) - return (ENOSPC); + return (g); *private_head = gnttab_entry(g); return (g); }