17 Oct, 2008
40 commits
-
Usage of the AUTOFS_TYPE_* defines is a little confusing and appears
inconsistent.Signed-off-by: Ian Kent
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The netlink transport code has not worked for a while and the miscdev
transport is a simpler solution. This patch removes the netlink code and
makes the miscdev transport the only eCryptfs kernel to userspace
transport.Signed-off-by: Tyler Hicks
Cc: Michael Halcrow
Cc: Dustin Kirkland
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Convert ecryptfs to use write_begin/write_end
Signed-off-by: Nick Piggin
Signed-off-by: Badari Pulavarty
Acked-by: Michael Halcrow
Cc: Dave Kleikamp
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The retry block in ecryptfs_readdir() has been in the eCryptfs code base
for a while, apparently for no good reason. This loop could potentially
run without terminating. This patch removes the loop, instead erroring
out if vfs_readdir() on the lower file fails.Signed-off-by: Michael Halcrow
Reported-by: Al Viro
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The I2O ioctls assume 32bits. In itself that is fine as they are old
cards and nobody uses 64bit. However on LKML it was noted this
assumption is also made for allocated memory and is unsafe on 64bit
systems.Fixing this is a mess. It turns out there is tons of crap buried in a
header file that does racy 32/64bit filtering on the masks.So we:
- Verify all callers of the racy code can sleep (i2o_dma_[re]alloc)
- Move the code into a new i2o/memory.c file
- Remove the gfp_mask argument so nobody can try and misuse the function
- Wrap a mutex around the problem area (a single mutex is easy to do and
none of this is performance relevant)
- Switch the remaining problem kmalloc holdout to use i2o_dma_allocCc: Markus Lidel
Cc: Vasily Averin
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Make the SPI external GPIO expander drivers register themselves at
subsys_initcall() time when they're statically linked, and make the SPI
core do its driver model initialization earlier so that's safe.SOC-integrated GPIOs are available starting very early -- often before
initcalls start to run, or earily in arch_initcall() at latest -- so this
improves consistency, letting more subsystems rely on GPIOs being usable
by their own subsys_initcall() code.Signed-off-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add support to orion_spi for the 88F6183 ARM SoC by adding code to work
around a 6183-specific erratum.Signed-off-by: Lennert Buytenhek
Signed-off-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Make the chip info structure data optional by providing reasonable
defaults. Improve corresponding documentation, and highlight the drawback
of not providing explicit chipselect control.DMA can determine appropriate dma_burst_size and thresholds automatically
so use DMA even if dma_burst_size is not specified.Signed-off-by: Vernon Sauder
Reviewed-by: Ned Forrester
Signed-off-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Minor fixes: remove redundant local variable initialization, fix "can not"
to what I _think_ is a preferred spelling, output IRQ number if requesting
it failed.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add a pin configuration callback for the s3c24xx SPI driver, as there are
several options depending on the channel and the chip in use.This is needed as the controller may not have been setup by the initial
bootloader and the fact that the SPI controller gets reset over
suspend/resume into slave mode but the GPIO function registers do not.Signed-off-by: Ben Dooks
Signed-off-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Modify spi_write_then_read() to use one transfer. This speeds up all
callers, and is a minor code shrink.Signed-off-by: Vernon Sauder
Signed-off-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Now that arch/ppc is gone we don't need CONFIG_PPC_MERGE anymore
remove the dead code associated with !CONFIG_PPC_MERGE.Signed-off-by: Kumar Gala
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: David Brownell
Cc: Grant Likely
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
binfmt_script and binfmt_misc disallow recursion to avoid stack overflow
using sh_bang and misc_bang. It causes problem in some cases:$ echo '#!/bin/ls' > /tmp/t0
$ echo '#!/tmp/t0' > /tmp/t1
$ echo '#!/tmp/t1' > /tmp/t2
$ chmod +x /tmp/t*
$ /tmp/t2
zsh: exec format error: /tmp/t2Similar problem with binfmt_misc.
This patch introduces field 'recursion_depth' into struct linux_binprm to
track recursion level in binfmt_misc and binfmt_script. If recursion
level more then BINPRM_MAX_RECURSION it generates -ENOEXEC.[akpm@linux-foundation.org: make linux_binprm.recursion_depth a uint]
Signed-off-by: Kirill A. Shutemov
Cc: Pavel Emelyanov
Cc: Alexander Viro
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This change is Alpha-specific. It adds field 'taso' into struct
linux_binprm to remember if the application is TASO. Previously, field
sh_bang was used for this purpose.Signed-off-by: Kirill A. Shutemov
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Cc: Pavel Emelyanov
Cc: Alexander Viro
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add the missing MODULE_LICENSE("GPL").
Reported-by: Adrian Bunk
Signed-off-by: Adrian Bunk
Cc: Matthew Wilcox
Cc: Grant Grundler
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When specifying case we may have comments and/or braces at the end without
actually having a 'statement'. Allow for these to occur in any order.Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When ignoring a macro in the middle of a conditional, we need to ignore
the macro start and any continuation lines.Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When reporting some complex trailing statements we report only the
starting line of the error, that tends to imply the shown line is in error
and confuse the reader. As we do know where the actual error is report
that line too with an appropriate gap marker where applicable.#ERROR: trailing statements should be on next line
#1: FILE: Z202.c:1:
+ for (pbh = page_buffers(bh->b_page); pbh != bh;
+ pbh = pbh->b_this_page, key++);
#ERROR: trailing statements should be on next line
#4: FILE: Z202.c:4:
+ for (pbh = page_buffers(bh->b_page);
[...]
+ pbh = pbh->b_this_page, key++);Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When we want to confirm an export is directly after its definition we need
to allow for DEFINE_ style macros. Add these to the execeptions.
Refactor the exceptions.Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We are missing 'simple' values which include square brackets. Refactor to
ensure we handle nesting correctly and detect these simple forms.Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When we hit and #else or #elif we know we are meeting an alternative piece
of code. All bets are off on indent if we did not see the open of the
control so stop checking.Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Within the type checker we have a number of common kernel types which must
be implemented as typedefs. Pull those out so that we can use the same
expressions to trigger exclusions.Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We are likely going to have 24 bit types. Expand the type matcher to
match any size.Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We often see macros which define structure members, these are not complex
and necessarily do not have braces or brackets. For example:#define _PLIST_HEAD_INIT(head) \
.prio_list = LIST_HEAD_INIT((head).prio_list), \
.node_list = LIST_HEAD_INIT((head).node_list)Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
If we have sufficient context detect and handle do without braces ({).
Else these incorrectly trigger a trailing statements error for the
associated while.Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
A label is not a candidate for a possible type. Exclude them.
Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
A do without braces '{' may trigger a false possible type 'do' and then
this may be interpreted as an external definition of foo():do
foo();
while (bar);Add do to the type exclusions. Fix up tests so we can check for them.
Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We should only apply source checks to lines within hunks. Checks which
are anchored in the context may falsly trigger in the commentory. Ensure
they only match within valid hunk lines.Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Correct calculation of the number of lines of condition where we have
suspect indent.Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Firmware may be included in the kernel as .ihex files. These are
inherantly text, but not source. The line ending checks are applicable to
these kinds of file, allow just these checks to apply to all files.Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Ensure that a close comment cannot incorrectly trigger in the middle of a
string. Reported by Jaswinder Singh.Signed-off-by: Andy Whitcroft
Cc: Jaswinder Singh
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When the last hunk of a patch is short it will trigger errors from
checkpatch:Use of uninitialized value in pattern match (m//)
at /usr/local/bin/checkpatch.pl line 394.
Use of uninitialized value in concatenation (.) or string
at /usr/local/bin/checkpatch.pl line 397.
Use of uninitialized value in pattern match (m//)Avoid touching beyond the last line. Reported by Julien Brunel.
Signed-off-by: Andy Whitcroft
Cc: Julien Brunel
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We should only be checking changes lines for the trailing statement check
on case/default statements.Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
So that we eat our own dog food ensure the indent checks apply to perl
too.Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Report the correct lines for single statement blocks. Currently we are
reporting the right number of lines, but not skipping the negative lines.Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Ensure that we handle literal %'s correctly when adjacent to a %Lx.
%Lx bad
%%Lx good
%%%Lx badSigned-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
We should skip over and check the lines which follow preprocessor
statements, labels, and blank lines. These all have legitimate reasons to
be indented differently.Signed-off-by: Andy Whitcroft
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds