[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1444926568-29572-1-git-send-email-wuninsu@gmail.com>
Date:	Thu, 15 Oct 2015 12:29:27 -0400
From:	Insu Yun <wuninsu@...il.com>
To:	isdn@...ux-pingi.de, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc:	taesoo@...ech.edu, yeongjin.jang@...ech.edu, insu@...ech.edu,
	Insu Yun <wuninsu@...il.com>
Subject: [PATCH 1/2] isdn: correctly check failed allocation
Since skb_clone can be failed in memory pressure,
return value of skb_clone needs to be checked.
Signed-off-by: Insu Yun <wuninsu@...il.com>
---
 drivers/isdn/hisax/isdnl2.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/drivers/isdn/hisax/isdnl2.c b/drivers/isdn/hisax/isdnl2.c
index 18accb0..e74f847 100644
--- a/drivers/isdn/hisax/isdnl2.c
+++ b/drivers/isdn/hisax/isdnl2.c
@@ -1284,6 +1284,10 @@ l2_pull_iqueue(struct FsmInst *fi, int event, void *arg)
 	}
 	l2->windowar[p1] = skb_clone(skb, GFP_ATOMIC);
 
+  if (!l2->windowar[p1]) {
+    return;
+  }
+
 	i = sethdraddr(&st->l2, header, CMD);
 
 	if (test_bit(FLG_MOD128, &l2->flag)) {
-- 
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
