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:	Tue, 6 Mar 2007 09:52:34 -0500
From:	"Chen, Dongliang" <Chen.D@...-t.com>
To:	<linux-kernel@...r.kernel.org>
Cc:	"Chen, Dongliang" <Chen.D@...-t.com>
Subject: return negative number for unsigned long function in kernel

There are lots of functions in the Linux kernel that are declared as
unsigned long, but the return value is negative integer while error
occurred. An example of these functions is do_mmap_pgoff in mm/mmap.c,
which is defined as:

unsigned long do_mmap_pgoff(....)

In this function, it returns -ENODEV, -EPERM, -ENOMEM, -EINVAL, -EAGAIN,
-EACCESS depends on the error type. My question is how should the caller
perform error check based on the return value? 


Please CC reply to me at chen.d@...-t.com
 

Thanks,

Dongliang Chen

Staff Engineer
EMS Technologies, Inc - Defense and Space Systems
660 Engineering Dr
Norcross, GA 30092
Tel: 770-263-9200 x 4379



-
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