4 Apr
2014
4 Apr
'14
5:13 p.m.
Clemens,
I realized this patch include another bug...
+static long +hwdep_write(struct snd_hwdep *hwdep, const char __user *data, long count,
loff_t *offset)
+{ ...
- /* check seqnum is not for kernel-land */
- seqnum = ((struct snd_efw_transaction *)buf)->seqnum;
- if (seqnum + 2 > SND_EFW_TRANSACTION_SEQNUM_MAX) {
count = -EINVAL;
goto end;
- }
I expect that the user data consists of __be32 array. So the correct way to calculate seqnum is:
seqnum = be32_to_cpu(((struct snd_efw_transaction *)buf)->seqnum);
Regards
Takashi Sakamoto o-takashi@sakamocchi.jp