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: <20170511170046.GU28800@wotan.suse.de>
Date:   Thu, 11 May 2017 19:00:46 +0200
From:   "Luis R. Rodriguez" <mcgrof@...nel.org>
To:     AKASHI Takahiro <takahiro.akashi@...aro.org>,
        "Luis R. Rodriguez" <mcgrof@...nel.org>,
        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

On Thu, May 11, 2017 at 07:10:18PM +0900, AKASHI Takahiro wrote:
> 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?

Ah no, indeed they are conditional on the config as with the others.

With this kmemleak on the test driver is back to squeaky clean, I had
failed to test with kmemleak on the test_driver after these changes,
sorry and thanks for picking this up.

> > +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);

Fixed, thanks!

> > +}
> > +
> > +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().

Indeed, thanks!

  Luis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ