[Bugme-new] [Bug 4326] New: System call returns EFAULT instead of
EINVAL error
bugme-daemon at osdl.org
bugme-daemon at osdl.org
Fri Mar 11 02:24:43 PST 2005
http://bugme.osdl.org/show_bug.cgi?id=4326
Summary: System call returns EFAULT instead of EINVAL error
Kernel Version: 2.6.11.2
Status: NEW
Severity: normal
Owner: other_other at kernel-bugs.osdl.org
Submitter: sharyathi at in.ibm.com
CC: bnpoorni at in.ibm.com,sglass at us.ibm.com
Distribution:
SLES 9 SP 1
==========================
Hardware Environment:
/proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Xeon(TM) CPU 2.80GHz
stepping : 7
cpu MHz : 2795.793
cache size : 512 KB
physical id : 0
siblings : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips : 5537.79
processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Xeon(TM) CPU 2.80GHz
stepping : 7
cpu MHz : 2795.793
cache size : 512 KB
physical id : 0
siblings : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips : 5570.56
processor : 2
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Xeon(TM) CPU 2.80GHz
stepping : 7
cpu MHz : 2795.793
cache size : 512 KB
physical id : 3
siblings : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips : 5570.56
processor : 3
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Xeon(TM) CPU 2.80GHz
stepping : 7
cpu MHz : 2795.793
cache size : 512 KB
physical id : 3
siblings : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips : 5570.56
/proc/meminfo
MemTotal: 1554888 kB
MemFree: 1247144 kB
Buffers: 45200 kB
Cached: 143300 kB
SwapCached: 0 kB
Active: 150200 kB
Inactive: 116808 kB
HighTotal: 655200 kB
HighFree: 425728 kB
LowTotal: 899688 kB
LowFree: 821416 kB
SwapTotal: 3200360 kB
SwapFree: 3200360 kB
Dirty: 0 kB
Writeback: 0 kB
Mapped: 112944 kB
Slab: 28460 kB
CommitLimit: 3977804 kB
Committed_AS: 193596 kB
PageTables: 1572 kB
VmallocTotal: 114680 kB
VmallocUsed: 10520 kB
VmallocChunk: 103832 kB
HugePages_Total: 0
HugePages_Free: 0
Hugepagesize: 4096 kB
=================================
Software Environment:
Linux x235b 2.6.11.2 #1 SMP Fri Mar 11 03:49:58 PST 2005 i686 i686 i386
GNU/Linux
=================================
Problem Description:
On executing the systemcall readv with Bad argument it gives out error EFAULT
instead of EINVAL
=================================
Steps to reproduce:
Run:
#include <stdio.h>
#include <sys/types.h>
#include <signal.h>
#include <sys/uio.h>
#include <sys/fcntl.h>
#include <memory.h>
#include <errno.h>
#include <sys/mman.h>
#define CHUNK 64
char buf[1024];
struct iovec wr_iovec[3]={
{buf, -1},
{(buf+CHUNK), CHUNK},
{(buf+CHUNK*2), CHUNK}
};
int main()
{
int fd;
int returnValue;
if ((fd = open("tmp_file",O_RDWR|O_CREAT,0777)) == -1)
{
printf("File opening Failed");
exit(0);
}
returnValue=readv(fd,wr_iovec,1);
printf("\n writev return Value:%d",returnValue);
printf("\n Error No: %d", errno);
printf("\n");
}
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the Bugme-new
mailing list