Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1414722
| From | Cyrill Gorcunov <gorcunov@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/4] inotify: Add infrastructure to account inotify limits per-namespace |
| Date | 2016-06-06 10:10 +0200 |
| Message-ID | <rGXLI-2fW-33@gated-at.bofh.it> (permalink) |
| References | <rF9ei-5BV-11@gated-at.bofh.it> <rF9ei-5BV-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jun 01, 2016 at 10:52:57AM +0300, Nikolay Borisov wrote:
> This patch adds the necessary members to user_struct. The idea behind
> the solution is really simple - user the userns pointers as keys into
> a hash table which holds the inotify instances/watches counts. This
> allows to account the limits per userns rather than per real user,
> which makes certain scenarios such as a single mapped user in a
> container deplete the inotify resources for all other users, which
> map to the exact same real user.
>
> Signed-off-by: Nikolay Borisov <kernel@kyup.com>
...
> +static inline unsigned long inotify_dec_return_dev(struct user_struct *user,
> + void *key)
> +{
> + struct inotify_state *state;
> + unsigned long ret;
> +
> + spin_lock(&user->inotify_lock);
> + state = __find_inotify_state(user, key);
> + ret = --state->inotify_devs;
> + spin_unlock(&user->inotify_lock);
> +
> + return ret;
> +}
Hi Nikolay! Could you please explain why this new function is not used anywhere
in other patches or I miss something obvious?
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH 0/4] Make inotify instance/watches be accounted per userns Nikolay Borisov <kernel@kyup.com> - 2016-06-01 10:00 +0200
[PATCH 2/4] inotify: Convert inotify limits to be accounted per-realuser/per-namespace Nikolay Borisov <kernel@kyup.com> - 2016-06-01 10:00 +0200
[PATCH 1/4] inotify: Add infrastructure to account inotify limits per-namespace Nikolay Borisov <kernel@kyup.com> - 2016-06-01 10:00 +0200
Re: [PATCH 1/4] inotify: Add infrastructure to account inotify limits per-namespace Cyrill Gorcunov <gorcunov@gmail.com> - 2016-06-06 10:10 +0200
Re: [PATCH 1/4] inotify: Add infrastructure to account inotify limits per-namespace Nikolay Borisov <kernel@kyup.com> - 2016-06-06 11:30 +0200
[PATCH 4/4] inotify: Don't include inotify.h when !CONFIG_INOTIFY_USER Nikolay Borisov <kernel@kyup.com> - 2016-06-01 10:00 +0200
[PATCH 3/4] misc: Rename the HASH_SIZE macro Nikolay Borisov <kernel@kyup.com> - 2016-06-01 10:00 +0200
Re: [PATCH 3/4] misc: Rename the HASH_SIZE macro David Miller <davem@davemloft.net> - 2016-06-01 20:20 +0200
Re: [RFC PATCH 0/4] Make inotify instance/watches be accounted per userns ebiederm@xmission.com (Eric W. Biederman) - 2016-06-01 18:20 +0200
Re: [RFC PATCH 0/4] Make inotify instance/watches be accounted per userns Nikolay Borisov <kernel@kyup.com> - 2016-06-02 08:30 +0200
Re: [RFC PATCH 0/4] Make inotify instance/watches be accounted per userns ebiederm@xmission.com (Eric W. Biederman) - 2016-06-02 18:40 +0200
Re: [RFC PATCH 0/4] Make inotify instance/watches be accounted per userns Jan Kara <jack@suse.cz> - 2016-06-02 09:50 +0200
Re: [RFC PATCH 0/4] Make inotify instance/watches be accounted per userns ebiederm@xmission.com (Eric W. Biederman) - 2016-06-02 19:20 +0200
Re: [RFC PATCH 0/4] Make inotify instance/watches be accounted per userns Nikolay Borisov <kernel@kyup.com> - 2016-06-03 13:20 +0200
Re: [RFC PATCH 0/4] Make inotify instance/watches be accounted per userns ebiederm@xmission.com (Eric W. Biederman) - 2016-06-03 23:00 +0200
Re: [RFC PATCH 0/4] Make inotify instance/watches be accounted per userns Nikolay Borisov <kernel@kyup.com> - 2016-06-06 08:50 +0200
Re: [RFC PATCH 0/4] Make inotify instance/watches be accounted per userns ebiederm@xmission.com (Eric W. Biederman) - 2016-06-06 22:20 +0200
csiph-web