All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Kosina <jikos@kernel.org>
To: Anton Vasilyev <vasilyev@ispras.ru>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Even Xu <even.xu@intel.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	ldv-project@linuxtesting.org
Subject: Re: [PATCH v2] HID: intel_ish-hid: tx_buf memory leak on probe/remove
Date: Thu, 2 Aug 2018 13:28:38 +0200 (CEST)	[thread overview]
Message-ID: <nycvar.YFH.7.76.1808021328300.25787@cbobk.fhfr.pm> (raw)
In-Reply-To: <20180801112651.6032-1-vasilyev@ispras.ru>

On Wed, 1 Aug 2018, Anton Vasilyev wrote:

> 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.
> 
> The patch replaces kzalloc allocation by devm_kzalloc and removes
> ishtp_device *dev deallocation by kfree.
> 
> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
> v2: Fix align for multi line statements

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs


      reply	other threads:[~2018-08-02 11:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=nycvar.YFH.7.76.1808021328300.25787@cbobk.fhfr.pm \
    --to=jikos@kernel.org \
    --cc=benjamin.tissoires@redhat.com \
    --cc=even.xu@intel.com \
    --cc=ldv-project@linuxtesting.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=vasilyev@ispras.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.