From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xen.org>, linux-kernel@vger.kernel.org
Subject: Re: [Xen-devel] [PATCH 4/4] xen/hvc: Fix up checks when the info is allocated.
Date: Tue, 3 Jul 2012 13:36:07 -0400 [thread overview]
Message-ID: <20120703173607.GA24259@phenom.dumpdata.com> (raw)
In-Reply-To: <4FF335C6020000780008D613@nat28.tlf.novell.com>
On Tue, Jul 03, 2012 at 05:11:18PM +0100, Jan Beulich wrote:
> >>> On 03.07.12 at 17:40, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
> > Coverity would complain about this - even thought it looks OK.
> >
> > CID 401957
> > Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> > ---
> > drivers/tty/hvc/hvc_xen.c | 15 ++++++---------
> > 1 files changed, 6 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
> > index 944eaeb..fbf41be 100644
> > --- a/drivers/tty/hvc/hvc_xen.c
> > +++ b/drivers/tty/hvc/hvc_xen.c
> > @@ -209,10 +209,8 @@ static int xen_hvm_console_init(void)
> > info = kzalloc(sizeof(struct xencons_info), GFP_KERNEL | __GFP_ZERO);
> > if (!info)
> > return -ENOMEM;
> > - }
> > -
> > - /* already configured */
> > - if (info->intf != NULL)
> > + } else if (info->intf != NULL) {
> > + /* already configured */
> > return 0;
>
> Is this patch perhaps stale? There appears to be a missing } here,
> without which I can't see how this would have built, ...
<sighs> Yes. That is what I get for cherry-picking and in a hurry picking
the options.
>
> > /*
> > * If the toolstack (or the hypervisor) hasn't set these values, the
> > @@ -220,6 +218,7 @@ static int xen_hvm_console_init(void)
> > * theoretically correct values, in practice they never are and they
> > * mean that a legacy toolstack hasn't initialized the pv console correctly.
> > */
> > + */
>
> ... and this one likely wouldn't build either.
Heh. It certainly does not. The "real" patch has that fix.
>
> Jan
>
> > r = hvm_get_parameter(HVM_PARAM_CONSOLE_EVTCHN, &v);
> > if (r < 0 || v == 0)
> > goto err;
> > @@ -259,12 +258,10 @@ static int xen_pv_console_init(void)
> > info = kzalloc(sizeof(struct xencons_info), GFP_KERNEL | __GFP_ZERO);
> > if (!info)
> > return -ENOMEM;
> > - }
> > -
> > - /* already configured */
> > - if (info->intf != NULL)
> > + } else if (info->intf != NULL) {
> > + /* already configured */
> > return 0;
> > -
> > + }
> > info->evtchn = xen_start_info->console.domU.evtchn;
> > info->intf = mfn_to_virt(xen_start_info->console.domU.mfn);
> > info->vtermno = HVC_COOKIE;
>
prev parent reply other threads:[~2012-07-03 17:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-03 15:40 [PATCH] various Xen fixes for v3.6 (v1) Konrad Rzeszutek Wilk
2012-07-03 15:40 ` [PATCH 1/4] xen/p2m: Optimize the get_phys_to_machine function a bit Konrad Rzeszutek Wilk
2012-07-09 15:41 ` [Xen-devel] " David Vrabel
2012-07-09 16:14 ` Konrad Rzeszutek Wilk
2012-07-03 15:40 ` [PATCH 2/4] xen/perf: Define .glob for the different hypercalls Konrad Rzeszutek Wilk
2012-07-03 16:07 ` [Xen-devel] " Jan Beulich
2012-07-03 17:38 ` Konrad Rzeszutek Wilk
2012-07-03 16:14 ` David Vrabel
2012-07-03 16:17 ` Ian Campbell
2012-07-03 17:44 ` Konrad Rzeszutek Wilk
2012-07-03 15:40 ` [PATCH 3/4] xen/acpi: Fix potential memory leak Konrad Rzeszutek Wilk
2012-07-03 15:40 ` [PATCH 4/4] xen/hvc: Fix up checks when the info is allocated Konrad Rzeszutek Wilk
2012-07-03 16:11 ` [Xen-devel] " Jan Beulich
2012-07-03 17:36 ` Konrad Rzeszutek Wilk [this message]
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=20120703173607.GA24259@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=linux-kernel@vger.kernel.org \
--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).