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-next>] [day] [month] [year] [list]
Date:	Thu, 29 Sep 2011 22:15:25 -0400
From:	Doug Ledford <dledford@...ntricity.com>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: [Patch] Fix up return value from mq_open()

Commit d40dcdb ipc/mqueue.c: fix mq_open() return value
changed the return value for mq_open() to return

EMFILE - The process already has the maximum number of files and
               message queues open.

instead of

ENOMEM - Insufficient memory.

While the portion of d40dcdb that introduced using ERR_PTR() to
propagate the condition were helpful, the change to the type of error
was not.  The specific test that was failing was a memory space test.
It can fail if there are too many message queues open and this one would
cause us to exceed the tasks counter for memory bytes capacity (aka, int
wrap) or it can fail if the total number of bytes already allocated plus
this allocation will exceed the user's RLIMIT for POSIX message queues.
 However, depending on the values passed in via an attribute struct,
this could happen on the 1st file or the 100th file.  There is no direct
relationship to file count in this test.  There is only a direct
correlation to memory usage.  Therefore return the code to giving ENOMEM
instead of EMFILE.

(If the attachment is a problem I'll find another mailer to use and resend).

-- 
Doug Ledford <dledford@...ntricity.com>
              GPG KeyID: D30533DF




View attachment "ipc-mqueue-return-value.patch" of type "text/plain" (755 bytes)

Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ