lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200908242034.50885.elendil@planet.nl>
Date:	Mon, 24 Aug 2009 20:34:47 +0200
From:	Frans Pop <elendil@...net.nl>
To:	Eric Paris <eparis@...hat.com>
Cc:	linux-kernel@...r.kernel.org, linux-fs-devel@...r.kernel.org,
	zdenek.kabelac@...il.com, torvalds@...ux-foundation.org,
	christoph.thielecke@....de, akpm@...ux-foundation.org,
	viro@...iv.linux.org.uk, grant.wilson@....co.uk,
	mikko.cal@...il.com
Subject: Re: [PATCH 2/3] inotify: do not BUG on idr entries at inotify destruction

Eric Paris wrote:

> If an inotify watch is left in the idr when an fsnotify group is destroyed
> this will lead to a BUG.  This is not a dangerous situation and really
> indicates a programming bug and leak of memory.  This patch changes it to
> use a WARN and a printk rather than killing people's boxes.
> 
> Signed-off-by: Eric Paris <eparis@...hat.com>
> ---
> 
> --- a/fs/notify/inotify/inotify_fsnotify.c
> +++ b/fs/notify/inotify/inotify_fsnotify.c
> @@ -107,6 +107,16 @@ static bool inotify_should_send_event(struct
> fsnotify_group *group, struct inode
> 
> static int idr_callback(int id, void *p, void *data)
> {
> +       struct fsnotify_mark_entry *entry;
> +       struct inotify_inode_mark_entry *ientry;
> +
> +       entry = p;
> +       ientry = container_of(entry, struct inotify_inode_mark_entry, fsn_entry);
> + 
> +       WARN(1, "inotify closing but id=%d still in idr.  Probably leaking memory\n", id); +
> +       printk(KERN_WARNING "group=%p entry->group=%p inode=%p wd=%d\n",
> +              data, entry->group, entry->inode, ientry->wd);
>         BUG();
>         return 0;
> }

I suspect you intended to remove the BUG?

Cheers,
FJP
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ