All of lore.kernel.org
 help / color / mirror / Atom feed
* HID: intel_ish-hid: tx_buf memory leak on probe/remove
@ 2018-07-23 17:56 Anton Vasilyev
  2018-07-23 21:55 ` Srinivas Pandruvada
  0 siblings, 1 reply; 6+ messages in thread
From: Anton Vasilyev @ 2018-07-23 17:56 UTC (permalink / raw)
  To: Srinivas Pandruvada
  Cc: Jiri Kosina, Benjamin Tissoires, Even Xu, linux-input,
	linux-kernel, ldv-project, Anton Vasilyev

ish_dev_init() allocates 512*176 bytes memory for tx_buf and stores it at
&dev->wr_free_list_head.link list on ish_probe().
But there is no deallocation of this memory in ish_remove() and in 
ish_probe()
error path.
So current intel-ish-ipc provides 88 KB memory leak for each probe/release.

I have two ideas 1) to replace kzalloc allocation by devm_kzalloc,
or 2) release memory stored at &dev->wr_free_list_head.link list (and 
may be at
&dev->wr_processing_list_head.link) in all driver exits.

But I do not know which way is preferable for this case.

Found by Linux Driver Verification project (linuxtesting.org).

--
Anton Vasilyev
Linux Verification Center, ISPRAS
web: http://linuxtesting.org
e-mail: vasilyev@ispras.ru

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-08-02 11:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-23 17:56 HID: intel_ish-hid: tx_buf memory leak on probe/remove Anton Vasilyev
2018-07-23 21:55 ` Srinivas Pandruvada
2018-07-24 14:34   ` [PATCH] " Anton Vasilyev
2018-07-30  1:36     ` Srinivas Pandruvada
2018-08-01 11:26       ` [PATCH v2] " Anton Vasilyev
2018-08-02 11:28         ` Jiri Kosina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.