From: Don Slutz <dslutz@verizon.com>
To: Ian Campbell <Ian.Campbell@citrix.com>, Don Slutz <dslutz@verizon.com>
Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Harry Hart <hhart@verizon.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH 1/4] libxc/xc_linux_osdep.c: Fix return handling for case of mmap failure
Date: Wed, 30 Jul 2014 21:11:12 -0400 [thread overview]
Message-ID: <53D997B0.60207@terremark.com> (raw)
In-Reply-To: <1406720529.31718.16.camel@kazak.uk.xensource.com>
On 07/30/14 07:42, Ian Campbell wrote:
> On Mon, 2014-07-28 at 12:05 -0400, Don Slutz wrote:
>> From: Harry Hart <hhart@verizon.com>
>>
>> Callers expect NULL on errors not MAP_FAILED.
>>
>> Signed-off-by: Harry Hart <hhart@verizon.com>
>> Signed-off-by: Don Slutz <dslutz@verizon.com>
>> ---
>> tools/libxc/xc_linux_osdep.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/tools/libxc/xc_linux_osdep.c b/tools/libxc/xc_linux_osdep.c
>> index 86bff3e..9745feb 100644
>> --- a/tools/libxc/xc_linux_osdep.c
>> +++ b/tools/libxc/xc_linux_osdep.c
>> @@ -102,6 +102,11 @@ static void *linux_privcmd_alloc_hypercall_buffer(xc_interface *xch, xc_osdep_ha
>> return NULL;
>> }
>>
>> + if (p == MAP_FAILED) {
>> + PERROR ("linux_privcmd_alloc_hypercall_buffer: mmap failed");
>> + return NULL;
>> + }
> The return NULL just above in the context is the same check as this.
> Rebasing mistake?
>
>
>
Yup.
-Don Slutz
next prev parent reply other threads:[~2014-07-31 1:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-28 16:05 [PATCH 0/4] Fix mmap return checking Don Slutz
2014-07-28 16:05 ` [PATCH 1/4] libxc/xc_linux_osdep.c: Fix return handling for case of mmap failure Don Slutz
2014-07-30 11:42 ` Ian Campbell
2014-07-31 1:11 ` Don Slutz [this message]
2014-07-28 16:06 ` [PATCH 2/4] loadpolicy.c: " Don Slutz
2014-07-28 16:06 ` [PATCH 3/4] libxl_internal.c: " Don Slutz
2014-07-28 16:06 ` [PATCH 4/4] xenbaked.c: " Don Slutz
2014-07-30 11:58 ` [PATCH 0/4] Fix mmap return checking Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53D997B0.60207@terremark.com \
--to=dslutz@verizon.com \
--cc=Ian.Campbell@citrix.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=hhart@verizon.com \
--cc=ian.jackson@eu.citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).