]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ISDN: fix OOM condition for sending queued I-Frames
authorKarsten Keil <keil@b1-systems.de>
Wed, 21 Oct 2015 12:18:38 +0000 (14:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Oct 2015 14:23:19 +0000 (07:23 -0700)
commitc7a7c95e8e18a3598c4d0f99c35e69dce591daf1
tree14d13afeeb24e7890b42109bac28e95520fcfde6
parent4ef7ea9195ea73262cd9730fb54e1eb726da157b
ISDN: fix OOM condition for sending queued I-Frames

The skb_clone() return value was not checked and the skb_realloc_headroom()
usage was wrong, the old skb was not freed. It turned out, that the
skb_clone is not needed at all, the skb_realloc_headroom() will create a
private copy with enough headroom and the original SKB can be used for the
ACK queue.
We need to requeue the original skb if the call failed, since the upper
layer cannot be informed about memory shortage.

Thanks to Insu Yun <wuninsu@gmail.com> to remind me on this issue.

Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/hisax/isdnl2.c