From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] Re: Revision 2136 breaks two-disk configuarion
Date: Tue, 28 Apr 2009 09:26:17 -0400 [thread overview]
Message-ID: <1240925177.1136.4.camel@mj> (raw)
In-Reply-To: <20090428.015929.115521917.davem@davemloft.net>
On Tue, 2009-04-28 at 01:59 -0700, David Miller wrote:
> I think it's overkill at the moment.
I've committed the patch with grub_malloc() and the patch making
grub_fs_uuid_close() use grub_device_close().
> > +/* Return partition to be freed if it can be freed. */
> > +static inline grub_partition_t
> > +grub_partition_unref (const grub_partition_t p)
> > +{
> > + if (p && p->refcount-- <= 0)
> > + return p;
>
> If the reference count dips below zero, that should trigger
> an assertion rather than giving the pointer to the caller
> again which will potentially double-free memory or whatever.
Correct. If we have a better case for using refcounts, we'll have that
check.
--
Regards,
Pavel Roskin
next prev parent reply other threads:[~2009-04-28 13:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-27 5:25 Revision 2136 breaks two-disk configuarion Pavel Roskin
2009-04-27 5:57 ` David Miller
2009-04-27 22:26 ` Pavel Roskin
2009-04-28 1:37 ` [PATCH] " Pavel Roskin
2009-04-28 1:45 ` David Miller
2009-04-28 3:50 ` Pavel Roskin
2009-04-28 8:59 ` David Miller
2009-04-28 13:26 ` Pavel Roskin [this message]
2009-04-28 8:59 ` David Miller
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=1240925177.1136.4.camel@mj \
--to=proski@gnu.org \
--cc=grub-devel@gnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.