linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen/pciback: Fix error return code in xen_pcibk_attach()
@ 2014-07-20  5:46 weiyj_lk
  2014-07-23 13:01 ` [Xen-devel] " Jan Beulich
  2014-07-31 18:09 ` David Vrabel
  0 siblings, 2 replies; 3+ messages in thread
From: weiyj_lk @ 2014-07-20  5:46 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, Boris Ostrovsky, David Vrabel
  Cc: Wei Yongjun, xen-devel, linux-kernel

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Fix to return -EFAULT from the error handling case instead of 0 when
version mismatch with pcifront.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/xen/xen-pciback/xenbus.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers/xen/xen-pciback/xenbus.c
index 4a7e6e0..c214daa 100644
--- a/drivers/xen/xen-pciback/xenbus.c
+++ b/drivers/xen/xen-pciback/xenbus.c
@@ -174,6 +174,7 @@ static int xen_pcibk_attach(struct xen_pcibk_device *pdev)
 				 "version mismatch (%s/%s) with pcifront - "
 				 "halting " DRV_NAME,
 				 magic, XEN_PCI_MAGIC);
+		err = -EFAULT;
 		goto out;
 	}
 


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Xen-devel] [PATCH] xen/pciback: Fix error return code in xen_pcibk_attach()
  2014-07-20  5:46 [PATCH] xen/pciback: Fix error return code in xen_pcibk_attach() weiyj_lk
@ 2014-07-23 13:01 ` Jan Beulich
  2014-07-31 18:09 ` David Vrabel
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2014-07-23 13:01 UTC (permalink / raw)
  To: weiyj_lk, David Vrabel, Boris Ostrovsky, Konrad Rzeszutek Wilk
  Cc: xen-devel, Wei Yongjun, linux-kernel

>>> On 20.07.14 at 07:46, <weiyj_lk@163.com> wrote:
> --- a/drivers/xen/xen-pciback/xenbus.c
> +++ b/drivers/xen/xen-pciback/xenbus.c
> @@ -174,6 +174,7 @@ static int xen_pcibk_attach(struct xen_pcibk_device *pdev)
>  				 "version mismatch (%s/%s) with pcifront - "
>  				 "halting " DRV_NAME,
>  				 magic, XEN_PCI_MAGIC);
> +		err = -EFAULT;
>  		goto out;
>  	}
>  

While -EFAULT is kind of odd here, I realize this is because the same
also gets passed to xenbus_dev_fatal(); -EILSEQ, -ENODATA, or
-EPROTO (despite it normally being network specific) would seem
better to me.

In any event
Reviewed-by Jan Beulich <jbeulich@suse.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xen/pciback: Fix error return code in xen_pcibk_attach()
  2014-07-20  5:46 [PATCH] xen/pciback: Fix error return code in xen_pcibk_attach() weiyj_lk
  2014-07-23 13:01 ` [Xen-devel] " Jan Beulich
@ 2014-07-31 18:09 ` David Vrabel
  1 sibling, 0 replies; 3+ messages in thread
From: David Vrabel @ 2014-07-31 18:09 UTC (permalink / raw)
  To: weiyj_lk, Konrad Rzeszutek Wilk, Boris Ostrovsky
  Cc: Wei Yongjun, xen-devel, linux-kernel

On 20/07/14 06:46, weiyj_lk@163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Fix to return -EFAULT from the error handling case instead of 0 when
> version mismatch with pcifront.

Applied to devel/for-linus-3.16

Although the return value of this function is never used.

David

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-31 18:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-20  5:46 [PATCH] xen/pciback: Fix error return code in xen_pcibk_attach() weiyj_lk
2014-07-23 13:01 ` [Xen-devel] " Jan Beulich
2014-07-31 18:09 ` David Vrabel

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).