28 May, 2011
6 commits
-
nilfs2 does not have problems with references to unlinked directories.
CC: KONISHI Ryusuke
CC: linux-nilfs@vger.kernel.org
Signed-off-by: Sage Weil
Signed-off-by: Al Viro -
logfs does not have problems with references to unlinked directories.
CC: Joern Engel
CC: logfs@logfs.org
Signed-off-by: Sage Weil
Signed-off-by: Al Viro -
jfs does not have problems with references to unlinked directories.
CC: Dave Kleikamp
CC: jfs-discussion@lists.sourceforge.net
Signed-off-by: Sage Weil
Signed-off-by: Al Viro -
jffs2 does not have problems with references to unlinked directories.
CC: David Woodhouse
CC: linux-mtd@lists.infradead.org
Signed-off-by: Sage Weil
Signed-off-by: Al Viro -
sysv does not have problems with references to unlinked directories.
CC: Christoph Hellwig
Signed-off-by: Sage Weil
Signed-off-by: Al Viro -
Bfs does not have problems with references to unlinked directories.
CC: tigran@aivazian.fsnet.co.uk
Signed-off-by: Sage Weil
Signed-off-by: Al Viro
27 May, 2011
34 commits
-
Move the lock order description after all the includes, remove several
fairly outdated and/or incorrect comments, move Andrea's
copyright/changelog to the top where it belongs, remove the pointless
filename in the top of the file comment, and remove to useless macros.Signed-off-by: Christoph Hellwig
Signed-off-by: Al Viro -
The descriptions of bio_add_page() and bio_add_pc_page() are slightly
inconsistent; improve them.Signed-off-by: Andreas Gruenbacher
Signed-off-by: Al Viro -
Return -ENODATA when trying to read a user.* attribute which cannot
exist: user space otherwise does not have a reasonable way to
distinguish between non-existent and inaccessible attributes.Likewise, return -ENODATA when an unprivileged process tries to read a
trusted.* attribute: to unprivileged processes, those attributes are
invisible (listxattr() won't include them).Related to this bug report: https://bugzilla.redhat.com/660613
Signed-off-by: Andreas Gruenbacher
Signed-off-by: Al Viro -
Tell the filesystem if we just updated timestamp (I_DIRTY_SYNC) or
anything else, so that the filesystem can track internally if it
needs to push out a transaction for fdatasync or not.This is just the prototype change with no user for it yet. I plan
to push large XFS changes for the next merge window, and getting
this trivial infrastructure in this window would help a lot to avoid
tree interdependencies.Also remove incorrect comments that ->dirty_inode can't block. That
has been changed a long time ago, and many implementations rely on it.Signed-off-by: Christoph Hellwig
Signed-off-by: Al Viro -
Signed-off-by: Al Viro
-
... and kill a useless local variable in follow_dotdot_rcu(), while
we are at it - follow_mount_rcu(nd, path, inode) *always* assigned
value to *inode, and always it had been path->dentry->d_inode (aka
nd->path.dentry->d_inode, since it always got &nd->path as the second
argument).Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
…x/kernel/git/jeremy/xen
* 'upstream/tidy-xen-mmu-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
xen: fix compile without CONFIG_XEN_DEBUG_FS
Use arbitrary_virt_to_machine() to deal with ioremapped pud updates.
Use arbitrary_virt_to_machine() to deal with ioremapped pmd updates.
xen/mmu: remove all ad-hoc stats stuff
xen: use normal virt_to_machine for ptes
xen: make a pile of mmu pvop functions static
vmalloc: remove vmalloc_sync_all() from alloc_vm_area()
xen: condense everything onto xen_set_pte
xen: use mmu_update for xen_set_pte_at()
xen: drop all the special iomap pte paths. -
Right now security_get_user_sids() will pass in a NULL avd pointer to
avc_has_perm_noaudit(), which then forces that function to have a dummy
entry for that case and just generally test it.Don't do it. The normal callers all pass a real avd pointer, and this
helper function is incredibly hot. So don't make avc_has_perm_noaudit()
do conditional stuff that isn't needed for the common case.This also avoids some duplicated stack space.
Signed-off-by: Linus Torvalds
-
* git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus:
Squashfs: update email address
Squashfs: add extra sanity checks at mount time
Squashfs: add sanity checks to fragment reading at mount time
Squashfs: add sanity checks to lookup table reading at mount time
Squashfs: add sanity checks to id reading at mount time
Squashfs: add sanity checks to xattr reading at mount time
Squashfs: reverse order of filesystem table reading
Squashfs: move table allocation into squashfs_read_table() -
The implementation of find_next_bit_le() on m68knommu is identical with
the generic implementation of find_next_bit_le().Signed-off-by: Akinobu Mita
Cc: Greg Ungerer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The previous style change enables to use asm-generic/bitops/le.h on s390.
Signed-off-by: Akinobu Mita
Cc: Arnd Bergmann
Cc: Russell King
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Cc: Greg Ungerer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The previous style change enables to use asm-generic/bitops/le.h on arm.
Signed-off-by: Akinobu Mita
Acked-by: Russell King
Cc: Arnd Bergmann
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Cc: Greg Ungerer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
By the previous style change, CONFIG_GENERIC_FIND_NEXT_BIT,
CONFIG_GENERIC_FIND_BIT_LE, and CONFIG_GENERIC_FIND_LAST_BIT are not used
to test for existence of find bitops anymore.Signed-off-by: Akinobu Mita
Acked-by: Greg Ungerer
Cc: Arnd Bergmann
Cc: Russell King
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The style that we normally use in asm-generic is to test the macro itself
for existence, so in asm-generic, do:#ifndef find_next_zero_bit_le
extern unsigned long find_next_zero_bit_le(const void *addr,
unsigned long size, unsigned long offset);
#endifand in the architectures, write
static inline unsigned long find_next_zero_bit_le(const void *addr,
unsigned long size, unsigned long offset)
#define find_next_zero_bit_le find_next_zero_bit_leThis adds the #ifndef for each of the find bitops in the generic header
and source files.Suggested-by: Arnd Bergmann
Signed-off-by: Akinobu Mita
Acked-by: Russell King
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Cc: Greg Ungerer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The style that we normally use in asm-generic is to test the macro itself
for existence, so in asm-generic, do:#ifndef find_next_zero_bit_le
extern unsigned long find_next_zero_bit_le(const void *addr,
unsigned long size, unsigned long offset);
#endifand in the architectures, write
static inline unsigned long find_next_zero_bit_le(const void *addr,
unsigned long size, unsigned long offset)
#define find_next_zero_bit_le find_next_zero_bit_leThis adds the #define for each of the optimized find bitops in the
architectures.Suggested-by: Arnd Bergmann
Signed-off-by: Akinobu Mita
Acked-by: Hans-Christian Egtvedt
Acked-by: Russell King
Acked-by: Greg Ungerer
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Acked-by: Geert Uytterhoeven
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
m68knommu can't build ext4, udf, and ocfs2 due to the lack of
find_next_bit_le().This implements find_next_bit_le() on m68knommu by duplicating the generic
find_next_bit_le() in lib/find_next_bit.c.Signed-off-by: Akinobu Mita
Acked-by: Greg Ungerer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add support for the Maxim/Dallas DS2780 Stand-Alone Fuel Gauge IC.
It was suggested to combine this functionality with the current ds2782
driver. Unfortunately, I'm unable to commit the time to refactoring this
driver to that extent and I don't have a platform with the ds2782 part to
validate that there are no regression issues by adding this functionality.[akpm@linux-foundation.org: use min_t()]
Signed-off-by: Clifton Barnes
Tested-by: Haojian Zhuang
Cc: Evgeniy Polyakov
Cc: Ryan Mallon
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Reorganize so the netlink connector one wire search command will update
the kernel list of detected slave devices. Otherwise, a newly detected
device is unusable because unless it's in the kernel list of known devices
any commands will result in ENODEV status.Signed-off-by: David Fries
Cc: Evgeniy Polyakov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This adds multi-slave support of the w1 bus for the ds1wm Synthesizable
1-Wire Bus Master. Also many fixes and tweaks based on the rev3 of the
datasheet http://datasheets.maxim-ic.com/en/ds/DS1WM.pdfSigned-off-by: Jean-François Dagenais
Cc: Evgeniy Polyakov
Cc: Szabolcs Gyurko
Cc: Matt Reimer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This DS2408 w1 slave driver is not complete for all the features of the
chip, but its sufficient if you use it as a simple IO expander.[randy.dunlap@oracle.com: fix w1_ds2408.c printk formats]
Signed-off-by: Jean-François Dagenais
Cc: Evgeniy Polyakov
Cc: Szabolcs Gyurko
Cc: Matt Reimer
Signed-off-by: Randy Dunlap
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The first patch adds generic functionnality to w1_io for Resume Command
[A5h] lots of slaves support. I found it useful for multi-commands/reset
workflows with the same slave on a multi-slave bus.This DS2408 w1 slave driver is not complete for all the features of the
chip, but its sufficient if you use it as a simple IO expander. Enjoy!The ds1wm had Kconfig dependencies towards ARM && HAVE_CLK. I took them
out since I was using the ds1wm on an x86_64 platform (ds1wm in a FPGA
through pcie) and found them irrelevant.The clock freq/divisors at the top of ds1wm.c did not have the MSB set to
1. This bit is CLK_EN which turns the whole prescaler and dividers on.
The driver never mentionned this bit either, so I just included this bit
right in the table entries. I also took the liberty to add a couple of
entries to the table. The spec doesn't explicitely mentions these
possibilities but the description and examination of the core shows the
prescalers & dividers can be used for more than the table explicitely
shows. The table I enlarged still doesn't cover all possibilities, but
it's a good start.I also made a few tweaks to a couple of the read and write algorithms
which made sense while I had my head very deep in the ds1wm documentation.
We stressed it a lot with 10+ slaves on the bus, many ds2408, ds2431 and
ds2433 at the same time doing extensive interaction. It proved quite
stable in our production environment.This patch:
Add generic functionnality to w1_io for Resume Command [A5h] lots of
slaves support.Signed-off-by: Jean-François Dagenais
Cc: Evgeniy Polyakov
Cc: Szabolcs Gyurko
Cc: Matt Reimer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
profile_hits() has a common check for prof_on and prof_buffer regardless
of SMP or !SMP. So, remove some duplicate code by splitting profile_hits
into two.[akpm@linux-foundation.org: make do_profile_hits static]
Signed-off-by: Rakib Mullick
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
parport_find_number() calls parport_get_port() on its result, so there
should be a corresponding call to parport_put_port() before dropping the
reference. Similar code is found in the function register_device() in the
same file.The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)//
@exists@
local idexpression struct parport * x;
expression ra,rr;
statement S1,S2;
@@x = parport_find_number(...)
... when != x = rr
when any
when != parport_put_port(x,...)
when != if (...) { ... parport_put_port(x,...) ...}
(
if() S1 else S2
|
if(...) { ... when != x = ra
when forall
when != parport_put_port(x,...)
*return...;
}
)
//Signed-off-by: Julia Lawall
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
synchronize_rcu() does the stuff as needed.
Signed-off-by: Lai Jiangshan
Cc: Doug Thompson
Cc: "Paul E. McKenney"
Cc: Mauro Carvalho Chehab
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
finds is misspelt as finr. No functional change.
Signed-off-by: Sisir Koppaka
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The kernel automatically evaluates partition tables of storage devices.
The code for evaluating GUID partitions (in fs/partitions/efi.c) contains
a bug that causes a kernel oops on certain corrupted GUID partition
tables.This bug has security impacts, because it allows, for example, to
prepare a storage device that crashes a kernel subsystem upon connecting
the device (e.g., a "USB Stick of (Partial) Death").crc = efi_crc32((const unsigned char *) (*gpt), le32_to_cpu((*gpt)->header_size));
computes a CRC32 checksum over gpt covering (*gpt)->header_size bytes.
There is no validation of (*gpt)->header_size before the efi_crc32 call.A corrupted partition table may have large values for (*gpt)->header_size.
In this case, the CRC32 computation access memory beyond the memory
allocated for gpt, which may cause a kernel heap overflow.Validate value of GUID partition table header size.
[akpm@linux-foundation.org: fix layout and indenting]
Signed-off-by: Timo Warns
Cc: Matt Domsch
Cc: Eugene Teo
Cc: Dave Jones
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Let memory allocator initialize the allocated memory as null, thus remove
the use of memset.Signed-off-by: Rakib Mullick
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The ->read_proc interface is going away, convert to seq_file.
Signed-off-by: Alexey Dobriyan
Cc:Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The balloon driver in a Xen guest frees guest pages and marks them as
mmio. When the kernel crashes and the crash kernel attempts to read the
oldmem via /proc/vmcore a read from ballooned pages will generate 100%
load in dom0 because Xen asks qemu-dm for the page content. Since the
reads come in as 8byte requests each ballooned page is tried 512 times.With this change a hook can be registered which checks wether the given
pfn is really ram. The hook has to return a value > 0 for ram pages, a
value < 0 on error (because the hypercall is not known) and 0 for non-ram
pages.This will reduce the time to read /proc/vmcore. Without this change a
512M guest with 128M crashkernel region needs 200 seconds to read it, with
this change it takes just 2 seconds.Signed-off-by: Olaf Hering
Cc: Alexey Dobriyan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Currently, pagemap_read() has three error and/or corner case handling
mistake.(1) If ppos parameter is wrong, mm refcount will be leak.
(2) If count parameter is 0, mm refcount will be leak too.
(3) If the current task is sleeping in kmalloc() and the system
is out of memory and oom-killer kill the proc associated task,
mm_refcount prevent the task free its memory. then system may
hang up.Cc: Hugh Dickins
Cc: Jovi Zhang
Acked-by: Hugh Dickins
Cc: Stephen Wilson
Cc: Alexey Dobriyan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
It whould be better if put check_mem_permission after __get_free_page in
mem_write, to be same as function mem_read.Hugh Dickins explained the reason.
check_mem_permission gets a reference to the mm. If we __get_free_page
after check_mem_permission, imagine what happens if the system is out
of memory, and the mm we're looking at is selected for killing by the
OOM killer: while we wait in __get_free_page for more memory, no memory
is freed from the selected mm because it cannot reach exit_mmap while
we hold that reference.Reported-by: Jovi Zhang
Signed-off-by: KOSAKI Motohiro
Acked-by: Hugh Dickins
Reviewed-by: Stephen Wilson
Cc: Alexey Dobriyan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
There is a macro for the max size kmalloc can allocate, so use it instead
of a hardcoded number.Signed-off-by: Yuanhan Liu
Cc: Alexey Dobriyan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
No need for this local array to be writable, so mark it const.
Signed-off-by: Mike Frysinger
Cc: Alexey Dobriyan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds