* [PATCH] loadpolicy: only close polFd if it is valid
@ 2016-02-10 16:32 Ian Campbell
2016-02-11 11:20 ` Wei Liu
0 siblings, 1 reply; 4+ messages in thread
From: Ian Campbell @ 2016-02-10 16:32 UTC (permalink / raw)
To: Daniel De Graaf, ian.jackson, wei.liu2, xen-devel; +Cc: Ian Campbell
It can be -1 at this point.
CID 1055562
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
tools/flask/utils/loadpolicy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/flask/utils/loadpolicy.c b/tools/flask/utils/loadpolicy.c
index 47b5139..76710a2 100644
--- a/tools/flask/utils/loadpolicy.c
+++ b/tools/flask/utils/loadpolicy.c
@@ -115,7 +115,7 @@ done:
if ( ret < 0 )
fprintf(stderr, "Unable to unmap policy memory: %s\n", strerror(errno));
}
- if ( polFd )
+ if ( polFd >= 0 )
close(polFd);
if ( xch )
xc_interface_close(xch);
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] loadpolicy: only close polFd if it is valid
2016-02-10 16:32 [PATCH] loadpolicy: only close polFd if it is valid Ian Campbell
@ 2016-02-11 11:20 ` Wei Liu
2016-02-23 10:30 ` Ian Campbell
0 siblings, 1 reply; 4+ messages in thread
From: Wei Liu @ 2016-02-11 11:20 UTC (permalink / raw)
To: Ian Campbell; +Cc: wei.liu2, Daniel De Graaf, ian.jackson, xen-devel
On Wed, Feb 10, 2016 at 04:32:39PM +0000, Ian Campbell wrote:
> It can be -1 at this point.
>
> CID 1055562
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
> ---
> tools/flask/utils/loadpolicy.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/flask/utils/loadpolicy.c b/tools/flask/utils/loadpolicy.c
> index 47b5139..76710a2 100644
> --- a/tools/flask/utils/loadpolicy.c
> +++ b/tools/flask/utils/loadpolicy.c
> @@ -115,7 +115,7 @@ done:
> if ( ret < 0 )
> fprintf(stderr, "Unable to unmap policy memory: %s\n", strerror(errno));
> }
> - if ( polFd )
> + if ( polFd >= 0 )
> close(polFd);
> if ( xch )
> xc_interface_close(xch);
> --
> 2.1.4
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] loadpolicy: only close polFd if it is valid
2016-02-11 11:20 ` Wei Liu
@ 2016-02-23 10:30 ` Ian Campbell
2016-02-29 15:49 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 4+ messages in thread
From: Ian Campbell @ 2016-02-23 10:30 UTC (permalink / raw)
To: Wei Liu; +Cc: Daniel De Graaf, ian.jackson, xen-devel
On Thu, 2016-02-11 at 11:20 +0000, Wei Liu wrote:
> On Wed, Feb 10, 2016 at 04:32:39PM +0000, Ian Campbell wrote:
> > It can be -1 at this point.
> >
> > CID 1055562
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
>
> Acked-by: Wei Liu <wei.liu2@citrix.com>
Ian, will you commit this one?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] loadpolicy: only close polFd if it is valid
2016-02-23 10:30 ` Ian Campbell
@ 2016-02-29 15:49 ` Konrad Rzeszutek Wilk
0 siblings, 0 replies; 4+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-02-29 15:49 UTC (permalink / raw)
To: Ian Campbell; +Cc: ian.jackson, Daniel De Graaf, Wei Liu, xen-devel
On Tue, Feb 23, 2016 at 10:30:12AM +0000, Ian Campbell wrote:
> On Thu, 2016-02-11 at 11:20 +0000, Wei Liu wrote:
> > On Wed, Feb 10, 2016 at 04:32:39PM +0000, Ian Campbell wrote:
> > > It can be -1 at this point.
> > >
> > > CID 1055562
> > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> >
> > Acked-by: Wei Liu <wei.liu2@citrix.com>
>
> Ian, will you commit this one?
Applied.
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-29 15:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-10 16:32 [PATCH] loadpolicy: only close polFd if it is valid Ian Campbell
2016-02-11 11:20 ` Wei Liu
2016-02-23 10:30 ` Ian Campbell
2016-02-29 15:49 ` Konrad Rzeszutek Wilk
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).