Thread (21 messages) 21 messages, 5 authors, 2017-01-17

Re: [PATCHv1 5/7] TAP: Extending tap device create/destroy APIs

flat view

From: Eric Dumazet <hidden>
Date: 2017-01-06 23:24:26
Also in: lkml

On Fri, 2017-01-06 at 14:33 -0800, Sainath Grandhi wrote:
quoted hunk ↗ jump to hunk
+static int tap_list_add(dev_t major, const char *device_name)
+{
+	int err = 0;
+	struct major_info *tap_major;
+
+	tap_major = kzalloc(sizeof(*tap_major), GFP_ATOMIC);
+
+	tap_major->major = MAJOR(major);
+

kzalloc() can perfectly return NULL.

You do not want to crash it that happens.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help