Commit d70063c4 authored by Al Viro's avatar Al Viro Committed by David S. Miller

[ATM]: Fix dereference of uninitialized pointer in zatm

Fixing breakage from [NET]: Kill skb->list - original was
	assign vcc
	do a bunch of stuff using ZATM_VCC(vcc)->pool as common subexpression
Now we do
	int pos = ZATM_VCC(vcc)->pool;
	assign vcc
	do a bunch of stuff
even though vcc is not even initialized when we enter that block...
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6475be16
...@@ -417,9 +417,9 @@ printk("dummy: 0x%08lx, 0x%08lx\n",dummy[0],dummy[1]); ...@@ -417,9 +417,9 @@ printk("dummy: 0x%08lx, 0x%08lx\n",dummy[0],dummy[1]);
chan = (here[3] & uPD98401_AAL5_CHAN) >> chan = (here[3] & uPD98401_AAL5_CHAN) >>
uPD98401_AAL5_CHAN_SHIFT; uPD98401_AAL5_CHAN_SHIFT;
if (chan < zatm_dev->chans && zatm_dev->rx_map[chan]) { if (chan < zatm_dev->chans && zatm_dev->rx_map[chan]) {
int pos = ZATM_VCC(vcc)->pool; int pos;
vcc = zatm_dev->rx_map[chan]; vcc = zatm_dev->rx_map[chan];
pos = ZATM_VCC(vcc)->pool;
if (skb == zatm_dev->last_free[pos]) if (skb == zatm_dev->last_free[pos])
zatm_dev->last_free[pos] = NULL; zatm_dev->last_free[pos] = NULL;
skb_unlink(skb, zatm_dev->pool + pos); skb_unlink(skb, zatm_dev->pool + pos);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment