[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1483744559.9712.47.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Fri, 06 Jan 2017 15:15:59 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Sainath Grandhi <sainath.grandhi@...el.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, mahesh@...dewar.net,
linux-kernel@...r.kernel.org
Subject: Re: [PATCHv1 5/7] TAP: Extending tap device create/destroy APIs
On Fri, 2017-01-06 at 14:33 -0800, Sainath Grandhi wrote:
> +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.
Powered by blists - more mailing lists