diff mbox

[1/3] ASoC: Intel: Skylake: fix pointer scaling

Message ID 1455862354-6455-1-git-send-email-vinod.koul@intel.com (mailing list archive)
State Accepted
Commit 65b4bcb82967fd5a60694c3477e58a04a9170aea
Headers show

Commit Message

Vinod Koul Feb. 19, 2016, 6:12 a.m. UTC
From: Alan <gnomes@lxorguk.ukuu.org.uk>

skl_tplg_tlv_control_set does pointer maths on data but forgets that data
is not uint8_t so the maths is already scaled in the pointer type.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 sound/soc/intel/skylake/skl-topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown Feb. 19, 2016, 3:33 p.m. UTC | #1
On Fri, Feb 19, 2016 at 11:42:32AM +0530, Vinod Koul wrote:
> From: Alan <gnomes@lxorguk.ukuu.org.uk>
> 
> skl_tplg_tlv_control_set does pointer maths on data but forgets that data
> is not uint8_t so the maths is already scaled in the pointer type.
> 
> Signed-off-by: Alan Cox <alan@linux.intel.com>
> Signed-off-by: Vinod Koul <vinod.koul@intel.com>

Please ensure that the name and signoff match up.  I'm fairly sure that
both are for the same person here but it's not something I should have
to think about and it is important to ensure that we have signoffs for
everything.
Vinod Koul Feb. 21, 2016, 3:04 a.m. UTC | #2
On Sat, Feb 20, 2016 at 12:33:45AM +0900, Mark Brown wrote:
> On Fri, Feb 19, 2016 at 11:42:32AM +0530, Vinod Koul wrote:
> > From: Alan <gnomes@lxorguk.ukuu.org.uk>
> > 
> > skl_tplg_tlv_control_set does pointer maths on data but forgets that data
> > is not uint8_t so the maths is already scaled in the pointer type.
> > 
> > Signed-off-by: Alan Cox <alan@linux.intel.com>
> > Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> 
> Please ensure that the name and signoff match up.  I'm fairly sure that
> both are for the same person here but it's not something I should have
> to think about and it is important to ensure that we have signoffs for
> everything.

Ah, sure will do. I think Alan wanted the SOB from his empyer ID. Alan how
do you want me to fix this :) I will send this
Mark Brown Feb. 22, 2016, 3:16 a.m. UTC | #3
On Sun, Feb 21, 2016 at 08:34:57AM +0530, Vinod Koul wrote:
> On Sat, Feb 20, 2016 at 12:33:45AM +0900, Mark Brown wrote:

> > Please ensure that the name and signoff match up.  I'm fairly sure that
> > both are for the same person here but it's not something I should have
> > to think about and it is important to ensure that we have signoffs for
> > everything.

> Ah, sure will do. I think Alan wanted the SOB from his empyer ID. Alan how
> do you want me to fix this :) I will send this

Well, I already applied this one anyway since it was a fix (though I did
skip patch 2).
Vinod Koul Feb. 22, 2016, 3:33 a.m. UTC | #4
On Mon, Feb 22, 2016 at 12:16:56PM +0900, Mark Brown wrote:
> On Sun, Feb 21, 2016 at 08:34:57AM +0530, Vinod Koul wrote:
> > On Sat, Feb 20, 2016 at 12:33:45AM +0900, Mark Brown wrote:
> 
> > > Please ensure that the name and signoff match up.  I'm fairly sure that
> > > both are for the same person here but it's not something I should have
> > > to think about and it is important to ensure that we have signoffs for
> > > everything.
> 
> > Ah, sure will do. I think Alan wanted the SOB from his empyer ID. Alan how
> > do you want me to fix this :) I will send this
> 
> Well, I already applied this one anyway since it was a fix (though I did
> skip patch 2).

So travelling again :)

Yes I noticed that, will send the patch 2 in a short while
diff mbox

Patch

diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index ba0d02d1613e..22a9e6fe1c05 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -1111,7 +1111,7 @@  static int skl_tplg_tlv_control_set(struct snd_kcontrol *kcontrol,
 				return -EFAULT;
 		} else {
 			if (copy_from_user(ac->params,
-					   data + 2 * sizeof(u32), size))
+					   data + 2, size))
 				return -EFAULT;
 		}