Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1698352

Re: [PATCH v3 1/3] ptp: introduce ptp auxiliary worker

From Grygorii Strashko <grygorii.strashko@ti.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 1/3] ptp: introduce ptp auxiliary worker
Date 2017-07-28 00:40 +0200
Message-ID <u7ZBL-3Gi-7@gated-at.bofh.it> (permalink)
References <u7COR-6b0-3@gated-at.bofh.it> <u7COR-6b0-11@gated-at.bofh.it> <u7XgB-2jE-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 07/27/2017 03:08 PM, Richard Cochran wrote:
> On Wed, Jul 26, 2017 at 05:11:36PM -0500, Grygorii Strashko wrote:
>> @@ -217,6 +231,19 @@ struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
>>   	mutex_init(&ptp->pincfg_mux);
>>   	init_waitqueue_head(&ptp->tsev_wq);
>>   
>> +	if (ptp->info->do_aux_work) {
>> +		char *worker_name = kasprintf(GFP_KERNEL, "ptp%d", ptp->index);
> 
> This string is allocated but never freed.
> 
>> +		kthread_init_delayed_work(&ptp->aux_work, ptp_aux_kworker);
>> +		ptp->kworker = kthread_create_worker(0, worker_name ?
>> +						     worker_name : info->name);

Ops. Right need to add kfree(worker_name) here.


>> +		if (IS_ERR(ptp->kworker)) {
>> +			err = PTR_ERR(ptp->kworker);
>> +			pr_err("failed to create ptp aux_worker %d\n", err);
>> +			goto kworker_err;
>> +		}
>> +	}
>> +
> 
> Thanks,
> Richard
> 

-- 
regards,
-grygorii

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v3 1/3] ptp: introduce ptp auxiliary worker Grygorii Strashko <grygorii.strashko@ti.com> - 2017-07-27 00:20 +0200
  Re: [PATCH v3 1/3] ptp: introduce ptp auxiliary worker Richard Cochran <richardcochran@gmail.com> - 2017-07-27 22:10 +0200
    Re: [PATCH v3 1/3] ptp: introduce ptp auxiliary worker Grygorii Strashko <grygorii.strashko@ti.com> - 2017-07-28 00:40 +0200

csiph-web