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]
Date:	Wed, 06 Aug 2008 15:46:24 +0530
From:	Jaswinder Singh <jaswinder@...radead.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, dwmw2@...radead.org
Subject: Re: [PATCH] firmware: avoiding multiple replication for same
	firmware file

On Wed, 2008-08-06 at 15:05 +0530, Jaswinder Singh wrote:
> @@ -445,12 +484,22 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
>  		retval = -ENOENT;
>  		release_firmware(fw_priv->fw);
>  		*firmware_p = NULL;
> +		list_del(&tmp->list);
> +		kfree(tmp->name);
> +		kfree(tmp);
>  	}
>  	fw_priv->fw = NULL;
>  	mutex_unlock(&fw_lock);

This is also not required as we are doing this in release_firmware().
So :

diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index c886113..7b268d1 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -484,9 +484,6 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
 		retval = -ENOENT;
 		release_firmware(fw_priv->fw);
 		*firmware_p = NULL;
-		list_del(&tmp->list);
-		kfree(tmp->name);
-		kfree(tmp);
 	}
 	fw_priv->fw = NULL;
 	mutex_unlock(&fw_lock);


--
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