[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090323110429.GQ28946@ZenIV.linux.org.uk>
Date: Mon, 23 Mar 2009 11:04:29 +0000
From: Al Viro <viro@...IV.linux.org.uk>
To: Eric Paris <eparis@...hat.com>
Cc: linux-kernel@...r.kernel.org, hch@...radead.org,
alan@...rguk.ukuu.org.uk, sfr@...b.auug.org.au,
john@...nmccutchan.com, rlove@...ve.org, akpm@...ux-foundation.org
Subject: Re: [PATCH 10/13] fsnotify: allow groups to add private data to
events
On Thu, Mar 19, 2009 at 02:05:47PM -0400, Eric Paris wrote:
> -int fsnotify_add_notif_event(struct fsnotify_group *group, struct fsnotify_event *event)
> +int fsnotify_add_notif_event(struct fsnotify_group *group, struct fsnotify_event *event, struct fsnotify_event_private_data *priv)
> {
> struct fsnotify_event_holder *holder;
> struct list_head *list = &group->notification_list;
> @@ -166,6 +183,8 @@ int fsnotify_add_notif_event(struct fsnotify_group *group, struct fsnotify_event
>
> fsnotify_get_event(event);
> list_add_tail(&holder->event_list, list);
> + if (priv)
> + list_add_tail(&priv->event_list, &event->private_data_list);
Won't that leak priv if we bugger off earlier? On OOM or on finding last_event
we are OK with...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists