Age | Commit message (Collapse) | Author | Files | Lines |
|
Add to hfs_btree_write() a return of -EIO on failure of b-tree node
searching. Also add logic ofor processing errors from hfs_btree_write()
in hfsplus_system_write_inode() with a message about b-tree writing
failure.
[[email protected]: reduce scope of `err', print errno on error]
Signed-off-by: Vyacheslav Dubeyko <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Al Viro <[email protected]>
Acked-by: Hin-Tak Leung <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Currently, it doesn't process error codes from the hfsplus_block_free()
call in hfsplus_free_extents() method. Add some error code processing.
Signed-off-by: Vyacheslav Dubeyko <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Hin-Tak Leung <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
If the read fails we kmap an error code. This doesn't end well. Instead
print a critical error and pray. This mirrors the rest of the fs
behaviour with critical error cases.
Acked-by: Vyacheslav Dubeyko <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Vyacheslav Dubeyko <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Jan Kara <[email protected]>
Acked-by: Hin-Tak Leung <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
This makes it compile on s390. After all the ptrace_may_access
(which we use this file) is declared exactly in linux/ptrace.h.
This is preparatory work to wire this syscall up on all archs.
Signed-off-by: Cyrill Gorcunov <[email protected]>
Signed-off-by: Alexander Kartashov <[email protected]>
Cc: Heiko Carstens <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Add the missing header include for spinlocks, to avoid potential build
failures on specific architectures or configurations.
Signed-off-by: Jean Delvare <[email protected]>
Acked-by: Sascha Hauer <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Memory returned to free_contig_range() must have no other references.
Let kernel to complain loudly if page reference count is not equal to 1.
[[email protected]: support sparsemem]
Signed-off-by: Marek Szyprowski <[email protected]>
Reviewed-by: Kyungmin Park <[email protected]>
Acked-by: Michal Nazarewicz <[email protected]>
Signed-off-by: David Rientjes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
If a series of scripts are executed, each triggering module loading via
unprintable bytes in the script header, kernel stack contents can leak
into the command line.
Normally execution of binfmt_script and binfmt_misc happens recursively.
However, when modules are enabled, and unprintable bytes exist in the
bprm->buf, execution will restart after attempting to load matching
binfmt modules. Unfortunately, the logic in binfmt_script and
binfmt_misc does not expect to get restarted. They leave bprm->interp
pointing to their local stack. This means on restart bprm->interp is
left pointing into unused stack memory which can then be copied into the
userspace argv areas.
After additional study, it seems that both recursion and restart remains
the desirable way to handle exec with scripts, misc, and modules. As
such, we need to protect the changes to interp.
This changes the logic to require allocation for any changes to the
bprm->interp. To avoid adding a new kmalloc to every exec, the default
value is left as-is. Only when passing through binfmt_script or
binfmt_misc does an allocation take place.
For a proof of concept, see DoTest.sh from:
http://www.halfdog.net/Security/2012/LinuxKernelBinfmtScriptStackDataDisclosure/
Signed-off-by: Kees Cook <[email protected]>
Cc: halfdog <[email protected]>
Cc: P J P <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
The right dmi version is in SMBIOS if it's zero in DMI region
This issue was originally found from an oracle bug.
One customer noticed system UUID doesn't match between dmidecode & uek2.
- HP ProLiant BL460c G6 :
# cat /sys/devices/virtual/dmi/id/product_uuid
00000000-0000-4C48-3031-4D5030333531
# dmidecode | grep -i uuid
UUID: 00000000-0000-484C-3031-4D5030333531
From SMBIOS 2.6 on, spec use little-endian encoding for UUID other than
network byte order.
So we need to get dmi version to distinguish. If version is 0.0, the
real version is taken from the SMBIOS version. This is part of original
kernel comment in code.
[[email protected]: checkpatch fixes]
Signed-off-by: Zhenzhong Duan <[email protected]>
Cc: Feng Jin <[email protected]>
Cc: Jean Delvare <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
As of version 2.6 of the SMBIOS specification, the first 3 fields of the
UUID are supposed to be little-endian encoded.
Also a minor fix to match variable meaning and mute checkpatch.pl
[[email protected]: tweak code comment]
Signed-off-by: Zhenzhong Duan <[email protected]>
Cc: Feng Jin <[email protected]>
Cc: Jean Delvare <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Remove the documentation for capability.disable. The code supporting
this parameter was removed with commit 5915eb53861c ("security: remove
dummy module")
Signed-off-by: Josh Boyer <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
Cc: Rob Landley <[email protected]>
Cc: Miklos Szeredi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
The system uses global_dirtyable_memory() to calculate number of
dirtyable pages/pages that can be allocated to the page cache. A bug
causes an underflow thus making the page count look like a big unsigned
number. This in turn confuses the dirty writeback throttling to
aggressively write back pages as they become dirty (usually 1 page at a
time). This generally only affects systems with highmem because the
underflowed count gets subtracted from the global count of dirtyable
memory.
The problem was introduced with v3.2-4896-gab8fabd
Fix is to ensure we don't get an underflowed total of either highmem or
global dirtyable memory.
Signed-off-by: Sonny Rao <[email protected]>
Signed-off-by: Puneet Kumar <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Tested-by: Damien Wyart <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
isolate_freepages_block() and isolate_migratepages_range() are used for
CMA as well as compaction so it breaks build for CONFIG_CMA &&
!CONFIG_COMPACTION.
This patch fixes it.
[[email protected]: add "do { } while (0)", per Mel]
Signed-off-by: Minchan Kim <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Marek Szyprowski <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Clearly, we can't handle the NULL filename case, but we can deal with
the case where there's a real pathname.
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
...as always, rename is the messiest of the bunch. We have to track
whether to retry or not via a separate flag since the error handling
is already quite complex.
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
...so we can pass in LOOKUP_REVAL. For now, nothing does yet.
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Where we can pass in LOOKUP_DIRECTORY or LOOKUP_REVAL. Any other flags
passed in here are currently ignored.
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
This function is expected to be called from path-based syscalls to help
them decide whether to try the lookup and call again in the event that
they got an -ESTALE return back on an earier try.
Currently, we only retry the call once on an ESTALE error, but in the
event that we decide that that's not enough in the future, we should be
able to change the logic in this helper without too much effort.
Signed-off-by: Jeff Layton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into for-linus
|
|
NFS appears to use d_obtain_alias() to create the root dentry rather than
d_make_root. This can cause 'prepend_path()' to complain that the root
has a weird name if an NFS filesystem is lazily unmounted. e.g. if
"/mnt" is an NFS mount then
{ cd /mnt; umount -l /mnt ; ls -l /proc/self/cwd; }
will cause a WARN message like
WARNING: at /home/git/linux/fs/dcache.c:2624 prepend_path+0x1d7/0x1e0()
...
Root dentry has weird name <>
to appear in kernel logs.
So change d_obtain_alias() to use "/" rather than "" as the anonymous
name.
Signed-off-by: NeilBrown <[email protected]>
Cc: Trond Myklebust <[email protected]>
Cc: Al Viro <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Commit 8e22cc88d68ca1a46d7d582938f979eb640ed30f removes the (un)lock_super
function definitions but forgets to remove their prototypes.
Signed-off-by: Alessio Igor Bogani <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Removed vmtruncate
Signed-off-by: Marco Stornelli <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Removed vmtruncate
Signed-off-by: Marco Stornelli <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Removed vmtruncate
Signed-off-by: Marco Stornelli <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Removed vmtruncate
Signed-off-by: Marco Stornelli <[email protected]>
Reviewed-by: Anton Altaparmakov <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Removed vmtruncate
Signed-off-by: Marco Stornelli <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Removed vmtruncate
Signed-off-by: Marco Stornelli <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|
|
Removed vmtruncate
Signed-off-by: Marco Stornelli <[email protected]>
Signed-off-by: Al Viro <[email protected]>
|