wcb4xxp: Prevent null pointer dereference on spanconfig
In the rare case where spanconfig is called while there is pending data on the hdlc channel, the hdlc_getbuf interrupt could try to read from the hdlc buffer before the channel was fully setup. This could potentially result in a null pointer dereference. This condition has existed since the creation of the wcb4xxp driver. Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com> Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10079 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
parent
00764f705c
commit
1813c9ad09
@ -2375,6 +2375,9 @@ b4xxp_chanconfig(struct file *file, struct dahdi_chan *chan, int sigtype)
|
||||
|
||||
if (alreadyrunning && bspan->sigchan) {
|
||||
hdlc_stop(b4, fifo);
|
||||
atomic_set(&bspan->hdlc_pending, 0);
|
||||
bspan->sigactive = 0;
|
||||
smp_mb();
|
||||
bspan->sigchan = NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user