From: "Grandhi, Sainath" <sainath.grandhi@intel.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"mahesh@bandewar.net" <mahesh@bandewar.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCHv1 5/7] TAP: Extending tap device create/destroy APIs
Date: Tue, 17 Jan 2017 23:07:37 +0000 [thread overview]
Message-ID: <2C5142675EC1274EAB6230F72F8DC95F28C6C540@ORSMSX113.amr.corp.intel.com> (raw)
In-Reply-To: <1483744559.9712.47.camel@edumazet-glaptop3.roam.corp.google.com>
> -----Original Message-----
> From: Eric Dumazet [mailto:eric.dumazet@gmail.com]
> Sent: Friday, January 06, 2017 3:16 PM
> To: Grandhi, Sainath <sainath.grandhi@intel.com>
> Cc: netdev@vger.kernel.org; davem@davemloft.net;
> mahesh@bandewar.net; linux-kernel@vger.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.
>
Thanks for pointing out. Will send out next version that takes care of null pointer
next prev parent reply other threads:[~2017-01-17 23:08 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-06 22:33 [PATCHv1 0/7] Refactor macvtap to re-use tap functionality by other virtual intefaces Sainath Grandhi
2017-01-06 22:33 ` [PATCHv1 1/7] TAP: Refactoring macvtap.c Sainath Grandhi
2017-01-06 23:12 ` Andy Shevchenko
2017-01-06 22:33 ` [PATCHv1 2/7] TAP: Renaming tap related APIs, data structures, macros Sainath Grandhi
2017-01-07 10:44 ` kbuild test robot
2017-01-07 12:00 ` kbuild test robot
2017-01-06 22:33 ` [PATCHv1 3/7] TAP: Tap character device creation/destroy API Sainath Grandhi
2017-01-06 22:33 ` [PATCHv1 4/7] TAP: Abstract type of virtual interface from tap implementation Sainath Grandhi
2017-01-06 22:33 ` [PATCHv1 5/7] TAP: Extending tap device create/destroy APIs Sainath Grandhi
2017-01-06 23:15 ` Eric Dumazet
2017-01-17 23:07 ` Grandhi, Sainath [this message]
2017-01-06 23:20 ` Andy Shevchenko
2017-01-17 23:51 ` Grandhi, Sainath
2017-01-06 22:33 ` [PATCHv1 6/7] TAP: tap as an independent module Sainath Grandhi
2017-01-07 10:46 ` kbuild test robot
2017-01-07 12:32 ` kbuild test robot
2017-01-06 22:33 ` [PATCHv1 7/7] IPVTAP: IP-VLAN based tap driver Sainath Grandhi
2017-01-06 23:14 ` Eric Dumazet
2017-01-17 23:06 ` Grandhi, Sainath
2017-01-06 23:46 ` Mahesh Bandewar (महेश बंडेवार)
2017-01-17 23:49 ` Grandhi, Sainath
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2C5142675EC1274EAB6230F72F8DC95F28C6C540@ORSMSX113.amr.corp.intel.com \
--to=sainath.grandhi@intel.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mahesh@bandewar.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®