GitHub/moto-9609/android_kernel_motorola_exynos9610.git
16 years agoKVM: s390: Fix instruction naming for lctlg
Christian Borntraeger [Fri, 25 Jul 2008 13:52:44 +0000 (15:52 +0200)]
KVM: s390: Fix instruction naming for lctlg

Lets fix the name for the lctlg instruction...

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: s390: Fix program check on interrupt delivery handling
Christian Borntraeger [Fri, 25 Jul 2008 13:51:54 +0000 (15:51 +0200)]
KVM: s390: Fix program check on interrupt delivery handling

The current interrupt handling on s390 misbehaves on an error case. On s390
each cpu has the prefix area (lowcore) for interrupt delivery. This memory
must always be available. If we fail to access the prefix area for a guest
on interrupt delivery the configuration is completely unusable. There is no
point in sending another program interrupt to an inaccessible lowcore.
Furthermore, we should not bug the host kernel, because this can be triggered
by userspace. I think the guest kernel itself can not trigger the problem, as
SET PREFIX and SIGNAL PROCESSOR SET PREFIX both check that the memory is
available and sane. As this is a userspace bug (e.g. setting the wrong guest
offset, unmapping guest memory) we should kill the userspace process instead
of BUGing the host kernel.
In the long term we probably should notify the userspace process about this
problem.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: s390: Change guestaddr type in gaccess
Martin Schwidefsky [Fri, 25 Jul 2008 13:51:00 +0000 (15:51 +0200)]
KVM: s390: Change guestaddr type in gaccess

All registers are unsigned long types. This patch changes all occurences
of guestaddr in gaccess from u64 to unsigned long.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: s390: Fix guest kconfig
Christian Borntraeger [Fri, 25 Jul 2008 13:50:04 +0000 (15:50 +0200)]
KVM: s390: Fix guest kconfig

Cornelia Huck noticed that a modular virtio without kvm guest support
leads to a build error in the s390 virtio transport:

CONFIG_VIRTIO=m leads to
ERROR: "vmem_add_mapping" [drivers/s390/kvm/kvm_virtio.ko] undefined!
ERROR: "max_pfn" [drivers/s390/kvm/kvm_virtio.ko] undefined!
ERROR: "vmem_remove_mapping" [drivers/s390/kvm/kvm_virtio.ko] undefined!

The virtio transport only works with kvm guest support and only as a
builtin. Lets change the build process of drivers/s390/kvm/kvm_virtio.c
to depend on kvm guest support, which is also a bool.

CONFIG_S390_GUEST already selects CONFIG_VIRTIO, that should prevent
CONFIG_S390_GUEST=y CONFIG_VIRTIO=n situations.

CC: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: s390: Advertise KVM_CAP_USER_MEMORY
Carsten Otte [Fri, 25 Jul 2008 13:49:13 +0000 (15:49 +0200)]
KVM: s390: Advertise KVM_CAP_USER_MEMORY

KVM_CAP_USER_MEMORY is used by s390, therefore, we should advertise it.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: ia64: Fix irq disabling leak in error handling code
Julia Lawall [Tue, 22 Jul 2008 19:38:18 +0000 (21:38 +0200)]
KVM: ia64: Fix irq disabling leak in error handling code

There is a call to local_irq_restore in the normal exit case, so it would
seem that there should be one on an error return as well.

The semantic patch that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression l;
expression E,E1,E2;
@@

local_irq_save(l);
... when != local_irq_restore(l)
    when != spin_unlock_irqrestore(E,l)
    when any
    when strict
(
if (...) { ... when != local_irq_restore(l)
               when != spin_unlock_irqrestore(E1,l)
+   local_irq_restore(l);
    return ...;
}
|
if (...)
+   {local_irq_restore(l);
    return ...;
+   }
|
spin_unlock_irqrestore(E2,l);
|
local_irq_restore(l);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: VMX: Fix undefined beaviour of EPT after reload kvm-intel.ko
Sheng Yang [Wed, 16 Jul 2008 01:25:40 +0000 (09:25 +0800)]
KVM: VMX: Fix undefined beaviour of EPT after reload kvm-intel.ko

As well as move set base/mask ptes to vmx_init().

Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: VMX: Fix bypass_guest_pf enabling when disable EPT in module parameter
Sheng Yang [Wed, 16 Jul 2008 01:21:22 +0000 (09:21 +0800)]
KVM: VMX: Fix bypass_guest_pf enabling when disable EPT in module parameter

Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: task switch: translate guest segment limit to virt-extension byte granular field
Marcelo Tosatti [Sat, 19 Jul 2008 22:08:07 +0000 (19:08 -0300)]
KVM: task switch: translate guest segment limit to virt-extension byte granular field

If 'g' is one then limit is 4kb granular.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: Avoid instruction emulation when event delivery is pending
Avi Kivity [Sat, 19 Jul 2008 05:57:05 +0000 (08:57 +0300)]
KVM: Avoid instruction emulation when event delivery is pending

When an event (such as an interrupt) is injected, and the stack is
shadowed (and therefore write protected), the guest will exit.  The
current code will see that the stack is shadowed and emulate a few
instructions, each time postponing the injection.  Eventually the
injection may succeed, but at that time the guest may be unwilling
to accept the interrupt (for example, the TPR may have changed).

This occurs every once in a while during a Windows 2008 boot.

Fix by unshadowing the fault address if the fault was due to an event
injection.

Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: task switch: use seg regs provided by subarch instead of reading from GDT
Marcelo Tosatti [Wed, 16 Jul 2008 22:07:11 +0000 (19:07 -0300)]
KVM: task switch: use seg regs provided by subarch instead of reading from GDT

There is no guarantee that the old TSS descriptor in the GDT contains
the proper base address. This is the case for Windows installation's
reboot-via-triplefault.

Use guest registers instead. Also translate the address properly.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: task switch: segment base is linear address
Marcelo Tosatti [Wed, 16 Jul 2008 22:07:10 +0000 (19:07 -0300)]
KVM: task switch: segment base is linear address

The segment base is always a linear address, so translate before
accessing guest memory.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: SVM: allow enabling/disabling NPT by reloading only the architecture module
Joerg Roedel [Mon, 14 Jul 2008 18:36:36 +0000 (20:36 +0200)]
KVM: SVM: allow enabling/disabling NPT by reloading only the architecture module

If NPT is enabled after loading both KVM modules on AMD and it should be
disabled, both KVM modules must be reloaded. If only the architecture module is
reloaded the behavior is undefined. With this patch it is possible to disable
NPT only by reloading the kvm_amd module.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Sun, 27 Jul 2008 03:40:36 +0000 (20:40 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  mlx4: Update/add Mellanox Technologies copyright lines to mlx4 driver files
  mlx4_core: Add VLAN tag field to WQE control segment struct
  RDMA/nes: CM connection setup/teardown rework
  IPoIB: Correct help text for INFINIBAND_IPOIB_DEBUG
  IPoIB/cm: Connected mode is no longer EXPERIMENTAL
  RDMA/ucm: BKL is not needed for ib_ucm_open()
  RDMA/ucma: BKL is not needed for ucma_open()

16 years agofix for a memory leak in an error case introduced by fix for double free
Oliver Neukum [Sat, 26 Jul 2008 20:42:42 +0000 (22:42 +0200)]
fix for a memory leak in an error case introduced by fix for double free

The fix NULLed a pointer without freeing it.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Reported-by: Juha Motorsportcom <juha_motorsportcom@luukku.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.infradead.org/mtd-2.6
Linus Torvalds [Sun, 27 Jul 2008 03:30:56 +0000 (20:30 -0700)]
Merge git://git.infradead.org/mtd-2.6

* git://git.infradead.org/mtd-2.6: (57 commits)
  [MTD] [NAND] subpage read feature as a way to increase performance.
  CPUFREQ: S3C24XX NAND driver frequency scaling support.
  [MTD][NAND] au1550nd: remove unused variable
  [MTD] jedec_probe: Fix SST 16-bit chip detection
  [MTD][MTDPART] Fix a division by zero bug
  [MTD][MTDPART] Cleanup and document the erase region handling
  [MTD][MTDPART] Handle most checkpatch findings
  [MTD][MTDPART] Seperate main loop from per-partition code in add_mtd_partition
  [MTD] physmap: resume already suspended chips on failure to suspend
  [MTD] physmap: Fix suspend/resume/shutdown bugs.
  [MTD] [NOR] Fix -ETIMEO errors in CFI driver
  [MTD] [NAND] fsl_elbc_nand: fix section mismatch with CONFIG_MTD_OF_PARTS=y
  [JFFS2] Use .unlocked_ioctl
  [MTD] Fix const assignment in the MTD command line partitioning driver
  [MTD] [NOR] gen_probe: No debug message when debugging is disabled
  [MTD] [NAND] remove __PPC__ hardcoded address from DiskOnChip drivers
  [MTD] [MAPS] Remove the bast-flash driver.
  [MTD] [NAND] fsl_elbc_nand: ecclayout cleanups
  [MTD] [NAND] fsl_elbc_nand: implement support for flash-based BBT
  [MTD] [NAND] fsl_elbc_nand: fix OOB workability for large page NAND chips
  ...

16 years agoMerge branch 'tracehook' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux...
Linus Torvalds [Sun, 27 Jul 2008 03:29:39 +0000 (20:29 -0700)]
Merge branch 'tracehook' of git://git./linux/kernel/git/frob/linux-2.6-utrace

* 'tracehook' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-utrace:
  tracehook: comment fixes

16 years agom68k: gs: use tty_port fixes
Geert Uytterhoeven [Sat, 26 Jul 2008 23:39:52 +0000 (01:39 +0200)]
m68k: gs: use tty_port fixes

commit b5391e29f428d11755ca2c91074c6db6f5c69d7c ("gs: use tty_port")
forgot to update the m68k gs serial drivers.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
Linus Torvalds [Sun, 27 Jul 2008 03:27:31 +0000 (20:27 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  atmel-mci: debugfs support
  mmc: Add per-card debugfs support
  mmc: Export internal host state through debugfs
  imxmmc: fix crash when no platform data is provided
  imxmmc: fix platform resources
  imxmmc: remove DEBUG definition
  mmc_spi: put signals to low power off fix

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Sun, 27 Jul 2008 03:23:44 +0000 (20:23 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (39 commits)
  [PATCH] fix RLIM_NOFILE handling
  [PATCH] get rid of corner case in dup3() entirely
  [PATCH] remove remaining namei_{32,64}.h crap
  [PATCH] get rid of indirect users of namei.h
  [PATCH] get rid of __user_path_lookup_open
  [PATCH] f_count may wrap around
  [PATCH] dup3 fix
  [PATCH] don't pass nameidata to __ncp_lookup_validate()
  [PATCH] don't pass nameidata to gfs2_lookupi()
  [PATCH] new (local) helper: user_path_parent()
  [PATCH] sanitize __user_walk_fd() et.al.
  [PATCH] preparation to __user_walk_fd cleanup
  [PATCH] kill nameidata passing to permission(), rename to inode_permission()
  [PATCH] take noexec checks to very few callers that care
  Re: [PATCH 3/6] vfs: open_exec cleanup
  [patch 4/4] vfs: immutable inode checking cleanup
  [patch 3/4] fat: dont call notify_change
  [patch 2/4] vfs: utimes cleanup
  [patch 1/4] vfs: utimes: move owner check into inode_change_ok()
  [PATCH] vfs: use kstrdup() and check failing allocation
  ...

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/ISDN-2.6
Linus Torvalds [Sun, 27 Jul 2008 03:19:41 +0000 (20:19 -0700)]
Merge git://git./linux/kernel/git/kkeil/ISDN-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/ISDN-2.6:
  Add layer1 over IP support
  Add mISDN HFC multiport driver
  Add mISDN HFC PCI driver
  Add mISDN DSP
  Add mISDN core files
  Define AF_ISDN and PF_ISDN
  Add mISDN driver

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Sun, 27 Jul 2008 03:17:56 +0000 (20:17 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  netns: fix ip_rt_frag_needed rt_is_expired
  netfilter: nf_conntrack_extend: avoid unnecessary "ct->ext" dereferences
  netfilter: fix double-free and use-after free
  netfilter: arptables in netns for real
  netfilter: ip{,6}tables_security: fix future section mismatch
  selinux: use nf_register_hooks()
  netfilter: ebtables: use nf_register_hooks()
  Revert "pkt_sched: sch_sfq: dump a real number of flows"
  qeth: use dev->ml_priv instead of dev->priv
  syncookies: Make sure ECN is disabled
  net: drop unused BUG_TRAP()
  net: convert BUG_TRAP to generic WARN_ON
  drivers/net: convert BUG_TRAP to generic WARN_ON

16 years agofirmware: fix memmap printk format warnings
Randy Dunlap [Sat, 26 Jul 2008 22:22:28 +0000 (15:22 -0700)]
firmware: fix memmap printk format warnings

Fix firmware/memmap printk format warnings:

  drivers/firmware/memmap.c:156: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t'
  drivers/firmware/memmap.c:161: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Bernhard Walle <bwalle@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomm/util.c must #include <linux/sched.h>
Adrian Bunk [Sat, 26 Jul 2008 22:22:28 +0000 (15:22 -0700)]
mm/util.c must #include <linux/sched.h>

mm/util.c: In function 'arch_pick_mmap_layout':
  mm/util.c:144: error: dereferencing pointer to incomplete type
  mm/util.c:145: error: 'arch_get_unmapped_area' undeclared (first use in this function)
  mm/util.c:145: error: (Each undeclared identifier is reported only once
  mm/util.c:145: error: for each function it appears in.)
  mm/util.c:146: error: 'arch_unmap_area' undeclared (first use in this function)

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agohugetlb: remove unused variable warning
Andrea Righi [Sat, 26 Jul 2008 22:22:27 +0000 (15:22 -0700)]
hugetlb: remove unused variable warning

Remove the following warning when CONFIG_HUGETLB_PAGE is not set:

ipc/shm.c: In function `shm_get_stat':
ipc/shm.c:565: warning: unused variable `h'

[akpm@linux-foundation.org: use tabs, not spaces]
Signed-off-by: Andrea Righi <righi.andrea@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotask IO accounting: correctly account threads IO statistics
Andrea Righi [Sat, 26 Jul 2008 22:22:27 +0000 (15:22 -0700)]
task IO accounting: correctly account threads IO statistics

Oleg Nesterov points out that we should check that the task is still alive
before we iterate over the threads.  This patch includes a fixup for this.

Also simplify do_io_accounting() implementation.

Signed-off-by: Andrea Righi <righi.andrea@gmail.com>
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agogpiolib: fix typo in comment
Michael Buesch [Sat, 26 Jul 2008 22:22:26 +0000 (15:22 -0700)]
gpiolib: fix typo in comment

This fixes an off-by-one error in a comment.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[PATCH] fix RLIM_NOFILE handling
Al Viro [Sat, 26 Jul 2008 20:01:20 +0000 (16:01 -0400)]
[PATCH] fix RLIM_NOFILE handling

* dup2() should return -EBADF on exceeded sysctl_nr_open
* dup() should *not* return -EINVAL even if you have rlimit set to 0;
  it should get -EMFILE instead.

Check for orig_start exceeding rlimit taken to sys_fcntl().
Failing expand_files() in dup{2,3}() now gets -EMFILE remapped to -EBADF.
Consequently, remaining checks for rlimit are taken to expand_files().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] get rid of corner case in dup3() entirely
Al Viro [Sat, 26 Jul 2008 17:38:19 +0000 (13:38 -0400)]
[PATCH] get rid of corner case in dup3() entirely

Since Ulrich is OK with getting rid of dup3(fd, fd, flags) completely,
to hell the damn thing goes.  Corner case for dup2() is handled in
sys_dup2() (complete with -EBADF if dup2(fd, fd) is called with fd
that is not open), the rest is done in dup3().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] remove remaining namei_{32,64}.h crap
Al Viro [Sat, 26 Jul 2008 07:48:26 +0000 (03:48 -0400)]
[PATCH] remove remaining namei_{32,64}.h crap

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] get rid of indirect users of namei.h
Al Viro [Sat, 26 Jul 2008 07:46:43 +0000 (03:46 -0400)]
[PATCH] get rid of indirect users of namei.h

fs.h needs path.h, not namei.h; nfs_fs.h doesn't need it at all.
Several places in the tree needed direct include.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] get rid of __user_path_lookup_open
Al Viro [Sat, 26 Jul 2008 07:33:14 +0000 (03:33 -0400)]
[PATCH] get rid of __user_path_lookup_open

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] f_count may wrap around
Al Viro [Sat, 26 Jul 2008 04:39:17 +0000 (00:39 -0400)]
[PATCH] f_count may wrap around

make it atomic_long_t; while we are at it, get rid of useless checks in affs,
hfs and hpfs - ->open() always has it equal to 1, ->release() - to 0.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] dup3 fix
Ulrich Drepper [Sat, 26 Jul 2008 02:32:13 +0000 (22:32 -0400)]
[PATCH] dup3 fix

Al Viro notice one cornercase that the new dup3() code.  The dup2()
function, as a special case, handles dup-ing to the same file
descriptor.  In this case the current dup3() code does nothing at
all.  I.e., it ingnores the flags parameter.  This shouldn't happen,
the close-on-exec flag should be set if requested.

In case the O_CLOEXEC bit in the flags parameter is not set the
dup3() function should behave in this respect identical to dup2().
This means dup3(fd, fd, 0) should not actively reset the c-o-e
flag.

The patch below implements this minor change.

[AV: credits to Artur Grabowski for bringing that up as potential subtle point
in dup2() behaviour]

Signed-off-by: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] don't pass nameidata to __ncp_lookup_validate()
Al Viro [Wed, 23 Jul 2008 18:45:55 +0000 (14:45 -0400)]
[PATCH] don't pass nameidata to __ncp_lookup_validate()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] don't pass nameidata to gfs2_lookupi()
Al Viro [Wed, 23 Jul 2008 18:42:05 +0000 (14:42 -0400)]
[PATCH] don't pass nameidata to gfs2_lookupi()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] new (local) helper: user_path_parent()
Al Viro [Mon, 21 Jul 2008 13:32:51 +0000 (09:32 -0400)]
[PATCH] new (local) helper: user_path_parent()

Preparation to untangling intents mess: reduce the number of do_path_lookup()
callers.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] sanitize __user_walk_fd() et.al.
Al Viro [Tue, 22 Jul 2008 13:59:21 +0000 (09:59 -0400)]
[PATCH] sanitize __user_walk_fd() et.al.

* do not pass nameidata; struct path is all the callers want.
* switch to new helpers:
user_path_at(dfd, pathname, flags, &path)
user_path(pathname, &path)
user_lpath(pathname, &path)
user_path_dir(pathname, &path)  (fail if not a directory)
  The last 3 are trivial macro wrappers for the first one.
* remove nameidata in callers.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] preparation to __user_walk_fd cleanup
Al Viro [Tue, 22 Jul 2008 12:09:30 +0000 (08:09 -0400)]
[PATCH] preparation to __user_walk_fd cleanup

Almost all users __user_walk_fd() and friends care only about struct path.
Get rid of the few that do not.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] kill nameidata passing to permission(), rename to inode_permission()
Al Viro [Tue, 22 Jul 2008 04:07:17 +0000 (00:07 -0400)]
[PATCH] kill nameidata passing to permission(), rename to inode_permission()

Incidentally, the name that gives hundreds of false positives on grep
is not a good idea...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] take noexec checks to very few callers that care
Al Viro [Tue, 22 Jul 2008 04:02:33 +0000 (00:02 -0400)]
[PATCH] take noexec checks to very few callers that care

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years agoRe: [PATCH 3/6] vfs: open_exec cleanup
Christoph Hellwig [Mon, 19 May 2008 05:53:34 +0000 (07:53 +0200)]
Re: [PATCH 3/6] vfs: open_exec cleanup

On Mon, May 19, 2008 at 12:01:49AM +0200, Marcin Slusarz wrote:
> open_exec is needlessly indented, calls ERR_PTR with 0 argument
> (which is not valid errno) and jumps into middle of function
> just to return value.
> So clean it up a bit.

Still looks rather messy.  See below for a better version.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[patch 4/4] vfs: immutable inode checking cleanup
Miklos Szeredi [Tue, 1 Jul 2008 13:01:29 +0000 (15:01 +0200)]
[patch 4/4] vfs: immutable inode checking cleanup

Move the immutable and append-only checks from chmod, chown and utimes
into notify_change().  Checks for immutable and append-only files are
always performed by the VFS and not by the filesystem (see
permission() and may_...() in namei.c), so these belong in
notify_change(), and not in inode_change_ok().

This should be completely equivalent.

CC: Ulrich Drepper <drepper@redhat.com>
CC: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[patch 3/4] fat: dont call notify_change
Miklos Szeredi [Tue, 1 Jul 2008 13:01:28 +0000 (15:01 +0200)]
[patch 3/4] fat: dont call notify_change

The FAT_IOCTL_SET_ATTRIBUTES ioctl() calls notify_change() to change
the file mode before changing the inode attributes.  Replace with
explicit calls to security_inode_setattr(), fat_setattr() and
fsnotify_change().

This is equivalent to the original.  The reason it is needed, is that
later in the series we move the immutable check into notify_change().
That would break the FAT_IOCTL_SET_ATTRIBUTES ioctl, as it needs to
perform the mode change regardless of the immutability of the file.

[Fix error if fat is built as a module.  Thanks to OGAWA Hirofumi for
noticing.]

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[patch 2/4] vfs: utimes cleanup
Miklos Szeredi [Tue, 1 Jul 2008 13:01:27 +0000 (15:01 +0200)]
[patch 2/4] vfs: utimes cleanup

Untange the mess that is do_utimes().  Add kerneldoc comment to
do_utimes().

CC: Ulrich Drepper <drepper@redhat.com>
CC: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[patch 1/4] vfs: utimes: move owner check into inode_change_ok()
Miklos Szeredi [Tue, 1 Jul 2008 13:01:26 +0000 (15:01 +0200)]
[patch 1/4] vfs: utimes: move owner check into inode_change_ok()

Add a new ia_valid flag: ATTR_TIMES_SET, to handle the
UTIMES_OMIT/UTIMES_NOW and UTIMES_NOW/UTIMES_OMIT cases.  In these
cases neither ATTR_MTIME_SET nor ATTR_ATIME_SET is in the flags, yet
the POSIX draft specifies that permission checking is performed the
same way as if one or both of the times was explicitly set to a
timestamp.

See the path "vfs: utimensat(): fix error checking for
{UTIME_NOW,UTIME_OMIT} case" by Michael Kerrisk for the patch
introducing this behavior.

This is a cleanup, as well as allowing filesystems (NFS/fuse/...) to
perform their own permission checking instead of the default.

CC: Ulrich Drepper <drepper@redhat.com>
CC: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] vfs: use kstrdup() and check failing allocation
Li Zefan [Mon, 21 Jul 2008 10:06:36 +0000 (18:06 +0800)]
[PATCH] vfs: use kstrdup() and check failing allocation

- use kstrdup() instead of kmalloc() + memcpy()
- return NULL if allocating ->mnt_devname failed
- mnt_devname should be const

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] more nameidata removal: exec_permission_lite() doesn't need it
Al Viro [Thu, 17 Jul 2008 13:45:01 +0000 (09:45 -0400)]
[PATCH] more nameidata removal: exec_permission_lite() doesn't need it

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] pass MAY_OPEN to vfs_permission() explicitly
Al Viro [Thu, 17 Jul 2008 13:37:02 +0000 (09:37 -0400)]
[PATCH] pass MAY_OPEN to vfs_permission() explicitly

... and get rid of the last "let's deduce mask from nameidata->flags"
bit.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] fix MAY_CHDIR/MAY_ACCESS/LOOKUP_ACCESS mess
Al Viro [Thu, 17 Jul 2008 13:19:08 +0000 (09:19 -0400)]
[PATCH] fix MAY_CHDIR/MAY_ACCESS/LOOKUP_ACCESS mess

* MAY_CHDIR is redundant - it's an equivalent of MAY_ACCESS
* MAY_ACCESS on fuse should affect only the last step of pathname resolution
* fchdir() and chroot() should pass MAY_ACCESS, for the same reason why
  chdir() needs that.
* now that we pass MAY_ACCESS explicitly in all cases, LOOKUP_ACCESS can be
  removed; it has no business being in nameidata.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] kill altroot
Al Viro [Sun, 11 May 2008 00:44:54 +0000 (20:44 -0400)]
[PATCH] kill altroot

long overdue...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] permission checks for chdir need special treatment only on the last step
Al Viro [Wed, 16 Jul 2008 13:51:03 +0000 (09:51 -0400)]
[PATCH] permission checks for chdir need special treatment only on the last step

... so we ought to pass MAY_CHDIR to vfs_permission() instead of having
it triggered on every step of preceding pathname resolution.  LOOKUP_CHDIR
is killed by that.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[patch 5/5] vfs: remove mode parameter from vfs_symlink()
Miklos Szeredi [Tue, 24 Jun 2008 14:50:16 +0000 (16:50 +0200)]
[patch 5/5] vfs: remove mode parameter from vfs_symlink()

Remove the unused mode parameter from vfs_symlink and callers.

Thanks to Tetsuo Handa for noticing.

CC: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
16 years ago[patch 4/5] vfs: reuse local variable in vfs_link()
Tetsuo Handa [Tue, 24 Jun 2008 14:50:15 +0000 (16:50 +0200)]
[patch 4/5] vfs: reuse local variable in vfs_link()

Why not reuse "inode" which is assigned as

  struct inode *inode = old_dentry->d_inode;

in the beginning of vfs_link() ?

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
16 years ago[patch 3/5] vfs: change remove_suid() to file_remove_suid()
Miklos Szeredi [Tue, 24 Jun 2008 14:50:14 +0000 (16:50 +0200)]
[patch 3/5] vfs: change remove_suid() to file_remove_suid()

All calls to remove_suid() are made with a file pointer, because
(similarly to file_update_time) it is called when the file is written.

Clean up callers by passing in a file instead of a dentry.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
16 years ago[patch 1/5] vfs: truncate: dont check immutable twice
Miklos Szeredi [Tue, 24 Jun 2008 14:50:12 +0000 (16:50 +0200)]
[patch 1/5] vfs: truncate: dont check immutable twice

vfs_permission(MAY_WRITE) already checked for the inode being
immutable, so no need to repeat it.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Acked-by: Christoph Hellwig <hch@infradead.org>
16 years ago[PATCH] sanitize ->permission() prototype
Al Viro [Wed, 16 Jul 2008 01:03:57 +0000 (21:03 -0400)]
[PATCH] sanitize ->permission() prototype

* kill nameidata * argument; map the 3 bits in ->flags anybody cares
  about to new MAY_... ones and pass with the mask.
* kill redundant gfs2_iop_permission()
* sanitize ecryptfs_permission()
* fix remaining places where ->permission() instances might barf on new
  MAY_... found in mask.

The obvious next target in that direction is permission(9)

folded fix for nfs_permission() breakage from Miklos Szeredi <mszeredi@suse.cz>

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[patch 05/14] hpfs: dont call permission()
Miklos Szeredi [Wed, 21 May 2008 17:15:03 +0000 (19:15 +0200)]
[patch 05/14] hpfs: dont call permission()

hpfs_unlink() calls permission() prior to truncating the file.  HPFS
doesn't define a .permission method, so replace with explicit call to
generic_permission().

This is equivalent, except that devcgroup_inode_permission() and
security_inode_permission() are not called.

The truncation is just an implementation detail of the unlink, so
these security checks are unnecessary.

I suspect that even calling generic_permission() is unnecessary, since
we shouldn't mind if the file isn't writable.  But I leave that to the
maintainer to decide.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
16 years ago[PATCH] sanitize proc_sysctl
Al Viro [Tue, 15 Jul 2008 12:54:06 +0000 (08:54 -0400)]
[PATCH] sanitize proc_sysctl

* keep references to ctl_table_head and ctl_table in /proc/sys inodes
* grab the former during operations, use the latter for access to
  entry if that succeeds
* have ->d_compare() check if table should be seen for one who does lookup;
  that allows us to avoid flipping inodes - if we have the same name resolve
  to different things, we'll just keep several dentries and ->d_compare()
  will reject the wrong ones.
* have ->lookup() and ->readdir() scan the table of our inode first, then
  walk all ctl_table_header and scan ->attached_by for those that are
  attached to our directory.
* implement ->getattr().
* get rid of insane amounts of tree-walking
* get rid of the need to know dentry in ->permission() and of the contortions
  induced by that.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] sysctl: keep track of tree relationships
Al Viro [Tue, 15 Jul 2008 10:33:31 +0000 (06:33 -0400)]
[PATCH] sysctl: keep track of tree relationships

In a sense, that's the heart of the series.  It's based on the following
property of the trees we are actually asked to add: they can be split into
stem that is already covered by registered trees and crown that is entirely
new.  IOW, if a/b and a/c/d are introduced by our tree, then a/c is also
introduced by it.

That allows to associate tree and table entry with each node in the union;
while directory nodes might be covered by many trees, only one will cover
the node by its crown.  And that will allow much saner logics for /proc/sys
in the next patches.  This patch introduces the data structures needed to
keep track of that.

When adding a sysctl table, we find a "parent" one.  Which is to say,
find the deepest node on its stem that already is present in one of the
tables from our table set or its ancestor sets.  That table will be our
parent and that node in it - attachment point.  Add our table to list
anchored in parent, have it refer the parent and contents of attachment
point.  Also remember where its crown lives.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] sysctl: make sure that /proc/sys/net/ipv4 appears before per-ns ones
Al Viro [Tue, 15 Jul 2008 20:00:59 +0000 (16:00 -0400)]
[PATCH] sysctl: make sure that /proc/sys/net/ipv4 appears before per-ns ones

Massage ipv4 initialization - make sure that net.ipv4 appears as
non-per-net-namespace before it shows up in per-net-namespace sysctls.
That's the only change outside of sysctl.c needed to get sane ordering
rules and data structures for sysctls (esp. for procfs side of that
mess).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] allow delayed freeing of ctl_table_header
Al Viro [Tue, 15 Jul 2008 05:44:23 +0000 (01:44 -0400)]
[PATCH] allow delayed freeing of ctl_table_header

Refcount the sucker; instead of freeing it by the end of unregistration
just drop the refcount and free only when it hits zero.  Make sure that
we _always_ make ->unregistering non-NULL in start_unregistering().

That allows anybody to get a reference to such puppy, preventing its
freeing and reuse.  It does *not* block unregistration.  Anybody who
holds such a reference can
* try to grab a "use" reference (ctl_head_grab()); that will
succeeds if and only if it hadn't entered unregistration yet.  If it
succeeds, we can use it in all normal ways until we release the "use"
reference (with ctl_head_finish()).  Note that this relies on having
->unregistering become non-NULL in all cases when one starts to unregister
the sucker.
* keep pointers to ctl_table entries; they *can* be freed if
the entire thing is unregistered.  However, if ctl_head_grab() succeeds,
we know that unregistration had not happened (and will not happen until
ctl_head_finish()) and such pointers can be used safely.

IOW, now we can have inodes under /proc/sys keep references to ctl_table
entries, protecting them with references to ctl_table_header and
grabbing the latter for the duration of operations that require access
to ctl_table.  That won't cause deadlocks, since unregistration will not
be stopped by mere keeping a reference to ctl_table_header.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] beginning of sysctl cleanup - ctl_table_set
Al Viro [Tue, 15 Jul 2008 01:22:20 +0000 (21:22 -0400)]
[PATCH] beginning of sysctl cleanup - ctl_table_set

New object: set of sysctls [currently - root and per-net-ns].
Contains: pointer to parent set, list of tables and "should I see this set?"
method (->is_seen(set)).
Current lists of tables are subsumed by that; net-ns contains such a beast.
->lookup() for ctl_table_root returns pointer to ctl_table_set instead of
that to ->list of that ctl_table_set.

[folded compile fixes by rdd for configs without sysctl]

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[patch] hppfs: remove hppfs_permission
Miklos Szeredi [Tue, 1 Jul 2008 21:07:54 +0000 (23:07 +0200)]
[patch] hppfs: remove hppfs_permission

hppfs_permission() is equivalent to the '.permission == NULL' case.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] reuse xxx_fifo_fops for xxx_pipe_fops
Denys Vlasenko [Tue, 1 Jul 2008 12:16:09 +0000 (14:16 +0200)]
[PATCH] reuse xxx_fifo_fops for xxx_pipe_fops

Merge fifo and pipe file_operations.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[patch] vfs: fix lookup on deleted directory
Miklos Szeredi [Wed, 2 Jul 2008 19:30:15 +0000 (21:30 +0200)]
[patch] vfs: fix lookup on deleted directory

Lookup can install a child dentry for a deleted directory.  This keeps
the directory dentry alive, and the inode pinned in the cache and on
disk, even after all external references have gone away.

This isn't a big problem normally, since memory pressure or umount
will clear out the directory dentry and its children, releasing the
inode.  But for UBIFS this causes problems because its orphan area can
overflow.

Fix this by returning ENOENT for all lookups on a S_DEAD directory
before creating a child dentry.

Thanks to Zoltan Sogor for noticing this while testing UBIFS, and
Artem for the excellent analysis of the problem and testing.

Reported-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tested-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years agonetns: fix ip_rt_frag_needed rt_is_expired
Hugh Dickins [Sun, 27 Jul 2008 00:51:06 +0000 (17:51 -0700)]
netns: fix ip_rt_frag_needed rt_is_expired

Running recent kernels, and using a particular vpn gateway, I've been
having to edit my mails down to get them accepted by the smtp server.

Git bisect led to commit e84f84f276473dcc673f360e8ff3203148bdf0e2 -
netns: place rt_genid into struct net.  The conversion from a != test
to rt_is_expired() put one negative too many: and now my mail works.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetfilter: nf_conntrack_extend: avoid unnecessary "ct->ext" dereferences
Patrick McHardy [Sun, 27 Jul 2008 00:50:05 +0000 (17:50 -0700)]
netfilter: nf_conntrack_extend: avoid unnecessary "ct->ext" dereferences

As Linus points out, "ct->ext" and "new" are always equal, avoid unnecessary
dereferences and use "new" directly.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetfilter: fix double-free and use-after free
Pekka Enberg [Sun, 27 Jul 2008 00:49:33 +0000 (17:49 -0700)]
netfilter: fix double-free and use-after free

As suggested by Patrick McHardy, introduce a __krealloc() that doesn't
free the original buffer to fix a double-free and use-after-free bug
introduced by me in netfilter that uses RCU.

Reported-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Tested-by: Dieter Ries <clip2@gmx.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetfilter: arptables in netns for real
Alexey Dobriyan [Sun, 27 Jul 2008 00:48:59 +0000 (17:48 -0700)]
netfilter: arptables in netns for real

IN, FORWARD -- grab netns from in device, OUT -- from out device.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetfilter: ip{,6}tables_security: fix future section mismatch
Alexey Dobriyan [Sun, 27 Jul 2008 00:48:38 +0000 (17:48 -0700)]
netfilter: ip{,6}tables_security: fix future section mismatch

Currently not visible, because NET_NS is mutually exclusive with SYSFS
which is required by SECURITY.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoselinux: use nf_register_hooks()
Alexey Dobriyan [Sun, 27 Jul 2008 00:48:15 +0000 (17:48 -0700)]
selinux: use nf_register_hooks()

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetfilter: ebtables: use nf_register_hooks()
Alexey Dobriyan [Sun, 27 Jul 2008 00:47:53 +0000 (17:47 -0700)]
netfilter: ebtables: use nf_register_hooks()

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoAdd layer1 over IP support
Karsten Keil [Sun, 27 Jul 2008 00:02:10 +0000 (02:02 +0200)]
Add layer1 over IP support

Implement a ISDN over IP tunnel to use mISDN hardware on
remote locations.

Signed-off-by: Karsten Keil <kkeil@suse.de>
16 years agoAdd mISDN HFC multiport driver
Karsten Keil [Sun, 27 Jul 2008 00:00:43 +0000 (02:00 +0200)]
Add mISDN HFC multiport driver

Enable support for cards with Cologne Chip AG's HFC multiport
chip.

Signed-off-by: Karsten Keil <kkeil@suse.de>
16 years agoAdd mISDN HFC PCI driver
Karsten Keil [Sat, 26 Jul 2008 16:55:28 +0000 (18:55 +0200)]
Add mISDN HFC PCI driver

Enable support for card with Cologne Chip AG's
HFC PCIbased cards

Signed-off-by: Karsten Keil <kkeil@suse.de>
16 years agoAdd mISDN DSP
Karsten Keil [Sat, 26 Jul 2008 23:56:38 +0000 (01:56 +0200)]
Add mISDN DSP

Enable support for digital audio processing capability.
This module may be used for special applications that require
cross connecting of bchannels, conferencing, dtmf decoding
echo cancelation, tone generation, and Blowfish encryption and
decryption.
It may use hardware features if available.

Signed-off-by: Karsten Keil <kkeil@suse.de>
16 years agoAdd mISDN core files
Karsten Keil [Sat, 26 Jul 2008 23:54:58 +0000 (01:54 +0200)]
Add mISDN core files

Add mISDN core files

Signed-off-by: Karsten Keil <kkeil@suse.de>
16 years agoDefine AF_ISDN and PF_ISDN
Karsten Keil [Sat, 26 Jul 2008 16:52:34 +0000 (18:52 +0200)]
Define AF_ISDN and PF_ISDN

Define the address and protocol family value for mISDN.

Signed-off-by: Karsten Keil <kkeil@suse.de>
16 years agoAdd mISDN driver
Karsten Keil [Sat, 26 Jul 2008 16:52:11 +0000 (18:52 +0200)]
Add mISDN driver

mISDN is a new modular ISDN driver, in the long term it should replace
the old I4L driver architecture for passiv ISDN cards.

Signed-off-by: Karsten Keil <kkeil@suse.de>
16 years agoatmel-mci: debugfs support
Haavard Skinnemoen [Thu, 24 Jul 2008 12:18:59 +0000 (14:18 +0200)]
atmel-mci: debugfs support

Create additional files under the host's debugfs directory containing
additional host-specific debug information.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agommc: Add per-card debugfs support
Haavard Skinnemoen [Thu, 24 Jul 2008 12:18:58 +0000 (14:18 +0200)]
mmc: Add per-card debugfs support

For each card successfully added to the bus, create a subdirectory under
the host's debugfs root with information about the card.

At the moment, only a single file is added to the card directory for
all cards: "state". It reflects the "state" field in struct mmc_card,
indicating whether the card is present, readonly, etc.

For MMC and SD cards (not SDIO), another file is added: "status".
Reading this file will ask the card about its current status and
return it. This can be useful if the card just refuses to respond to
any commands, which might indicate that the card state is not what the
MMC core thinks it is (due to a missing stop command, for example.)

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agommc: Export internal host state through debugfs
Haavard Skinnemoen [Thu, 24 Jul 2008 12:18:57 +0000 (14:18 +0200)]
mmc: Export internal host state through debugfs

When CONFIG_DEBUG_FS is set, create a few files under /sys/kernel/debug
containing information about an mmc host's internal state. Currently,
just a single file is created, "ios", which contains information about
the current operating parameters for the bus (clock speed, bus width,
etc.)

Host drivers can add additional files and directories under the host's
root directory by passing the debugfs_root field in struct mmc_host as
the 'parent' parameter to debugfs_create_*.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agoimxmmc: fix crash when no platform data is provided
Paulius Zaleckas [Wed, 9 Jul 2008 13:03:20 +0000 (16:03 +0300)]
imxmmc: fix crash when no platform data is provided

Don't crash if no platform data is provided.
In this case assume that card is present.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agoimxmmc: fix platform resources
Paulius Zaleckas [Wed, 9 Jul 2008 13:03:17 +0000 (16:03 +0300)]
imxmmc: fix platform resources

Fixup platform resources handling.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agoimxmmc: remove DEBUG definition
Paulius Zaleckas [Wed, 9 Jul 2008 13:03:13 +0000 (16:03 +0300)]
imxmmc: remove DEBUG definition

Removed DEBUG #define #undef, because module is automaticaly
compiled with -DDEBUG when CONFIG_MMC_DEBUG is defined.
Currently it just generates compiler warning about redefinition.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agotracehook: comment fixes
Roland McGrath [Sat, 26 Jul 2008 21:41:26 +0000 (14:41 -0700)]
tracehook: comment fixes

This fixes some typos and errors in <linux/tracehook.h> comments.
No code changes.

Signed-off-by: Roland McGrath <roland@redhat.com>
16 years agoMerge branches 'bkl-removal', 'ipoib', 'mlx4' and 'nes' into for-linus
Roland Dreier [Sat, 26 Jul 2008 20:59:47 +0000 (13:59 -0700)]
Merge branches 'bkl-removal', 'ipoib', 'mlx4' and 'nes' into for-linus

16 years agoMerge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 26 Jul 2008 20:25:47 +0000 (13:25 -0700)]
Merge branch 'tracing-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  ftrace: fix modular build
  ftrace: disable tracing on acpi idle calls
  ftrace: remove latency-tracer leftover
  ftrace: only trace preempt off with preempt tracer
  ftrace: fix 4d3702b6 (post-v2.6.26): WARNING: at kernel/lockdep.c:2731 check_flags (ftrace)

16 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 26 Jul 2008 20:25:05 +0000 (13:25 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, AMD IOMMU: include amd_iommu_last_bdf in device initialization
  x86: fix IBM Summit based systems' phys_cpu_present_map on 32-bit kernels
  x86, RDC321x: remove gpio.h complications
  x86, RDC321x: add to mach-default
  crashdump: fix undefined reference to `elfcorehdr_addr'
  flag parameters: fix compile error of sys_epoll_create1

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney...
Linus Torvalds [Sat, 26 Jul 2008 20:23:17 +0000 (13:23 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/cooloney/blackfin-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (30 commits)
  Blackfin arch: If we double fault, rather than hang forever, reset
  Blackfin arch: When icache is off, make sure people know it
  Blackfin arch: Fix bug - skip single step in high priority interrupt handler instead of disabling all interrupts in single step debugging.
  Blackfin arch: cache the values of vco/sclk/cclk as the overhead of doing so (~24 bytes) is worth avoiding the software mult/div routines
  Blackfin arch: fix bug - IMDMA is not type struct dma_register
  Blackfin arch: check the EXTBANKS field of the DDRCTL1 register to see if we are using both memory banks
  Blackfin arch: Apply Bluetechnix CM-BF527 board support patch
  Blackfin arch: Add unwinding for stack info, and a little more detail on trace buffer
  Blackfin arch: Add ISP1760 board resources to BF548-EZKIT
  Blackfin arch: fix bug - detect 0.1 silicon revision BF527-EZKIT as 0.0 version
  Blackfin arch: add missing IORESOURCE_MEM flags to UART3
  Blackfin arch: Add return value check in bfin_sir_probe(), remove SSYNC().
  Blackfin arch:  Extend sram malloc to handle L2 SRAM.
  Blackfin arch: Remove useless config option.
  Blackfin arch:  change L1 malloc to base on slab cache and lists.
  Blackfin arch: use local labels and ENDPROC() markings
  Blackfin arch: Do not need this dualcore test module in kernel.
  Blackfin arch: Allow ptrace to peek and poke application data in L1 data SRAM.
  Blackfin arch: Add ANOMALY_05000368 workaround
  Blackfin arch: Functional power management support
  ...

16 years agodsp56k: Fix BKL pushdown
Geert Uytterhoeven [Sat, 26 Jul 2008 15:15:05 +0000 (17:15 +0200)]
dsp56k: Fix BKL pushdown

commit 236b8756a2b6f90498d45b2c36d43e5372f2d4b8 ("dsp56k: BKL pushdown")
removed the `struct inode *inode' parameter from dsp56k_ioctl(), but
forgot to update the use of `inode' in the first line of the function.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/video/fbmem.c: removed duplicated include
Huang Weiyi [Sat, 26 Jul 2008 11:37:57 +0000 (19:37 +0800)]
drivers/video/fbmem.c: removed duplicated include

Removed duplicated include <linux/major.h>
in drivers/video/fbmem.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Sat, 26 Jul 2008 19:45:32 +0000 (12:45 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/sfrench/cifs-2.6

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  When verifying the decoded header before decoding the object identifier
  [CIFS] Fix warnings from checkpatch
  [CIFS] Fix improper endian conversion of ACL subauth field
  [CIFS] Fix possible double free if search immediately after search rewind fails
  [CIFS] remove checkpatch warning
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
  cifs: assorted endian annotations
  [CIFS] break ATTR_SIZE changes out into their own function
  lockdep: annotate cifs in-kernel sockets
  [CIFS] Fix compiler warning on 64-bit

16 years agovideo/stifb.c: make 2 functions static
Adrian Bunk [Sat, 26 Jul 2008 02:46:27 +0000 (19:46 -0700)]
video/stifb.c: make 2 functions static

This patch makes the following needlessly global functions static:
 - stifb_init_fb()
 - stifb_init()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agovideo/console/stico{n,re}.c: make code static
Adrian Bunk [Sat, 26 Jul 2008 02:46:26 +0000 (19:46 -0700)]
video/console/stico{n,re}.c: make code static

This patch makes the following needlessly global code static:
 - sticon.c: sticonsole_init()
 - sticore.c: struct default_sti
 - sticore.c: sti_init_graph()
 - sticore.c: sti_inq_conf()
 - sticore.c: sti_rom_copy()
 - sticore.c: sti_select_fbfont()
 - sticore.c: sti_select_font()
 - sticore.c: sti_get_wmode_rom()
 - sticore.c: sti_read_rom()

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomake macfb_setup() static
Adrian Bunk [Sat, 26 Jul 2008 02:46:26 +0000 (19:46 -0700)]
make macfb_setup() static

This patch makes the needlessly global macfb_setup() static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomake init/do_mounts.c:root_device_name static
Adrian Bunk [Sat, 26 Jul 2008 02:46:25 +0000 (19:46 -0700)]
make init/do_mounts.c:root_device_name static

This patch makes the needlessly global root_device_name static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/char/rtc.c: make 2 functions static
Adrian Bunk [Sat, 26 Jul 2008 02:46:25 +0000 (19:46 -0700)]
drivers/char/rtc.c: make 2 functions static

The following functions can now become static:
 - rtc_interrupt()
 - rtc_get_rtc_time()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Bernhard Walle <bwalle@suse.de>
Acked-by: Paul Gortmaker <p_gortmaker@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomm/swapfile.c: make code static
Adrian Bunk [Sat, 26 Jul 2008 02:46:24 +0000 (19:46 -0700)]
mm/swapfile.c: make code static

This patch makes the following needlessly global code static:
 - swap_lock
 - nr_swapfiles
 - struct swap_list

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>