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: <d23110170802071054s6fef54c9q182a9ed2e180052@mail.gmail.com>
Date:	Thu, 7 Feb 2008 15:54:12 -0300
From:	"Ulisses Furquim" <ulissesf@...il.com>
To:	"Clem Taylor" <clem.taylor@...il.com>
Cc:	"Andrew Morton" <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, "Amy Griffis" <amy.griffis@...com>
Subject: Re: inotify_add_watch() returning ENOSPC in 2.6.24 [watch descriptor leak?]

Hi,

On Feb 6, 2008 4:40 PM, Clem Taylor <clem.taylor@...il.com> wrote:
> I also tested on a 2.6.20 x86 desktop machine. It took ~8k iterations
> to fail, which matched max_user_watches. Once the program fails, it
> will fail right away if it is re-run.

Yeah, I had the same results, and it fails afterwards because it
reaches the maximum number of watches per user.

> Attached is a simple example that shows off the problem. On a system
> with a problem, it will only run for about
> fs.inotify.max_user_watches iterations. If everything is working, it
> should run forever.

Ok, I had a go with it and found the problem. We weren't releasing
one-shot watches because the test for them was wrong. We're using the
event's mask to test for one-shot watches when we should've been using
the watch's mask.

Patch against latest Linus git repo attached.

Regards,

-- Ulisses

Download attachment "patch" of type "application/octet-stream" (1033 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ