diff options
author | Jesper Juhl <jj@chaosbits.net> | 2011-02-13 11:49:32 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-14 01:55:46 +0100 |
commit | da1ab3e233eb1ff4116b178006a89ddca7dcd928 (patch) | |
tree | 72af09bc5dac22d6a160715691a40b24b341ce4c /drivers/ide/amd74xx.c | |
parent | Net, USB, Option, hso: Do not dereference NULL pointer (diff) | |
download | linux-da1ab3e233eb1ff4116b178006a89ddca7dcd928.tar.xz linux-da1ab3e233eb1ff4116b178006a89ddca7dcd928.zip |
ATM, Solos PCI ADSL2+: Don't deref NULL pointer if net_ratelimit() and alloc_skb() interact badly.
If alloc_skb() fails to allocate memory and returns NULL then we want to
return -ENOMEM from drivers/atm/solos-pci.c::popen() regardless of the
value of net_ratelimit(). The way the code is today, we may not return if
net_ratelimit() returns 0, then we'll proceed to pass a NULL pointer to
skb_put() which will blow up in our face.
This patch ensures that we always return -ENOMEM on alloc_skb() failure
and only let the dev_warn() be controlled by the value of net_ratelimit().
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ide/amd74xx.c')
0 files changed, 0 insertions, 0 deletions