Browse Source

this happens in irq context, so use appropriate locking

git.mgm/mediaproxy-ng/github/master
Richard Fuchs 13 years ago
parent
commit
afdabe640d
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      kernel-module/xt_MEDIAPROXY.c

+ 3
- 2
kernel-module/xt_MEDIAPROXY.c View File

@ -1578,10 +1578,11 @@ static u_int64_t packet_index(struct mp_crypto_context *c,
u_int16_t seq;
u_int64_t index;
long long int diff;
unsigned long flags;
seq = ntohs(rtp->seq_num);
spin_lock(&c->lock);
spin_lock_irqsave(&c->lock, flags);
/* rfc 3711 section 3.3.1 */
if (unlikely(!s->last_index))
@ -1606,7 +1607,7 @@ static u_int64_t packet_index(struct mp_crypto_context *c,
}
}
spin_unlock(&c->lock);
spin_unlock_irqrestore(&c->lock, flags);
return index;
}


Loading…
Cancel
Save