bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] libdiskfs: fix reference counting of peropen objects


From: Neal H. Walfield
Subject: Re: [PATCH] libdiskfs: fix reference counting of peropen objects
Date: Fri, 29 Aug 2014 11:55:07 +0200
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.4 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

At Fri, 29 Aug 2014 11:33:44 +0200,
Justus Winter wrote:
> Previously, peropen objects were created with a reference count of
> zero.  Therefore, if diskfs_create_protid fails, passing such an
> object to diskfs_release_peropen would lead to a reference count
> underflow.
> 
> * libdiskfs/peropen-make.c (diskfs_peropen_make): Initialize reference
> count to one.
> * libdiskfs/protid-make.c (diskfs_start_protid): And consume this
> reference on success.  Update comment.

Are references really consumed?  (I think 'released' is the right
word.)

Neal



reply via email to

[Prev in Thread] Current Thread [Next in Thread]