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: <20170511101016.GE22134@linaro.org>
Date:   Thu, 11 May 2017 19:10:18 +0900
From:   AKASHI Takahiro <takahiro.akashi@...aro.org>
To:     "Luis R. Rodriguez" <mcgrof@...nel.org>
Cc:     gregkh@...uxfoundation.org, wagi@...om.org, dwmw2@...radead.org,
        rafal@...ecki.pl, arend.vanspriel@...adcom.com, rjw@...ysocki.net,
        yi1.li@...ux.intel.com, atull@...nsource.altera.com,
        moritz.fischer@...us.com, pmladek@...e.com,
        johannes.berg@...el.com, emmanuel.grumbach@...el.com,
        luciano.coelho@...el.com, kvalo@...eaurora.org, luto@...nel.org,
        torvalds@...ux-foundation.org, keescook@...omium.org,
        dhowells@...hat.com, pjones@...hat.com, hdegoede@...hat.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 3/5] test: add new driver_data load tester

Luis,

On Tue, May 02, 2017 at 01:49:12AM -0700, Luis R. Rodriguez wrote:
> 
> diff --git a/lib/test_driver_data.c b/lib/test_driver_data.c
> new file mode 100644
> index 000000000000..488cc6e9eed4
> --- /dev/null
> +++ b/lib/test_driver_data.c

  ...

> +static int trigger_config_sync(struct driver_data_test_device *test_dev)
> +{
> +	struct test_config *config = &test_dev->config;
> +	int ret;
> +	const struct driver_data_req_params req_params_default = {
> +		DRIVER_DATA_DEFAULT_SYNC_REQS(config_sync_req_cb, test_dev,
> +					      DRIVER_DATA_REQ_OPTIONAL |
> +					      DRIVER_DATA_REQ_KEEP)

Are these flags always on?

> +void free_test_dev_driver_data(struct driver_data_test_device *test_dev)
> +{
> +	kfree_const(test_dev->misc_dev.name);
> +	test_dev->misc_dev.name = NULL;
> +	vfree(test_dev);
> +	test_dev = NULL;
> +	driver_data_config_free(test_dev);

Removing this test module fails.

The last three lines should be:
	driver_data_config_free(test_dev);
	vfree(test_dev);

> +}
> +
> +void unregister_test_dev_driver_data(struct driver_data_test_device *test_dev)
> +{
> +	wait_for_completion_timeout(&test_dev->request_complete, 5 * HZ);
> +	dev_info(test_dev->dev, "removing interface\n");
> +	misc_deregister(&test_dev->misc_dev);
> +	kfree(&test_dev->misc_dev.name);

Don't need this kfree().

Thanks,
-Takahiro AKASHI

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ