]> git.baikalelectronics.ru Git - kernel.git/commit
mISDN: fix OOM condition for sending queued I-Frames
authorKarsten Keil <keil@b1-systems.de>
Wed, 21 Oct 2015 12:18:39 +0000 (14:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Oct 2015 14:23:19 +0000 (07:23 -0700)
commit0a9efbab5ec52a6ff023fb52524eff41110d05d4
tree01de4f3ad8098331f6c94d54c77b82398c92b3ec
parent9fc155a6e1159dd54eb3575e96bce665c2d779e9
mISDN: fix OOM condition for sending queued I-Frames

The old code did not check the return value of skb_clone().
The extra skb_clone() is not needed at all, if using skb_realloc_headroom()
instead, which gives us a private copy with enough headroom as well.
We need to requeue the original skb if the call failed, because we cannot
inform upper layers about the data loss. Restructure the code to minimise
rollback effort if it happens.
This fix kernel bug #86091

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/mISDN/layer2.c