提交 5353cf08 编写于 作者: A Alan Cox 提交者: Linus Torvalds

drivers/misc/ti-st/st_core.c: missing NULL check

Addresses https://bugzilla.kernel.org/show_bug.cgi?44431

Reported-by: <rucsoftsec@gmail.com>
Signed-off-by: NAlan Cox <alan@linux.intel.com>
Cc: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 b57b44ae
...@@ -349,6 +349,11 @@ void st_int_recv(void *disc_data, ...@@ -349,6 +349,11 @@ void st_int_recv(void *disc_data,
st_gdata->rx_skb = alloc_skb( st_gdata->rx_skb = alloc_skb(
st_gdata->list[type]->max_frame_size, st_gdata->list[type]->max_frame_size,
GFP_ATOMIC); GFP_ATOMIC);
if (st_gdata->rx_skb == NULL) {
pr_err("out of memory: dropping\n");
goto done;
}
skb_reserve(st_gdata->rx_skb, skb_reserve(st_gdata->rx_skb,
st_gdata->list[type]->reserve); st_gdata->list[type]->reserve);
/* next 2 required for BT only */ /* next 2 required for BT only */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册