Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Anton Vasilyev <vasilyev@ispras.ru>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Sangbeom Kim <sbkim73@samsung.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	ldv-project@linuxtesting.org
Subject: Re: [PATCH v4] ASoC: samsung: i2s: Null pointer dereference on samsung_i2s_remove
Date: Tue, 15 Aug 2017 19:29:58 +0200	[thread overview]
Message-ID: <20170815172958.q2kd75w2p2seypsa@kozik-lap> (raw)
In-Reply-To: <1502799594-596-1-git-send-email-vasilyev@ispras.ru>

On Tue, Aug 15, 2017 at 03:19:54PM +0300, Anton Vasilyev wrote:
> If (quirks & QUIRK_SEC_DAI == 0) then samsung_i2s_probe() doesn't allocate
> sec_dai and pri_dai->sec_dai remains Null, but samsung_i2s_remove()
> performs pri_dai->sec_dai dereference in any case.
> 
> The patch removes useless reinitialization of sec_dai at
> samsung_i2s_remove(), because resources are under devm control.
> 
> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
> ---
> v2: Drop initialization of sec_dai by NULL at samsung_i2s_remove
> as Sylwester Nawrocki suggest.
> ---
> v3: Fix typo in the comment
> ---
> v4: Change comment based on Krzysztof review.
> ---
>  sound/soc/samsung/i2s.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 

Acked-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

      reply	other threads:[~2017-08-15 17:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-15 12:19 [PATCH v4] ASoC: samsung: i2s: Null pointer dereference on samsung_i2s_remove Anton Vasilyev
2017-08-15 17:29 ` Krzysztof Kozlowski [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=20170815172958.q2kd75w2p2seypsa@kozik-lap \
    --to=krzk@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ldv-project@linuxtesting.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=s.nawrocki@samsung.com \
    --cc=sbkim73@samsung.com \
    --cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox