lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180423095859.vdi7f7r267urodlx@citrix.com>
Date:   Mon, 23 Apr 2018 10:58:59 +0100
From:   Wei Liu <wei.liu2@...rix.com>
To:     Stanislav Kinsburskii <staskins@...zon.com>
CC:     <jakub.kicinski@...ronome.com>, <hpa@...or.com>,
        <mcroce@...hat.com>, <tglx@...utronix.de>, <ggarcia@...a.uab.cat>,
        <daniel@...earbox.net>, <x86@...nel.org>, <mingo@...hat.com>,
        <xen-devel@...ts.xenproject.org>, <axboe@...nel.dk>,
        <konrad.wilk@...cle.com>, <amir.jer.levy@...el.com>,
        <paul.durrant@...rix.com>, <stefanha@...hat.com>,
        <dsa@...ulusnetworks.com>, <boris.ostrovsky@...cle.com>,
        <jgross@...e.com>, <linux-block@...r.kernel.org>,
        <wei.liu2@...rix.com>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <davem@...emloft.net>,
        <dwmw@...zon.co.uk>, <roger.pau@...rix.com>
Subject: Re: [PATCH 2/3] xen netback: add fault injection facility

On Fri, Apr 20, 2018 at 10:47:31AM +0000, Stanislav Kinsburskii wrote:
>  
>  #include <linux/kthread.h>
>  #include <linux/if_vlan.h>
> @@ -1649,6 +1650,7 @@ static int __init netback_init(void)
>  			PTR_ERR(xen_netback_dbg_root));
>  #endif /* CONFIG_DEBUG_FS */
>  
> +	(void) xen_netbk_fi_init();

If you care about the return value, please propagate it to
netback_init's caller. Otherwise you can just make the function return
void.

> +
> +int xenvif_fi_init(struct xenvif *vif)
> +{
> +	struct dentry *parent;
> +	struct xenvif_fi *vfi;
> +	int fi, err = -ENOMEM;
> +
> +	parent = vif_fi_dir;
> +	if (!parent)
> +		return -ENOMEM;
> +
> +	vfi = kmalloc(sizeof(*vfi), GFP_KERNEL);
> +	if (!vfi)
> +		return -ENOMEM;
> +
> +	vfi->dir = debugfs_create_dir(vif->dev->name, parent);
> +	if (!vfi->dir)
> +		goto err_dir;
> +
> +	for (fi = 0; fi < XENVIF_FI_MAX; fi++) {
> +		vfi->faults[fi] = xen_fi_dir_add(vfi->dir,
> +				xenvif_fi_names[fi]);
> +		if (!vfi->faults[fi])
> +			goto err_fault;
> +	}
> +
> +	vif->fi_info = vfi;
> +	return 0;
> +
> +err_fault:
> +	for (; fi > 0; fi--)

fi >= 0

Wei.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ