Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1518775

Re: [Xen PATCH] xen-netback: fix error handling output

From Juergen Gross <jgross@suse.com>
Newsgroups linux.kernel
Subject Re: [Xen PATCH] xen-netback: fix error handling output
Date 2016-11-10 10:20 +0100
Message-ID <sBTGx-3Ex-21@gated-at.bofh.it> (permalink)
References <sBeN4-1uG-45@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 08/11/16 14:34, Arnd Bergmann wrote:
> The connect function prints an unintialized error code after an
> earlier initialization was removed:
> 
> drivers/net/xen-netback/xenbus.c: In function 'connect':
> drivers/net/xen-netback/xenbus.c:938:3: error: 'err' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> 
> This prints it as -EINVAL instead, which seems to be the most
> appropriate error code. Before the patch that caused the warning,
> this would print a positive number returned by vsscanf() instead,
> which is also wrong. We probably don't need a backport though,
> as fixing the warning here should be sufficient.
> 
> Fixes: f95842e7a9f2 ("xen: make use of xenbus_read_unsigned() in xen-netback")
> Fixes: 8d3d53b3e433 ("xen-netback: Add support for multiple queues")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied to xen/tip.git for-linus-4.10


Thanks,

Juergen

> ---
>  drivers/net/xen-netback/xenbus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c
> index 7356e00fac54..bfed79877b8a 100644
> --- a/drivers/net/xen-netback/xenbus.c
> +++ b/drivers/net/xen-netback/xenbus.c
> @@ -935,7 +935,7 @@ static void connect(struct backend_info *be)
>  					"multi-queue-num-queues", 1);
>  	if (requested_num_queues > xenvif_max_queues) {
>  		/* buggy or malicious guest */
> -		xenbus_dev_fatal(dev, err,
> +		xenbus_dev_fatal(dev, -EINVAL,
>  				 "guest requested %u queues, exceeding the maximum of %u.",
>  				 requested_num_queues, xenvif_max_queues);
>  		return;
> 

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[Xen PATCH] xen-netback: fix error handling output Arnd Bergmann <arnd@arndb.de> - 2016-11-08 14:40 +0100
  RE: [Xen PATCH] xen-netback: fix error handling output Paul Durrant <Paul.Durrant@citrix.com> - 2016-11-08 14:50 +0100
  Re: [Xen PATCH] xen-netback: fix error handling output David Miller <davem@davemloft.net> - 2016-11-10 02:30 +0100
  Re: [Xen PATCH] xen-netback: fix error handling output Juergen Gross <jgross@suse.com> - 2016-11-10 10:20 +0100

csiph-web