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: <1379700531.2301.2.camel@joe-AO722>
Date:	Fri, 20 Sep 2013 11:08:51 -0700
From:	Joe Perches <joe@...ches.com>
To:	Malahal Naineni <malahal@...ibm.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] qlge: call ql_core_dump() only if dump memory was
 allocated.

On Fri, 2013-09-20 at 11:59 -0500, Malahal Naineni wrote:
> Also changed a log message to indicate that memory was not allocated
> instead of memory not available!
[]
> diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_mpi.c b/drivers/net/ethernet/qlogic/qlge/qlge_mpi.c
[]
> @@ -1274,11 +1274,13 @@ void ql_mpi_reset_work(struct work_struct *work)
>  		return;
>  	}
>  
> -	if (!ql_core_dump(qdev, qdev->mpi_coredump)) {
> -		netif_err(qdev, drv, qdev->ndev, "Core is dumped!\n");
> -		qdev->core_is_dumped = 1;
> -		queue_delayed_work(qdev->workqueue,
> -			&qdev->mpi_core_to_log, 5 * HZ);
> +	if (qdev->mpi_coredump) {
> +		if (!ql_core_dump(qdev, qdev->mpi_coredump)) {
> +			netif_err(qdev, drv, qdev->ndev, "Core is dumped!\n");
> +			qdev->core_is_dumped = 1;
> +			queue_delayed_work(qdev->workqueue,
> +				&qdev->mpi_core_to_log, 5 * HZ);
> +		}

This can be done without adding another indentation level

	if (qdev->mpi_coredump &&
	    !ql_core_dump(qdev, qdev->mpi_coredump)) {


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ