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: <20150207093322.GA5206@mwanda>
Date:	Sat, 7 Feb 2015 12:33:23 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc:	"James E. J. Bottomley" <JBottomley@...allels.com>,
	QLogic-Storage-Upstream@...gic.com, linux-scsi@...r.kernel.org,
	LKML <linux-kernel@...r.kernel.org>,
	kernel-janitors@...r.kernel.org,
	Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH 2/4] SCSI-QLA4...: Less function calls in
 qla4xxx_is_session_exists() after error detection

On Fri, Feb 06, 2015 at 11:15:13PM +0100, SF Markus Elfring wrote:
> diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
> index 2a00fd3..a7ca479 100644
> --- a/drivers/scsi/qla4xxx/ql4_os.c
> +++ b/drivers/scsi/qla4xxx/ql4_os.c
> @@ -6327,17 +6327,15 @@ static int qla4xxx_is_session_exists(struct scsi_qla_host *ha,
>  				     uint32_t *index)
>  {
>  	struct ddb_entry *ddb_entry;
> -	struct ql4_tuple_ddb *fw_tddb = NULL;
> -	struct ql4_tuple_ddb *tmp_tddb = NULL;
>  	int idx;
>  	int ret = QLA_ERROR;
> +	struct ql4_tuple_ddb *tmp_tddb;
> +	struct ql4_tuple_ddb *fw_tddb = vzalloc(sizeof(*fw_tddb));
>  

Don't do allocations in the initializers.  Same for patches 3 and 4 as
well.

regards,
dan carpenter


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ