From: shawvrana@gmail.com
To: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: lkml <linux-kernel@vger.kernel.org>,
David Miller <davem@davemloft.net>,
Ulrich Drepper <drepper@redhat.com>,
Andrew Morton <akpm@osdl.org>, netdev <netdev@vger.kernel.org>,
Zach Brown <zach.brown@oracle.com>,
Christoph Hellwig <hch@infradead.org>,
Chase Venters <chase.venters@clientec.com>,
Johann Borck <johann.borck@densedata.com>
Subject: Re: [take17 1/4] kevent: Core files.
Date: Fri, 8 Sep 2006 10:06:38 -0700 [thread overview]
Message-ID: <200609081006.38101.shaw@vranix.com> (raw)
In-Reply-To: <20060908063808.GA28736@2ka.mipt.ru>
I stand corrected.
On Thursday 07 September 2006 23:38, Evgeniy Polyakov wrote:
> On Thu, Sep 07, 2006 at 09:05:16PM -0700, shaw@vranix.com (shaw@vranix.com)
wrote:
> > > +static int __devinit kevent_user_init(void)
> > > +{
> > > + int err = 0;
> > > +
> > > + kevent_cache = kmem_cache_create("kevent_cache",
> > > + sizeof(struct kevent), 0, SLAB_PANIC, NULL, NULL);
> > > +
> > > + err = misc_register(&kevent_miscdev);
> > > + if (err) {
> > > + printk(KERN_ERR "Failed to register kevent miscdev: err=%d.\n",
> > > err); + goto err_out_exit;
> > > + }
> > > +
> > > + printk("KEVENT subsystem has been successfully registered.\n");
> > > +
> > > + return 0;
> > > +
> > > +err_out_exit:
> > > + kmem_cache_destroy(kevent_cache);
> > > + return err;
> > > +}
> >
> > It's probably best to treat kmem_cache_create like a black box and check
> > for it returning null.
>
> It can not return NULL, it will panic instead since I use SLAB_PANIC
> flag.
>
> > Thanks,
> > Shaw
prev parent reply other threads:[~2006-09-08 17:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1qwel34p2jrwe5.GA1898@2ka.mipt.ru>
2006-09-07 9:57 ` [take17 0/4] kevent: Generic event handling mechanism Evgeniy Polyakov
2006-09-07 9:59 ` [take17 1/4] kevent: Core files Evgeniy Polyakov
2006-09-07 9:59 ` [take17 2/4] kevent: poll/select() notifications Evgeniy Polyakov
2006-09-07 9:59 ` [take17 3/4] kevent: Socket notifications Evgeniy Polyakov
2006-09-07 9:59 ` [take17 4/4] kevent: Timer notifications Evgeniy Polyakov
2006-09-08 4:05 ` [take17 1/4] kevent: Core files shaw
2006-09-08 6:38 ` Evgeniy Polyakov
2006-09-08 17:06 ` shawvrana [this message]
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=200609081006.38101.shaw@vranix.com \
--to=shawvrana@gmail.com \
--cc=akpm@osdl.org \
--cc=chase.venters@clientec.com \
--cc=davem@davemloft.net \
--cc=drepper@redhat.com \
--cc=hch@infradead.org \
--cc=johann.borck@densedata.com \
--cc=johnpol@2ka.mipt.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=zach.brown@oracle.com \
/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;
as well as URLs for NNTP newsgroup(s).