From: Dipankar Sarma <dipankar@in.ibm.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Robin Holt <holt@sgi.com>, Al Viro <viro@zeniv.linux.org.uk>,
Benjamin LaHaise <bcrl@kvack.org>,
"Denis V. Lunev" <den@openvz.org>, Ingo Molnar <mingo@elte.hu>,
Miklos Szeredi <mszeredi@suse.cz>, Mingming Cao <cmm@us.ibm.com>,
Nick Piggin <npiggin@kernel.dk>,
Pavel Emelyanov <xemul@openvz.org>,
linux-kernel@vger.kernel.org
Subject: Re: When booting a 16TB system, unix_create1 fails due to integer overflow.
Date: Thu, 23 Sep 2010 19:40:37 +0530 [thread overview]
Message-ID: <20100923141037.GA3811@in.ibm.com> (raw)
In-Reply-To: <1285246384.362.3.camel@edumazet-laptop>
On Thu, Sep 23, 2010 at 02:53:04PM +0200, Eric Dumazet wrote:
> Le jeudi 23 septembre 2010 à 07:17 -0500, Robin Holt a écrit :
> > I do not know which direction to take, but here is the summary of the
> > problem.
> >
> > We recently started trying to boot a customer's two new machines which
> > are configured with 384GB short of 16TB of memory.
> >
> > We were seeing a failure which prevented boot. The kernel was incapable
> > of creating either a named pipe or unix domain socket. This comes down
> > to a common kernel function called unix_create1() which does:
> >
> > atomic_inc(&unix_nr_socks);
> > if (atomic_read(&unix_nr_socks) > 2 * get_max_files())
> > goto out;
> >
>
> Hi Robin
>
> I would say : We can use atomic_long_t instead of atomic_t
>
> And make get_max_files(void) return a long ?
>
> Something like :
>
>
> fs/file_table.c | 10 +++++-----
> include/linux/fs.h | 2 +-
> net/unix/af_unix.c | 14 +++++++-------
> 3 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/fs/file_table.c b/fs/file_table.c
>
> n = (mempages * (PAGE_SIZE / 1024)) / 10;
> - files_stat.max_files = n;
> + files_stat.max_files = min(n, 0x7FFFFFFFUL);
It may be cleaner to just convert both the file counters and
the file limits to usnsigned long.
Other than that, this seems like a reasonable thing to do.
Thanks
Dipankar
next prev parent reply other threads:[~2010-09-23 14:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-23 12:17 When booting a 16TB system, unix_create1 fails due to integer overflow Robin Holt
2010-09-23 12:53 ` Eric Dumazet
2010-09-23 13:53 ` Eric Dumazet
2010-09-23 14:10 ` Dipankar Sarma [this message]
2010-09-27 22:36 ` David Miller
2010-09-28 3:46 ` [PATCH V3] fs: allow for more than 2^31 files Eric Dumazet
2010-09-28 4:10 ` David Miller
2010-09-30 20:26 ` Robin Holt
2010-09-30 20:45 ` Eric Dumazet
2010-10-01 4:34 ` Robin Holt
2010-10-01 5:03 ` Eric Dumazet
2010-10-01 5:29 ` [PATCH V4] " Eric Dumazet
2010-10-01 13:38 ` Robin Holt
2010-10-05 7:32 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100923141037.GA3811@in.ibm.com \
--to=dipankar@in.ibm.com \
--cc=bcrl@kvack.org \
--cc=cmm@us.ibm.com \
--cc=den@openvz.org \
--cc=eric.dumazet@gmail.com \
--cc=holt@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mszeredi@suse.cz \
--cc=npiggin@kernel.dk \
--cc=viro@zeniv.linux.org.uk \
--cc=xemul@openvz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox