platform/kernel/linux-rpi.git
16 years agoV4L/DVB (8540): em28xx-cards: Add Compro VideoMate ForYou/Stereo model
Vitaly Wool [Sun, 27 Jul 2008 17:10:11 +0000 (14:10 -0300)]
V4L/DVB (8540): em28xx-cards: Add Compro VideoMate ForYou/Stereo model

Added Compro VideoMate ForYou/Stereo model (analog only)

Signed-off-by: Vitaly Wool <vital@embeddedalley.com>
[dougsland@gmail.com: Solved conflicts with v4l-dvb devel tree]
Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
[mchehab@infradead.org: Need to fix some merge conflicts]
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8539): em28xx-cards: New supported IDs for analog models
Douglas Schilling Landgraf [Sun, 27 Jul 2008 17:03:32 +0000 (14:03 -0300)]
V4L/DVB (8539): em28xx-cards: New supported IDs for analog models

- New supported IDs for analog models
  (Based on Markus Rechberger <mrechberger@gmail.com> version of em28xx driver)

- Validation field for new em28xx boards.

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
[mchehab@infradead.org: Need to fix some merge conflicts]
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8538): em28xx-cards: Add GrabBeeX+ USB2800 model
Aron Szabo [Sun, 27 Jul 2008 16:47:52 +0000 (13:47 -0300)]
V4L/DVB (8538): em28xx-cards: Add GrabBeeX+ USB2800 model

Added GrabBeeX+ USB2800 model (analog only)

[mchehab@infradead.org: Need to fix some merge conflicts]
Signed-off-by: Aron Szabo <aron@aron.ws>
Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoMerge ../linux-2.6
Mauro Carvalho Chehab [Sun, 27 Jul 2008 15:25:57 +0000 (12:25 -0300)]
Merge ../linux-2.6

16 years agoV4L/DVB (8534): remove select's of FW_LOADER
Adrian Bunk [Sun, 27 Jul 2008 13:04:55 +0000 (10:04 -0300)]
V4L/DVB (8534): remove select's of FW_LOADER

After commit d9b19199e4894089456aaad295023263b5225c1a
(always enable FW_LOADER unless EMBEDDED=y) we can remove
the FW_LOADER select's and corresponding dependencies
on HOTPLUG.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8522): videodev2: Fix merge conflict
Mauro Carvalho Chehab [Sun, 27 Jul 2008 11:55:17 +0000 (08:55 -0300)]
V4L/DVB (8522): videodev2: Fix merge conflict

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8532): mxl5007t: remove excessive locks
Michael Krufky [Sat, 26 Jul 2008 18:43:17 +0000 (15:43 -0300)]
V4L/DVB (8532): mxl5007t: remove excessive locks

The use of mutex locking is overly paranoid in this driver.
The only locks we need are around the manipulation of the
register arrays. The other locks are not needed - remove them.

Thanks to Steven Toth for pointing this out.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8531): mxl5007t: move i2c gate handling outside of mutex protected code...
Michael Krufky [Sat, 26 Jul 2008 15:06:57 +0000 (12:06 -0300)]
V4L/DVB (8531): mxl5007t: move i2c gate handling outside of mutex protected code blocks

There is no reason to protect the i2c gate handling within the mxl5007t
state mutex.

Thanks to Steven Toth for pointing this out.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8530): au0828: add support for new revision of HVR950Q
Michael Krufky [Wed, 9 Jul 2008 03:23:08 +0000 (00:23 -0300)]
V4L/DVB (8530): au0828: add support for new revision of HVR950Q

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8529): mxl5007t: enable _init and _sleep power management functionality
Michael Krufky [Sat, 12 Jul 2008 21:22:38 +0000 (18:22 -0300)]
V4L/DVB (8529): mxl5007t: enable _init and _sleep power management functionality

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8528): add support for MaxLinear MxL5007T silicon tuner
Michael Krufky [Mon, 7 Jul 2008 21:20:58 +0000 (18:20 -0300)]
V4L/DVB (8528): add support for MaxLinear MxL5007T silicon tuner

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Asaf Fishov <afishov@maxlinear.com>
Signed-off-by: Charles Kim <ckim@maxlinear.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8526): saa7146: fix VIDIOC_ENUM_FMT
Hans Verkuil [Sat, 26 Jul 2008 12:16:29 +0000 (09:16 -0300)]
V4L/DVB (8526): saa7146: fix VIDIOC_ENUM_FMT

VIDIOC_ENUM_FMT should keep the index and type fields. Instead,
type was zeroed.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8525): fix a few assorted spelling mistakes.
Hans Verkuil [Sat, 26 Jul 2008 11:37:58 +0000 (08:37 -0300)]
V4L/DVB (8525): fix a few assorted spelling mistakes.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8524): videodev: copy the VID_TYPE defines to videodev.h
Hans Verkuil [Sat, 26 Jul 2008 11:33:47 +0000 (08:33 -0300)]
V4L/DVB (8524): videodev: copy the VID_TYPE defines to videodev.h

The VID_TYPE defines are V4L1 specific, so copy them back to videodev.h.
In videodev2.h ensure that they are not used in the kernel (you need
to include videodev.h instead) and mark them are deprecated.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8523): v4l2-dev: remove unused type and type2 field from video_device
Hans Verkuil [Sat, 26 Jul 2008 11:26:43 +0000 (08:26 -0300)]
V4L/DVB (8523): v4l2-dev: remove unused type and type2 field from video_device

The type and type2 fields were unused and so could be removed.
Instead add a vfl_type field that contains the type of the video
device.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8521): gspca: Webcams with Sonix bridge and sensor ov7630 are VGA.
Jean-Francois Moine [Sun, 27 Jul 2008 05:56:33 +0000 (02:56 -0300)]
V4L/DVB (8521): gspca: Webcams with Sonix bridge and sensor ov7630 are VGA.

This fixes a bug introduced in c503a6f8332a (thanks to Hans de Goede).

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8520): gspca: Bad webcam information in some modules since 28b8203a830e.
Jean-Francois Moine [Sat, 26 Jul 2008 17:30:01 +0000 (14:30 -0300)]
V4L/DVB (8520): gspca: Bad webcam information in some modules since 28b8203a830e.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8519): gspca: Set the specific per webcam information in driver_info for...
Jean-Francois Moine [Sat, 26 Jul 2008 17:17:23 +0000 (14:17 -0300)]
V4L/DVB (8519): gspca: Set the specific per webcam information in driver_info for sonixb.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8518): gspca: Remove the remaining frame decoding functions from the subdrivers.
Jean-Francois Moine [Sat, 26 Jul 2008 11:02:47 +0000 (08:02 -0300)]
V4L/DVB (8518): gspca: Remove the remaining frame decoding functions from the subdrivers.

SPCA505 and SPCA508 added in the pixel formats.
Decode functions and associated resources removed in spca505, 506 and 508.
The decode routines are now found in the V4L library.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8517): gspca: Bad sensor for some webcams in zc3xx since 28b8203a830e.
Jean-Francois Moine [Sat, 26 Jul 2008 10:49:55 +0000 (07:49 -0300)]
V4L/DVB (8517): gspca: Bad sensor for some webcams in zc3xx since 28b8203a830e.

'.driver_info = ' forgotten in usb device id table.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8515): gspca: Webcam 0c45:6143 added in sonixj.
Jean-Francois Moine [Sat, 26 Jul 2008 06:43:59 +0000 (03:43 -0300)]
V4L/DVB (8515): gspca: Webcam 0c45:6143 added in sonixj.

It is an other Pccam168. The .inf says SN9C120B + SP80708, but it should
work as SN9C120 + MI0360.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8513): gspca: Set the specific per webcam information in driver_info.
Jean-Francois Moine [Fri, 25 Jul 2008 11:53:03 +0000 (08:53 -0300)]
V4L/DVB (8513): gspca: Set the specific per webcam information in driver_info.

This patch removes a big part of the code run at probe time.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8512): gspca: Do not use the driver_info field of usb_device_id.
Jean-Francois Moine [Wed, 23 Jul 2008 06:39:42 +0000 (03:39 -0300)]
V4L/DVB (8512): gspca: Do not use the driver_info field of usb_device_id.

The field driver_info will be used to handle the specific per webcam
information.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8511): gspca: Get the card name of QUERYCAP from the usb product name.
Jean-Francois Moine [Wed, 23 Jul 2008 06:24:06 +0000 (03:24 -0300)]
V4L/DVB (8511): gspca: Get the card name of QUERYCAP from the usb product name.

This is a preliminary for using the driver_info of the struct
usb_device_id to handle the specific per webcam information.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8509): pvrusb2: fix device descriptions for HVR-1900 & HVR-1950
Michael Krufky [Sat, 26 Jul 2008 21:28:26 +0000 (18:28 -0300)]
V4L/DVB (8509): pvrusb2: fix device descriptions for HVR-1900 & HVR-1950

Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8506): empress: fix control handling oops
Hans Verkuil [Sat, 26 Jul 2008 12:04:06 +0000 (09:04 -0300)]
V4L/DVB (8506): empress: fix control handling oops

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8505): saa7134-empress.c: fix deadlock
Hans Verkuil [Sat, 26 Jul 2008 12:01:24 +0000 (09:01 -0300)]
V4L/DVB (8505): saa7134-empress.c: fix deadlock

ts_release() locked a mutex that videobuf_stop() also tried to obtain.
But ts_release() shouldn't hold that mutex at all.

Make empress_users atomic as well to prevent possible race condition.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8504): s2255drv: add missing header
Hans Verkuil [Sun, 27 Jul 2008 09:30:21 +0000 (06:30 -0300)]
V4L/DVB (8504): s2255drv: add missing header

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8502): videodev2.h: CodingStyle cleanups
Mauro Carvalho Chehab [Sat, 26 Jul 2008 16:53:46 +0000 (13:53 -0300)]
V4L/DVB (8502): videodev2.h: CodingStyle cleanups

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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>