[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20190129055256.GB1269@m-hyperV>
Date: Mon, 28 Jan 2019 21:52:57 -0800
From: Maya Nakamura <m.maya.nakamura@...il.com>
To: Michael Kelley <mikelley@...rosoft.com>
Cc: "lorenzo.pieralisi@....com" <lorenzo.pieralisi@....com>,
"bhelgaas@...gle.com" <bhelgaas@...gle.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
KY Srinivasan <kys@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
"olaf@...fle.de" <olaf@...fle.de>,
"apw@...onical.com" <apw@...onical.com>,
"jasowang@...hat.com" <jasowang@...hat.com>,
Sasha Levin <Alexander.Levin@...rosoft.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"driverdev-devel@...uxdriverproject.org"
<driverdev-devel@...uxdriverproject.org>,
Haiyang Zhang <haiyangz@...rosoft.com>,
vkuznets <vkuznets@...hat.com>,
"marcelo.cerri@...onical.com" <marcelo.cerri@...onical.com>
Subject: Re: [PATCH v2 2/2] PCI: hv: Refactor hv_irq_unmask() to use
cpumask_to_vpset()
On Sun, Jan 27, 2019 at 05:22:06AM +0000, Michael Kelley wrote:
> From: Maya Nakamura <m.maya.nakamura@...il.com> Sent: Saturday, January 26, 2019 12:55 AM
> >
> > @@ -953,29 +951,27 @@ static void hv_irq_unmask(struct irq_data *data)
> > */
> > params->int_target.flags |=
> > HV_DEVICE_INTERRUPT_TARGET_PROCESSOR_SET;
> > - params->int_target.vp_set.valid_bank_mask =
> > - (1ull << HV_VP_SET_BANK_COUNT_MAX) - 1;
> > +
> > + if (!alloc_cpumask_var(&tmp, GFP_KERNEL)) {
> > + res = 1;
> > + goto exit_unlock;
> > + }
> > +
> > + cpumask_and(tmp, dest, cpu_online_mask);
> > + nr_bank = cpumask_to_vpset(¶ms->int_target.vp_set, tmp);
> > + free_cpumask_var(tmp);
> > +
> > + if (!nr_bank) {
>
> There are two failures cases in cpumask_to_vpset(). One case returns
> 0, and the other case returns -1. The above test only catches the 0
> failure case. Need to modify the test to catch both cases.
>
> Michael
>
Thank you for your feedback. I will correct it in v3.
Maya
> > + res = 1;
> > + goto exit_unlock;
> > + }
> >
>
Powered by blists - more mailing lists