[Bugme-new] [Bug 4322] New: writev systemcall execution fails
bugme-daemon at osdl.org
bugme-daemon at osdl.org
Thu Mar 10 04:56:07 PST 2005
http://bugme.osdl.org/show_bug.cgi?id=4322
Summary: writev systemcall execution fails
Kernel Version: 2.6.11-mm1
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.591
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.591
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.591
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 : 5586.94
processor : 3
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Xeon(TM) CPU 2.80GHz
stepping : 7
cpu MHz : 2795.591
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: 1554380 kB
MemFree: 33324 kB
Buffers: 90388 kB
Cached: 1240028 kB
SwapCached: 27564 kB
Active: 485844 kB
Inactive: 959400 kB
HighTotal: 655200 kB
HighFree: 1024 kB
LowTotal: 899180 kB
LowFree: 32300 kB
SwapTotal: 3200360 kB
SwapFree: 3147584 kB
Dirty: 4520 kB
Writeback: 0 kB
Mapped: 122396 kB
Slab: 57216 kB
CommitLimit: 3977548 kB
Committed_AS: 507840 kB
PageTables: 1140 kB
VmallocTotal: 114680 kB
VmallocUsed: 15976 kB
VmallocChunk: 98068 kB
HugePages_Total: 0
HugePages_Free: 0
Hugepagesize: 4096 kB
======================================
Software Environment:
Linux x235b 2.6.11-mm1 #1 SMP Mon Mar 7 05:24:10 PST 2005 i686 i686 i386
GNU/Linux
======================================
Problem Description:
On Executing System call writev we have noticed some errors
o when expecting bad arguments(EINVAL) error returns an bad address
(EFAULT)error
o on executing writev with valid data instead of returning number of valid
bytes returned returns EFAULT error.
======================================
Steps to reproduce:
Run:
#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=writev(fd,wr_iovec,1);
printf("\n writev return Value:%d",returnValue);
printf("\n Error No: %d", errno);
printf("\n");
}
//returns EFAULT instead of EINVAL
-----------------------------------------------------------
#define CHUNK 64
char buf[1024];
struct iovec wr_iovec[3]={
{buf + (CHUNK * 6), CHUNK},
{(caddr_t)-1, CHUNK},
{buf+ (CHUNK * 8), CHUNK},
{(caddr_t)NULL, 0}
};
int main()
{
int fd;
int returnValue;
if ((fd = open("tmp_file",O_RDWR|O_CREAT,0777)) == -1)
{
printf("File opening Failed");
exit(0);
}
returnValue=writev(fd,wr_iovec,3);
printf("\n writev return Value:%d",returnValue);
printf("\n Error No: %d", errno);
printf("\n");
}
//returns EFAULT instead of returning number of bytes written
------- 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