diff options
| author | Dmitry Torokhov <dtor@insightbb.com> | 2006-11-04 22:42:39 -0500 | 
|---|---|---|
| committer | Dmitry Torokhov <dtor@insightbb.com> | 2006-11-04 22:42:39 -0500 | 
| commit | 752c58a471c108d64da1676b2925dfbd83eb177e (patch) | |
| tree | fbffa0d7c54cd812950dffc16d642c9d449f4faf /fs/binfmt_elf.c | |
| parent | e52b29c2a637f6854d71a45646d7283d984a6dad (diff) | |
| parent | 10b1fbdb0a0ca91847a534ad26d0bc250c25b74f (diff) | |
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/binfmt_elf.c')
| -rw-r--r-- | fs/binfmt_elf.c | 10 | 
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 06435f3665f..79b05a1a436 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -1152,7 +1152,7 @@ static int dump_write(struct file *file, const void *addr, int nr)  static int dump_seek(struct file *file, loff_t off)  {  	if (file->f_op->llseek && file->f_op->llseek != no_llseek) { -		if (file->f_op->llseek(file, off, 1) != off) +		if (file->f_op->llseek(file, off, SEEK_CUR) < 0)  			return 0;  	} else {  		char *buf = (char *)get_zeroed_page(GFP_KERNEL); @@ -1220,7 +1220,7 @@ static int notesize(struct memelfnote *en)  static int alignfile(struct file *file, loff_t *foffset)  { -	char buf[4] = { 0, }; +	static const char buf[4] = { 0, };  	DUMP_WRITE(buf, roundup(*foffset, 4) - *foffset, foffset);  	return 1;  } @@ -1569,7 +1569,8 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file)  	DUMP_WRITE(elf, sizeof(*elf));  	offset += sizeof(*elf);				/* Elf header */ -	offset += (segs+1) * sizeof(struct elf_phdr);	/* Program headers */ +	offset += (segs + 1) * sizeof(struct elf_phdr); /* Program headers */ +	foffset = offset;  	/* Write notes phdr entry */  	{ @@ -1586,8 +1587,6 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file)  		DUMP_WRITE(&phdr, sizeof(phdr));  	} -	foffset = offset; -  	dataoff = offset = roundup(offset, ELF_EXEC_PAGESIZE);  	/* Write program headers for segments dump */ @@ -1612,7 +1611,6 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file)  		phdr.p_align = ELF_EXEC_PAGESIZE;  		DUMP_WRITE(&phdr, sizeof(phdr)); -		foffset += sizeof(phdr);  	}  #ifdef ELF_CORE_WRITE_EXTRA_PHDRS  | 
