All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: alsa-devel@alsa-project.org
Cc: liam.r.girdwood@linux.intel.com, tiwai@suse.de,
	broonie@kernel.org, Vinod Koul <vinod.koul@intel.com>,
	patches.audio@intel.com
Subject: [PATCH v2 1/3] ALSA: hdac: Fix size allocation for ext device allocation
Date: Sun, 23 Aug 2015 11:52:49 +0530	[thread overview]
Message-ID: <1440310971-14849-1-git-send-email-vinod.koul@intel.com> (raw)

While creating hdac_ext_device, we used hdev for sizeof insteadof
edev, which resulted in eventual crash of the system Fix the size
here

Fixes: a512f5611646 ('ALSA: hdac: add hdac extended device')
Reported-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 sound/hda/ext/hdac_ext_bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/hda/ext/hdac_ext_bus.c b/sound/hda/ext/hdac_ext_bus.c
index 8544e4fb1cd3..4449d1a99089 100644
--- a/sound/hda/ext/hdac_ext_bus.c
+++ b/sound/hda/ext/hdac_ext_bus.c
@@ -139,7 +139,7 @@ int snd_hdac_ext_bus_device_init(struct hdac_ext_bus *ebus, int addr)
 	char name[15];
 	int ret;
 
-	edev = kzalloc(sizeof(*hdev), GFP_KERNEL);
+	edev = kzalloc(sizeof(*edev), GFP_KERNEL);
 	if (!edev)
 		return -ENOMEM;
 	hdev = &edev->hdac;
-- 
1.9.1

             reply	other threads:[~2015-08-23  6:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-23  6:22 Vinod Koul [this message]
2015-08-23  6:22 ` [PATCH v2 2/3] ALSA: hdac: fix the spbmaxfifo API Vinod Koul
2015-08-23  6:22 ` [PATCH v2 3/3] ALSA: hdac: Add snd_hdac_get_hdac_stream() Vinod Koul
2015-08-23  7:44 ` [PATCH v2 1/3] ALSA: hdac: Fix size allocation for ext device allocation Takashi Iwai

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=1440310971-14849-1-git-send-email-vinod.koul@intel.com \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=patches.audio@intel.com \
    --cc=tiwai@suse.de \
    /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.