login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
December
»
24
Re: [PATCH] gen_init_cpio: Avoid race between call to stat() and call to open()
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Jeff Garzik
Subject:
Re: [PATCH] gen_init_cpio: Avoid race between call to stat() and call to open()
Date: Friday, December 24, 2010 - 3:33 pm
On 12/24/2010 03:28 PM, Jesper Juhl wrote:
quoted text
> Hi, > > In usr/gen_init_cpio.c::cpio_mkfile() a call to stat() is made based on > pathname, subsequently the file is open()'ed and then the value of the > initial stat() call is used to allocate a buffer. This is not safe since > the file may change between the call to stat() and the call to open(). > Safer to just open() the file and then do fstat() using the filedescriptor > returned by open. > > > Signed-off-by: Jesper Juhl<jj@chaosbits.net>
Acked-by: Jeff Garzik <jgarzik@redhat.com> --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] gen_init_cpio: Avoid race between call to stat() a ...
, Jesper Juhl
, (Fri Dec 24, 1:28 pm)
Re: [PATCH] gen_init_cpio: Avoid race between call to stat ...
, Jesper Juhl
, (Fri Dec 24, 1:31 pm)
Re: [PATCH] gen_init_cpio: Avoid race between call to stat ...
, Jeff Garzik
, (Fri Dec 24, 3:33 pm)
Re: [PATCH] gen_init_cpio: Avoid race between call to stat ...
, Michal Marek
, (Wed Dec 29, 6:25 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
Og dreams of kernels
Jens Axboe
[PATCH 31/33] Fusion: sg chaining support
Arnd Bergmann
Re: finding your own dead "CONFIG_" variables
Mark Brown
[PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset
Tony Breeds
[LGUEST] Look in object dir for .config
git
:
Brian Downing
Re: Git in a Nutshell guide
John Benes
Re: master has some toys
Matthias Lederhofer
[PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree
Alexander Sulfrian
[RFC/PATCH] RE: git calls SSH_ASKPASS even if DISPLAY is not set
Junio C Hamano
Re: Rss produced by git is not valid xml?
git-commits-head
:
Linux Kernel Mailing List
iSeries: fix section mismatch in iseries_veth
Linux Kernel Mailing List
ixbge: remove TX lock and redo TX accounting.
Linux Kernel Mailing List
ixgbe: fix several counter register errata