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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180614.190018.1696051015226293779.davem@davemloft.net>
Date:   Thu, 14 Jun 2018 19:00:18 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     jiazhouyang09@...il.com
Cc:     santosh@...lsio.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: cxgb3: add error handling for sysfs_create_group

From: Zhouyang Jia <jiazhouyang09@...il.com>
Date: Thu, 14 Jun 2018 21:56:11 +0800

> diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
> index 2edfdbd..73d6aa9 100644
> --- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
> +++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
> @@ -3362,6 +3362,10 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>  
>  	err = sysfs_create_group(&adapter->port[0]->dev.kobj,
>  				 &cxgb3_attr_group);
> +	if (err) {
> +		dev_err(&pdev->dev, "cannot create sysfs group\n");
> +		goto out_free_dev;
> +	}

You have to do more than this to cleanup.  For example, you have to
change the LED state back, as it has just been set to indicate that
the interface is operational.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ