提交 7f03a585 编写于 作者: A Alexey Klimov 提交者: Mauro Carvalho Chehab

V4L/DVB (10317): radio-mr800: fix radio->muted and radio->stereo

Move radio->muted and radio->stereo in section where radio mutex is
locked to avoid possible race condition problems or access to memory.
Thanks to David Ellingsworth <david@identd.dyndns.org> for pointing to
this weak place in driver.
Signed-off-by: NAlexey Klimov <klimov.linux@gmail.com>
Signed-off-by: NDouglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 6d9f13c4
......@@ -194,10 +194,10 @@ static int amradio_start(struct amradio_device *radio)
return retval;
}
mutex_unlock(&radio->lock);
radio->muted = 0;
mutex_unlock(&radio->lock);
return retval;
}
......@@ -230,10 +230,10 @@ static int amradio_stop(struct amradio_device *radio)
return retval;
}
mutex_unlock(&radio->lock);
radio->muted = 1;
mutex_unlock(&radio->lock);
return retval;
}
......@@ -284,10 +284,10 @@ static int amradio_setfreq(struct amradio_device *radio, int freq)
return retval;
}
mutex_unlock(&radio->lock);
radio->stereo = 0;
mutex_unlock(&radio->lock);
return retval;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册