]> git.baikalelectronics.ru Git - kernel.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)
commit9fc155a6e1159dd54eb3575e96bce665c2d779e9
tree14d13afeeb24e7890b42109bac28e95520fcfde6
parentb1107689533ffcd1330bb0ab258c1e465fc62cc0
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