Merge "diag: Fix possible access to freed variable"
This commit is contained in:
commit
09f47a9c14
1 changed files with 2 additions and 0 deletions
|
@ -1275,6 +1275,7 @@ static uint8_t hdlc_reset;
|
||||||
|
|
||||||
static void hdlc_reset_timer_start(struct diag_md_session_t *info)
|
static void hdlc_reset_timer_start(struct diag_md_session_t *info)
|
||||||
{
|
{
|
||||||
|
mutex_lock(&driver->md_session_lock);
|
||||||
if (!hdlc_timer_in_progress) {
|
if (!hdlc_timer_in_progress) {
|
||||||
hdlc_timer_in_progress = 1;
|
hdlc_timer_in_progress = 1;
|
||||||
if (info)
|
if (info)
|
||||||
|
@ -1284,6 +1285,7 @@ static void hdlc_reset_timer_start(struct diag_md_session_t *info)
|
||||||
mod_timer(&driver->hdlc_reset_timer,
|
mod_timer(&driver->hdlc_reset_timer,
|
||||||
jiffies + msecs_to_jiffies(200));
|
jiffies + msecs_to_jiffies(200));
|
||||||
}
|
}
|
||||||
|
mutex_unlock(&driver->md_session_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hdlc_reset_timer_func(unsigned long data)
|
static void hdlc_reset_timer_func(unsigned long data)
|
||||||
|
|
Loading…
Add table
Reference in a new issue