firefly-linux-kernel-4.4.55.git
15 years agoKVM: SVM: Fix cross vendor migration issue with unusable bit
Andre Przywara [Tue, 28 Apr 2009 10:45:30 +0000 (12:45 +0200)]
KVM: SVM: Fix cross vendor migration issue with unusable bit

AMDs VMCB does not have an explicit unusable segment descriptor field,
so we emulate it by using "not present". This has to be setup before
the fixups, because this field is used there.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Linus Torvalds [Sun, 10 May 2009 17:49:53 +0000 (10:49 -0700)]
Merge git://git./linux/kernel/git/gregkh/staging-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
  Staging: comedi: David doesn't want to get comedi patches
  Staging: rtl8187se: Fix compilation warnings and procfs directory leak
  Staging: rt2870: new device id
  Staging: w35und: unregister device from the ieee80211 stack upon ->disconnect()

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Sun, 10 May 2009 17:49:41 +0000 (10:49 -0700)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  usb-serial: ftdi_sio: fix reference counting of ftdi_private
  USB: unusual_devs: extend nokia 6288 bcd range
  USB: Gadget: fix UTF conversion in the usbstring library
  USB: Fix makefile so that CONFIG_WDM and CONFIG_TMC work.
  USB: ftdi_sio: add vendor/product id for the Marvell SheevaPlug
  USB: cxacru: Fix negative dB output

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Sun, 10 May 2009 17:49:31 +0000 (10:49 -0700)]
Merge git://git./linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  Revert driver core: move platform_data into platform_device
  Revert driver core: fix passing platform_data
  Remove old PRINTK_DEBUG config item
  Doc/sysfs-rules: Swap the order of the words so the sentence makes more sense
  Driver core: platform: fix kernel-doc warnings

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Sun, 10 May 2009 17:49:08 +0000 (10:49 -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: (22 commits)
  Fix the race between capifs remount and node creation
  Fix races around the access to ->s_options
  switch ufs directories to ufs_sync_file()
  Switch open_exec() and sys_uselib() to do_open_filp()
  Make open_exec() and sys_uselib() use may_open(), instead of duplicating its parts
  Reduce path_lookup() abuses
  Make checkpatch.pl shut up on fs/inode.c
  NULL noise in fs/super.c:kill_bdev_super()
  romfs: cleanup romfs_fs.h
  ROMFS: romfs_dev_read() error ignored
  fs: dcache fix LRU ordering
  ocfs2: Use nd_set_link().
  Fix deadlock in ipathfs ->get_sb()
  Fix a leak in failure exit in 9p ->get_sb()
  Convert obvious places to deactivate_locked_super()
  New helper: deactivate_locked_super()
  reiserfs: remove privroot hiding in lookup
  reiserfs: dont associate security.* with xattr files
  reiserfs: fixup xattr_root caching
  Always lookup priv_root on reiserfs mount and keep it
  ...

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes
Linus Torvalds [Sun, 10 May 2009 17:47:18 +0000 (10:47 -0700)]
Merge git://git./linux/kernel/git/steve/gfs2-2.6-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
  GFS2: Fix glock ref counting bug

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Sun, 10 May 2009 17:47:07 +0000 (10:47 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Fix line-in on Mac Mini Core2 Duo
  ALSA: Release v1.0.20
  sound: via82xx: fix DXS volume range
  sound: serial-u16550: fix buffer overflow
  ASoC: Fix errors in WM8990

15 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Sun, 10 May 2009 17:46:58 +0000 (10:46 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mchehab/linux-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  V4L/DVB (11680): cafe_ccic: use = instead of == for setting a value at a var
  V4L/DVB (11679): cafe_ccic: fix sensor detection
  V4L/DVB (11675): ivtv/radio: fix V4L2_TUNER_MODE/V4L2_TUNER_SUB confusion
  V4L/DVB (11674): ivtv: fix incorrect bit tests
  V4L/DVB (11669): uvc: fix compile warning
  V4L/DVB (11668): ivtv: fix compiler warning.
  V4L/DVB (11664): cx23885: Frontend wasn't locking on HVR-1500
  V4L/DVB (11662): v4l2-ioctl: Clear buffer type specific trailing fields/padding
  V4L/DVB (11661): v4l2-ioctl: Check buffer types using g_fmt instead of try_fmt
  V4L/DVB (11660): zoran: fix bug when enumerating format -1
  V4L/DVB (11575): uvcvideo: fix uvc resume failed

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Sun, 10 May 2009 17:46:45 +0000 (10:46 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (26 commits)
  bonding: fix panic if initialization fails
  IXP4xx: complete Ethernet netdev setup before calling register_netdev().
  IXP4xx: use "ENODEV" instead of "ENOSYS" in module initialization.
  ipvs: Fix IPv4 FWMARK virtual services
  ipv4: Make INET_LRO a bool instead of tristate.
  net: remove stale reference to fastroute from Kconfig help text
  net: update skb_recycle_check() for hardware timestamping changes
  bnx2: Fix panic in bnx2_poll_work().
  net-sched: fix bfifo default limit
  igb: resolve panic on shutdown when SR-IOV is enabled
  wimax: oops: wimax_dev_add() is the only one that can initialize the state
  wimax: fix oops if netlink fails to add attribute
  Bluetooth: Move dev_set_name() to a context that can sleep
  netfilter: ctnetlink: fix wrong message type in user updates
  netfilter: xt_cluster: fix use of cluster match with 32 nodes
  netfilter: ip6t_ipv6header: fix match on packets ending with NEXTHDR_NONE
  netfilter: add missing linux/types.h include to xt_LED.h
  mac80211: pid, fix memory corruption
  mac80211: minstrel, fix memory corruption
  cfg80211: fix comment on regulatory hint processing
  ...

15 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Sun, 10 May 2009 10:06:59 +0000 (12:06 +0200)]
Merge branch 'fix/asoc' into for-linus

* fix/asoc:
  ASoC: Fix errors in WM8990

15 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Sun, 10 May 2009 10:06:55 +0000 (12:06 +0200)]
Merge branch 'fix/hda' into for-linus

* fix/hda:
  ALSA: hda - Fix line-in on Mac Mini Core2 Duo

15 years agoMerge branch 'topic/misc' into for-linus
Takashi Iwai [Sun, 10 May 2009 10:06:08 +0000 (12:06 +0200)]
Merge branch 'topic/misc' into for-linus

* topic/misc:
  ALSA: Release v1.0.20

15 years agoMerge branch 'fix/misc' into for-linus
Takashi Iwai [Sun, 10 May 2009 10:05:53 +0000 (12:05 +0200)]
Merge branch 'fix/misc' into for-linus

* fix/misc:
  sound: via82xx: fix DXS volume range
  sound: serial-u16550: fix buffer overflow

15 years agoV4L/DVB (11680): cafe_ccic: use = instead of == for setting a value at a var
Mauro Carvalho Chehab [Tue, 5 May 2009 11:08:38 +0000 (08:08 -0300)]
V4L/DVB (11680): cafe_ccic: use = instead of == for setting a value at a var

/home/v4l/master/v4l/cafe_ccic.c: In function 'cafe_cam_init':
/home/v4l/master/v4l/cafe_ccic.c:778: warning: statement with no effect

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Cc: saeed bishara <saeed.bishara@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (11679): cafe_ccic: fix sensor detection
Hans Verkuil [Sun, 3 May 2009 07:58:04 +0000 (04:58 -0300)]
V4L/DVB (11679): cafe_ccic: fix sensor detection

Due to an uninitialized chip.ident field the chip identification failed.

Thanks-to: Saeed Bishara <saeed.bishara@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (11675): ivtv/radio: fix V4L2_TUNER_MODE/V4L2_TUNER_SUB confusion
Hans Verkuil [Sat, 2 May 2009 14:52:35 +0000 (11:52 -0300)]
V4L/DVB (11675): ivtv/radio: fix V4L2_TUNER_MODE/V4L2_TUNER_SUB confusion

V4L2_TUNER_MODE_ was used in a few places where V4L2_TUNER_SUB_ should have
been used.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (11674): ivtv: fix incorrect bit tests
Hans Verkuil [Sat, 2 May 2009 14:10:23 +0000 (11:10 -0300)]
V4L/DVB (11674): ivtv: fix incorrect bit tests

Found the coccinelle tool.

Thanks-to: Julia Lawall <julia@diku.dk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (11669): uvc: fix compile warning
Hans Verkuil [Sat, 2 May 2009 11:12:36 +0000 (08:12 -0300)]
V4L/DVB (11669): uvc: fix compile warning

The 2.6.30 kernel generates this warning:

uvc_driver.c:1729: warning: 'ret' may be used uninitialized in this function

I guess some new warning flag must have been turned on since this warning
didn't appear with older kernels (gcc version 4.3.1). It's also a bogus
warning, but since this code didn't comply to the coding standard anyway
I've modified it to 1) remove the warning and 2) conform to the coding
standard.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (11668): ivtv: fix compiler warning.
Hans Verkuil [Sat, 2 May 2009 10:56:46 +0000 (07:56 -0300)]
V4L/DVB (11668): ivtv: fix compiler warning.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (11664): cx23885: Frontend wasn't locking on HVR-1500
Steven Toth [Tue, 21 Apr 2009 01:42:00 +0000 (22:42 -0300)]
V4L/DVB (11664): cx23885: Frontend wasn't locking on HVR-1500

The boards control struct wasn't updated when (presumably) all of the
other drivers migrated from using scode_table to specifying the demod.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (11662): v4l2-ioctl: Clear buffer type specific trailing fields/padding
Trent Piepho [Fri, 1 May 2009 00:03:34 +0000 (21:03 -0300)]
V4L/DVB (11662): v4l2-ioctl: Clear buffer type specific trailing fields/padding

Some ioctls have structs that are a different size depending on what type
of buffer is being used.  If the buffer type leaves a field unused or has
padding space at the end, this space should be zeroed out.

The problems with S_FMT and REQBUFS were original identified and patched by
Marton Nemeth <nm127@freemail.hu>.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (11661): v4l2-ioctl: Check buffer types using g_fmt instead of try_fmt
Trent Piepho [Fri, 1 May 2009 00:03:34 +0000 (21:03 -0300)]
V4L/DVB (11661): v4l2-ioctl: Check buffer types using g_fmt instead of try_fmt

For a number of different ioctls, the v4l2-ioctl code checks that the
passed buffer type is supported by the driver.  It did this by checking
that the driver defined a method for the try_fmt handler for that buffer
type.  However, try_fmt is optional and a driver might not provide it even
though it does support that type.  So use g_fmt instead, since that isn't
optional.

This should fix a problem with VBI capture with saa7146.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (11660): zoran: fix bug when enumerating format -1
Trent Piepho [Fri, 1 May 2009 00:03:34 +0000 (21:03 -0300)]
V4L/DVB (11660): zoran: fix bug when enumerating format -1

If someone requests a format at fmt->index == (unsigned)-1 and the first
format in the array doesn't have the requested type then num will still be
-1 when it's compared to fmt->index and there will appear to be a match.

Restructure the loop so this can't happen.  It's simpler this way too.  The
unnecessary check for (unsigned)fmt->index < 0 found by Roel Kluin
<roel.kluin@gmail.com> is removed this way too.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (11575): uvcvideo: fix uvc resume failed
Ming Lei [Fri, 17 Apr 2009 23:50:30 +0000 (20:50 -0300)]
V4L/DVB (11575): uvcvideo: fix uvc resume failed

Now urb buffers is not freed before suspend, so uvc_alloc_urb_buffers should
return packet counts allocated originally during uvc resume, instead of zero.

This version uses round down to return packet counts on Linus' suggestions,
or else may lead to buffer destructed if packet size is changed before
calling uvc_alloc_urb_buffers() in this kind of case.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoMerge branch 'net-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6
David S. Miller [Sat, 9 May 2009 20:20:46 +0000 (13:20 -0700)]
Merge branch 'net-fixes' of git://git./linux/kernel/git/chris/linux-2.6

15 years agobonding: fix panic if initialization fails
Florian Westphal [Fri, 8 May 2009 11:49:11 +0000 (11:49 +0000)]
bonding: fix panic if initialization fails

If module initialisation failed (e.g. because the bonding sysfs entry
cannot be created), kernel panics:
 IP: [<ffffffff8024910a>] destroy_workqueue+0x2d/0x146
Call Trace:
 [<ffffffff808268c4>] bond_destructor+0x28/0x78
 [<ffffffff80b64471>] netdev_run_todo+0x231/0x25a
 [<ffffffff80b6dbcd>] rtnl_unlock+0x9/0xb
 [<ffffffff81567907>] bonding_init+0x83e/0x84a

Remove the calls to bond_work_cancel_all() and destroy_workqueue();
both are also called/scheduled via bond_free_all().

bond_destroy_sysfs is unecessary because the sysfs entry has
not been created in the error case.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoFix the race between capifs remount and node creation
Al Viro [Fri, 8 May 2009 20:23:30 +0000 (16:23 -0400)]
Fix the race between capifs remount and node creation

we don't want to deal with half-updated config

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoFix races around the access to ->s_options
Al Viro [Fri, 8 May 2009 20:05:57 +0000 (16:05 -0400)]
Fix races around the access to ->s_options

Put generic_show_options read access to s_options under rcu_read_lock,
split save_mount_options() into "we are setting it the first time"
(uses in foo_fill_super()) and "we are relacing and freeing the old one",
synchronize_rcu() before kfree() in the latter.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoswitch ufs directories to ufs_sync_file()
Al Viro [Wed, 6 May 2009 23:56:21 +0000 (19:56 -0400)]
switch ufs directories to ufs_sync_file()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoSwitch open_exec() and sys_uselib() to do_open_filp()
Al Viro [Mon, 6 Apr 2009 15:16:22 +0000 (11:16 -0400)]
Switch open_exec() and sys_uselib() to do_open_filp()

... and make path_lookup_open() static

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoMake open_exec() and sys_uselib() use may_open(), instead of duplicating its parts
Al Viro [Mon, 6 Apr 2009 13:38:49 +0000 (09:38 -0400)]
Make open_exec() and sys_uselib() use may_open(), instead of duplicating its parts

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoReduce path_lookup() abuses
Al Viro [Fri, 3 Apr 2009 01:17:03 +0000 (21:17 -0400)]
Reduce path_lookup() abuses

... use kern_path() where possible

[folded a fix from rdd]

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoMake checkpatch.pl shut up on fs/inode.c
Manish Katiyar [Tue, 31 Mar 2009 14:05:54 +0000 (19:35 +0530)]
Make checkpatch.pl shut up on fs/inode.c

Code Quality According To Mingo(tm) has been vastly improved,
no code has been damaged^Wchanged^Wdamaged.

[commit message rewritten -- AV]

Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoNULL noise in fs/super.c:kill_bdev_super()
H Hartley Sweeten [Thu, 30 Apr 2009 00:14:57 +0000 (20:14 -0400)]
NULL noise in fs/super.c:kill_bdev_super()

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Subrata Modak <subrata@linux.vnet.ibm.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoromfs: cleanup romfs_fs.h
Christoph Hellwig [Tue, 7 Apr 2009 16:07:08 +0000 (18:07 +0200)]
romfs: cleanup romfs_fs.h

There's no kernel-only content in it anymore, so move it to header-y
and remove the superflous #ifdef __KERNEL__.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoROMFS: romfs_dev_read() error ignored
Roel Kluin [Sun, 26 Apr 2009 12:51:17 +0000 (14:51 +0200)]
ROMFS: romfs_dev_read() error ignored

romfs_dev_read() may return -EIO, but ret is unsigned, so the errorpath
isn't taken.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agofs: dcache fix LRU ordering
npiggin@suse.de [Sun, 26 Apr 2009 10:25:53 +0000 (20:25 +1000)]
fs: dcache fix LRU ordering

Fix ordering of LRU when moving referenced dentries to the head of the list
(they should go to the head of the list in the same order as they were found
from the tail, rather than reverse order).

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoocfs2: Use nd_set_link().
Joel Becker [Mon, 6 Apr 2009 23:43:42 +0000 (16:43 -0700)]
ocfs2: Use nd_set_link().

ocfs2 was hand-calling vfs_follow_link(), but there's no point to that.
Let's use page_follow_link_light() and nd_set_link().

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoFix deadlock in ipathfs ->get_sb()
Al Viro [Wed, 6 May 2009 05:36:04 +0000 (01:36 -0400)]
Fix deadlock in ipathfs ->get_sb()

forgot to unlock superblock before calling deactivate_super()...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoFix a leak in failure exit in 9p ->get_sb()
Al Viro [Wed, 6 May 2009 05:35:04 +0000 (01:35 -0400)]
Fix a leak in failure exit in 9p ->get_sb()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoConvert obvious places to deactivate_locked_super()
Al Viro [Wed, 6 May 2009 05:34:22 +0000 (01:34 -0400)]
Convert obvious places to deactivate_locked_super()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoNew helper: deactivate_locked_super()
Al Viro [Wed, 6 May 2009 05:07:50 +0000 (01:07 -0400)]
New helper: deactivate_locked_super()

Does equivalent of up_write(&s->s_umount); deactivate_super(s);
However, it does not does not unlock it until it's all over.
As the result, it's safe to use to dispose of new superblock on ->get_sb()
failure exits - nobody will see the sucker until it's all over.
Equivalent using up_write/deactivate_super is safe for that purpose
if superblock is either safe to use or has NULL ->s_root when we unlock.
Normally filesystems take the required precautions, but
a) we do have bugs in that area in some of them.
b) up_write/deactivate_super sequence is extremely common,
so the helper makes sense anyway.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoreiserfs: remove privroot hiding in lookup
Jeff Mahoney [Tue, 5 May 2009 19:30:17 +0000 (15:30 -0400)]
reiserfs: remove privroot hiding in lookup

 With Al Viro's patch to move privroot lookup to fs mount, there's no need
 to have special code to hide the privroot in reiserfs_lookup.

 I've also cleaned up the privroot hiding in reiserfs_readdir_dentry and
 removed the last user of reiserfs_xattrs().

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoreiserfs: dont associate security.* with xattr files
Jeff Mahoney [Tue, 5 May 2009 19:30:16 +0000 (15:30 -0400)]
reiserfs: dont associate security.* with xattr files

 The security.* xattrs are ignored for xattr files, so don't create them.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoreiserfs: fixup xattr_root caching
Jeff Mahoney [Tue, 5 May 2009 19:30:15 +0000 (15:30 -0400)]
reiserfs: fixup xattr_root caching

 The xattr_root caching was broken from my previous patch set. It wouldn't
 cause corruption, but could cause decreased performance due to allocating
 a larger chunk of the journal (~ 27 blocks) than it would actually use.

 This patch loads the xattr root dentry at xattr initialization and creates
 it on-demand. Since we're using the cached dentry, there's no point
 in keeping lookup_or_create_dir around, so that's removed.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoAlways lookup priv_root on reiserfs mount and keep it
Al Viro [Sun, 3 May 2009 10:00:05 +0000 (06:00 -0400)]
Always lookup priv_root on reiserfs mount and keep it

... even if it's a negative dentry.  That way we can set ->d_op on
root before anyone could race with us.  Simplify d_compare(), while
we are at it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoreiserfs: Expand i_mutex to enclose lookup_one_len
Jeff Mahoney [Fri, 1 May 2009 16:11:12 +0000 (12:11 -0400)]
reiserfs: Expand i_mutex to enclose lookup_one_len

 2.6.30-rc3 introduced some sanity checks in the VFS code to avoid NFS
 bugs by ensuring that lookup_one_len is always called under i_mutex.

 This patch expands the i_mutex locking to enclose lookup_one_len. This was
 always required, but not not enforced in the reiserfs code since it
 does locking around the xattr interactions with the xattr_sem.

 This is obvious enough, and it survived an overnight 50 thread ACL test.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agovfs: umount_begin BKL pushdown
Alessio Igor Bogani [Fri, 24 Apr 2009 07:06:53 +0000 (09:06 +0200)]
vfs: umount_begin BKL pushdown

Push BKL down into ->umount_begin()

Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoGFS2: Fix glock ref counting bug
Steven Whitehouse [Thu, 30 Apr 2009 13:52:58 +0000 (14:52 +0100)]
GFS2: Fix glock ref counting bug

Depending on the ordering of events as we go around the
glock shrinker loop, it is possible to drop the ref count
of a glock incorrectly. It doesn't happen very often. This
patch corrects the got_ref variable, fixing the problem.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
15 years agoIXP4xx: complete Ethernet netdev setup before calling register_netdev().
Krzysztof HaƂasa [Mon, 4 May 2009 19:31:52 +0000 (21:31 +0200)]
IXP4xx: complete Ethernet netdev setup before calling register_netdev().

Signed-off-by: Krzysztof HaƂasa <khc@pm.waw.pl>
15 years agoIXP4xx: use "ENODEV" instead of "ENOSYS" in module initialization.
Krzysztof HaƂasa [Tue, 28 Apr 2009 12:54:07 +0000 (14:54 +0200)]
IXP4xx: use "ENODEV" instead of "ENOSYS" in module initialization.
ENOSYS makes modutils complain about missing kernel module support.

Signed-off-by: Krzysztof HaƂasa <khc@pm.waw.pl>
15 years agoStaging: comedi: David doesn't want to get comedi patches
Greg Kroah-Hartman [Sat, 25 Apr 2009 00:04:44 +0000 (17:04 -0700)]
Staging: comedi: David doesn't want to get comedi patches

He's long moved on from the project.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rtl8187se: Fix compilation warnings and procfs directory leak
Larry Finger [Sun, 19 Apr 2009 02:09:08 +0000 (21:09 -0500)]
Staging: rtl8187se: Fix compilation warnings and procfs directory leak

Fix some warnings during compilation and correct a programming error
that was leaking a directory in /proc.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Bernhard Schiffner <bernhard@schiffner-limbach.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: rt2870: new device id
Dave Hayes [Sat, 18 Apr 2009 07:18:37 +0000 (02:18 -0500)]
Staging: rt2870: new device id

Hey, I have an Edimax wireless USB adapter that uses the rt2870 chipset.
lsusb shows it as follows:

Bus 001 Device 002: ID 7392:7717

When I added that ID to rt2870.h, the device came up and worked as
expected.

From: Dave Hayes <dwhayes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoStaging: w35und: unregister device from the ieee80211 stack upon ->disconnect()
Pekka Enberg [Thu, 16 Apr 2009 11:43:14 +0000 (14:43 +0300)]
Staging: w35und: unregister device from the ieee80211 stack upon ->disconnect()

Impact: fix module removal

This patch fixes an oops when the w35und module is removed from the
kernel and added back.

Reported-by: luoyi <luoyi.ly@gmail.com>
Tested-by: Sandro Bonazzola <sandro.bonazzola@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb-serial: ftdi_sio: fix reference counting of ftdi_private
Alan Stern [Thu, 30 Apr 2009 14:06:19 +0000 (10:06 -0400)]
usb-serial: ftdi_sio: fix reference counting of ftdi_private

This patch (as1238) adds proper reference counting for ftdi_sio's
private data structure.  Without it, the driver will free the
structure while it is still in use if the user unplugs the serial
device before closing the device file.

The patch also replaces a slightly dangerous
cancel_delayed_work/flush_scheduled_work pair with
cancel_delayed_work_sync, which is always safer.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Daniel Mack <daniel@caiaq.de>
Tested-by: Daniel Mack <daniel@caiaq.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: unusual_devs: extend nokia 6288 bcd range
Phil Dibowitz [Sun, 26 Apr 2009 10:47:51 +0000 (12:47 +0200)]
USB: unusual_devs: extend nokia 6288 bcd range

This patch was originaly submitted by Phillip Potter
<phillipinda@hotmail.com> but was re-diffed to conform with
SubmittingPatches and to rebase on a newer tree by me.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Gadget: fix UTF conversion in the usbstring library
Alan Stern [Mon, 27 Apr 2009 17:22:40 +0000 (13:22 -0400)]
USB: Gadget: fix UTF conversion in the usbstring library

This patch (as1234) fixes a bug in the UTF8 -> UTF-16 conversion
routine in the gadget/usbstring library.  In a UTF-8 multi-byte
sequence, all bytes after the first should have their high-order
two bits set to 10, not 11.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Fix makefile so that CONFIG_WDM and CONFIG_TMC work.
Andy Lutomirski [Tue, 28 Apr 2009 19:53:02 +0000 (15:53 -0400)]
USB: Fix makefile so that CONFIG_WDM and CONFIG_TMC work.

If CONFIG_USB_ACM and CONFIG_USB_PRINTER are not set, then
cdc-wdm and usbtmc won't get built.

Signed-off-by: Andy Lutomirski <amluto@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: ftdi_sio: add vendor/product id for the Marvell SheevaPlug
Nicolas Pitre [Fri, 24 Apr 2009 02:38:12 +0000 (22:38 -0400)]
USB: ftdi_sio: add vendor/product id for the Marvell SheevaPlug

For reference:
http://www.marvell.com/products/embedded_processors/developer/kirkwood/sheevaplug.jsp

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: cxacru: Fix negative dB output
Simon Arlott [Thu, 23 Apr 2009 17:19:02 +0000 (18:19 +0100)]
USB: cxacru: Fix negative dB output

Values of dB between -0.99 and -0.01 will be output with the wrong
sign. This converts the negative value to positive and outputs it
with a "-" prefix.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoRevert driver core: move platform_data into platform_device
Greg Kroah-Hartman [Sun, 8 Mar 2009 15:13:32 +0000 (23:13 +0800)]
Revert driver core: move platform_data into platform_device

This reverts commit 006f4571a15fae3a0575f2a0f9e9b63b3d1012f8:

This patch moves platform_data from struct device into
struct platform_device, based on the two ideas:

1. Now all platform_driver is registered by platform_driver_register,
   which makes probe()/release()/... of platform_driver passed parameter
   of platform_device *, so platform driver can get platform_data from
   platform_device;

2. Other kind of devices do not need to use platform_data, we can
   decrease size of device if moving it to platform_device.

Taking into consideration of thousands of files to be fixed and they
can't be finished in one night(maybe it will take a long time), so we
keep platform_data in device to allow two kind of cases coexist until
all platform devices pass its platfrom data from
platform_device->platform_data.

All patches to do this kind of conversion are welcome.

As we don't really want to do it, it was a bad idea.

Cc: David Brownell <david-b@pacbell.net>
Cc: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoRevert driver core: fix passing platform_data
Ming Lei [Fri, 13 Mar 2009 15:06:59 +0000 (23:06 +0800)]
Revert driver core: fix passing platform_data

This reverts commit ce21c7bcd796fc4f45d48781b7e85f493cc55ee5:
We will remove platform_data field from struct device until
all platform devices pass its specific data from platfom_device
and all platform drivers use platform specific data passed by
platform_device->platform_data. This kind of conversion will
need a long time, for thousands of files is affected.

To make the conversion easily, we allow platform specific data
passed by struct device or struct platform_device and platform
driver may use it from struct device or struct platform_device.

As we really don't want to do this at all.

Cc: David Brownell <david-b@pacbell.net>
Cc: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoRemove old PRINTK_DEBUG config item
Jason Baron [Wed, 22 Apr 2009 19:49:31 +0000 (15:49 -0400)]
Remove old PRINTK_DEBUG config item

On Tue, Apr 21, 2009 at 01:55:53PM +0200, Stefan Richter wrote:
> Robert P. J. Day wrote:
> >   lib/Kconfig.debug:      select PRINTK_DEBUG
> >
> > should that perhaps refer to "DYNAMIC_PRINTK_DEBUG"?  since there is
> > no such thing as a PRINTK_DEBUG Kconfig variable.
>
> Looks like a rudiment from an earlier version of Jason's "driver core:
> basic infrastructure for per-module dynamic debug messages",
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=346e15beb5343c2eb8216d820f2ed8f150822b08
> Search an LKML archive for '+#ifdef CONFIG_PRINTK_DEBUG'.
>
> Jason, should it be deleted or replaced by something?

We re-named 'DYNAMIC_PRINTK_DEBUG' to 'DYNAMIC_DEBUG' in 2.6.30....
'PRINTK_DEBUG' as pointed out never existed. So, it appears to be
extraneous, and should be removed. thanks for pointing it out.

Signed-off-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoDoc/sysfs-rules: Swap the order of the words so the sentence makes more sense
Henrik Austad [Tue, 21 Apr 2009 01:42:38 +0000 (18:42 -0700)]
Doc/sysfs-rules: Swap the order of the words so the sentence makes more sense

Signed-off-by: Henrik Austad <henrik@austad.us>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoDriver core: platform: fix kernel-doc warnings
Randy Dunlap [Tue, 21 Apr 2009 14:22:53 +0000 (07:22 -0700)]
Driver core: platform: fix kernel-doc warnings

Fix function parameter notation in platform.c;
fixes kernel-doc warnings.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoLinux 2.6.30-rc5
Linus Torvalds [Sat, 9 May 2009 00:14:14 +0000 (17:14 -0700)]
Linux 2.6.30-rc5

15 years agoMerge git://git.infradead.org/mtd-2.6
Linus Torvalds [Sat, 9 May 2009 00:00:41 +0000 (17:00 -0700)]
Merge git://git.infradead.org/mtd-2.6

* git://git.infradead.org/mtd-2.6:
  mtd: fix timeout in M25P80 driver
  mtd: Bug in m25p80.c during whole-chip erase
  mtd: expose subpage size via sysfs
  mtd: mtd in mtd_release is unused without CONFIG_MTD_CHAR

15 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 8 May 2009 23:59:23 +0000 (16:59 -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: MCE: make cmci_discover_lock irq-safe
  x86: xen, i386: reserve Xen pagetables
  x86, kexec: fix crashdump panic with CONFIG_KEXEC_JUMP
  x86-64: finish cleanup_highmaps()'s job wrt. _brk_end
  x86: fix boot hang in early_reserve_e820()
  x86: Fix a typo in a printk message
  x86, srat: do not register nodes beyond e820 map

15 years agoMerge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
Linus Torvalds [Fri, 8 May 2009 23:25:00 +0000 (16:25 -0700)]
Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6

* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  hwmon: (w83781d) Fix W83782D support (NULL pointer dereference)
  hwmon: (asus_atk0110) Fix compiler warning

15 years agoMerge branch 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblaze
Linus Torvalds [Fri, 8 May 2009 23:24:25 +0000 (16:24 -0700)]
Merge branch 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblaze

* 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblaze:
  microblaze: Fix return value for sys_ipc
  microblaze: Storage class should be before const qualifier

15 years agokprobes: fix to use text_mutex around arm/disarm kprobe
Masami Hiramatsu [Thu, 7 May 2009 20:31:26 +0000 (16:31 -0400)]
kprobes: fix to use text_mutex around arm/disarm kprobe

Fix kprobes to lock text_mutex around some arch_arm/disarm_kprobe() which
are newly added by commit de5bd88d5a5cce3cacea904d3503e5ebdb3852a2.

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Jim Keniston <jkenisto@us.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoipvs: Fix IPv4 FWMARK virtual services
Simon Horman [Wed, 6 May 2009 15:02:29 +0000 (15:02 +0000)]
ipvs: Fix IPv4 FWMARK virtual services

This fixes the use of fwmarks to denote IPv4 virtual services
which was unfortunately broken as a result of the integration
of IPv6 support into IPVS, which was included in 2.6.28.

The problem arises because fwmarks are stored in the 4th octet
of a union nf_inet_addr .all, however in the case of IPv4 only
the first octet, corresponding to .ip, is assigned and compared.

In other words, using .all = { 0, 0, 0, htonl(svc->fwmark) always
results in a value of 0 (32bits) being stored for IPv4. This means
that one fwmark can be used, as it ends up being mapped to 0, but things
break down when multiple fwmarks are used, as they all end up being mapped
to 0.

As fwmarks are 32bits a reasonable fix seems to be to just store the fwmark
in .ip, and comparing and storing .ip when fwmarks are used.

This patch makes the assumption that in calls to ip_vs_ct_in_get()
and ip_vs_sched_persist() if the proto parameter is IPPROTO_IP then
we are dealing with an fwmark. I believe this is valid as ip_vs_in()
does fairly strict filtering on the protocol and IPPROTO_IP should
not be used in these calls unless explicitly passed when making
these calls for fwmarks in ip_vs_sched_persist().

Tested-by: Fabien DuchĂȘne <fabien.duchene@student.uclouvain.be>
Cc: Joseph Mack NA3T <jmack@wm7d.net>
Cc: Julius Volz <julius.volz@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv4: Make INET_LRO a bool instead of tristate.
David S. Miller [Fri, 8 May 2009 19:45:26 +0000 (12:45 -0700)]
ipv4: Make INET_LRO a bool instead of tristate.

This code is used as a library by several device drivers,
which select INET_LRO.

If some are modules and some are statically built into the
kernel, we get build failures if INET_LRO is modular.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agohwmon: (w83781d) Fix W83782D support (NULL pointer dereference)
Jean Delvare [Fri, 8 May 2009 18:27:28 +0000 (20:27 +0200)]
hwmon: (w83781d) Fix W83782D support (NULL pointer dereference)

Commit 360782dde00a2e6e7d9fd57535f90934707ab8a8 (hwmon: (w83781d) Stop
abusing struct i2c_client for ISA devices) broke W83782D support for
devices connected on the ISA bus. You will hit a NULL pointer
dereference as soon as you read any device attribute. Other devices,
and W83782D devices on the SMBus, aren't affected.

Reported-by: Michel Abraham
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Michel Abraham
15 years agohwmon: (asus_atk0110) Fix compiler warning
Luca Tettamanti [Fri, 8 May 2009 18:27:28 +0000 (20:27 +0200)]
hwmon: (asus_atk0110) Fix compiler warning

atk_sensor_type is only used when DEBUG is defined.

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agomtd: fix timeout in M25P80 driver
Peter Horton [Fri, 8 May 2009 12:51:53 +0000 (13:51 +0100)]
mtd: fix timeout in M25P80 driver

Extend erase timeout in M25P80 SPI Flash driver.

The M25P80 drivers fails erasing sectors on a M25P128 because the ready
wait timeout is too short. Change the timeout from a simple loop count to a
suitable number of seconds.

Signed-off-by: Peter Horton <zero@colonel-panic.org>
Tested-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agox86: MCE: make cmci_discover_lock irq-safe
Hidetoshi Seto [Fri, 8 May 2009 08:28:40 +0000 (17:28 +0900)]
x86: MCE: make cmci_discover_lock irq-safe

Lockdep reports the warning below when Li tries to offline one cpu:

[  110.835487] =================================
[  110.835616] [ INFO: inconsistent lock state ]
[  110.835688] 2.6.30-rc4-00336-g8c9ed89 #52
[  110.835757] ---------------------------------
[  110.835828] inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
[  110.835908] swapper/0 [HC1[1]:SC0[0]:HE0:SE1] takes:
[  110.835982]  (cmci_discover_lock){?.+...}, at: [<ffffffff80236dc0>] cmci_clear+0x30/0x9b

cmci_clear() can be called via smp_call_function_single().

It is better to disable interrupt while holding cmci_discover_lock,
to turn it into an irq-safe lock - we can deadlock otherwise.

[ Impact: fix possible deadlock in the MCE code ]

Reported-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <4A03ED38.8000700@jp.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Reported-by: Shaohua Li<shaohua.li@intel.com>
15 years agox86: xen, i386: reserve Xen pagetables
Jeremy Fitzhardinge [Thu, 7 May 2009 18:56:44 +0000 (11:56 -0700)]
x86: xen, i386: reserve Xen pagetables

The Xen pagetables are no longer implicitly reserved as part of the other
i386_start_kernel reservations, so make sure we explicitly reserve them.
This prevents them from being released into the general kernel free page
pool and reused.

[ Impact: fix Xen guest crash ]

Also-Bisected-by: Bryan Donlan <bdonlan@gmail.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Xen-devel <xen-devel@lists.xensource.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <4A032EEC.30509@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoALSA: hda - Fix line-in on Mac Mini Core2 Duo
Takashi Iwai [Thu, 7 May 2009 14:22:53 +0000 (16:22 +0200)]
ALSA: hda - Fix line-in on Mac Mini Core2 Duo

BIOS on Mac Mini Core2 Duo sets both INPUT and OUTPUT pinctl bits to
the line-in jack, and it confuses the driver as if it's a valid input.
This patch adds the check of OUTPUT bit so that the driver fixes the
invalid pin setup.

Tested-by: Tino Keitel <tino.keitel@gmx.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agox86, kexec: fix crashdump panic with CONFIG_KEXEC_JUMP
Huang Ying [Fri, 8 May 2009 02:51:41 +0000 (10:51 +0800)]
x86, kexec: fix crashdump panic with CONFIG_KEXEC_JUMP

Tim Starling reported that crashdump will panic with kernel compiled
with CONFIG_KEXEC_JUMP due to null pointer deference in
machine_kexec_32.c: machine_kexec(), when deferencing
kexec_image. Refering to:

http://bugzilla.kernel.org/show_bug.cgi?id=13265

This patch fixes the BUG via replacing global variable reference:
kexec_image in machine_kexec() with local variable reference: image,
which is more appropriate, and will not be null.

Same BUG is in machine_kexec_64.c too, so fixed too in the same way.

[ Impact: fix crash on kexec ]

Reported-by: Tim Starling <tstarling@wikimedia.org>
Signed-off-by: Huang Ying <ying.huang@intel.com>
LKML-Reference: <1241751101.6259.85.camel@yhuang-dev.sh.intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86-64: finish cleanup_highmaps()'s job wrt. _brk_end
Jan Beulich [Wed, 6 May 2009 12:06:47 +0000 (13:06 +0100)]
x86-64: finish cleanup_highmaps()'s job wrt. _brk_end

With the introduction of the .brk section, special care must be taken
that no unused page table entries remain if _brk_end and _end are
separated by a 2M page boundary. cleanup_highmap() runs very early and
hence cannot take care of that, hence potential entries needing to be
removed past _brk_end must be cleared once the brk allocator has done
its job.

[ Impact: avoids undesirable TLB aliases ]

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86: fix boot hang in early_reserve_e820()
Jan Beulich [Wed, 6 May 2009 12:02:19 +0000 (13:02 +0100)]
x86: fix boot hang in early_reserve_e820()

If the first non-reserved (sub-)range doesn't fit the size requested,
an endless loop will be entered. If a range returned from
find_e820_area_size() turns out insufficient in size, the range must
be skipped before calling the function again.

[ Impact: fixes boot hang on some platforms ]

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Fri, 8 May 2009 04:13:24 +0000 (21:13 -0700)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: (32 commits)
  [CIFS] Fix double list addition in cifs posix open code
  [CIFS] Allow raw ntlmssp code to be enabled with sec=ntlmssp
  [CIFS] Fix SMB uid in NTLMSSP authenticate request
  [CIFS] NTLMSSP reenabled after move from connect.c to sess.c
  [CIFS] Remove sparse warning
  [CIFS] remove checkpatch warning
  [CIFS] Fix final user of old string conversion code
  [CIFS] remove cifs_strfromUCS_le
  [CIFS] NTLMSSP support moving into new file, old dead code removed
  [CIFS] Fix endian conversion of vcnum field
  [CIFS] Remove trailing whitespace
  [CIFS] Remove sparse endian warnings
  [CIFS] Add remaining ntlmssp flags and standardize field names
  [CIFS] Fix build warning
  cifs: fix length handling in cifs_get_name_from_search_buf
  [CIFS] Remove unneeded QuerySymlink call and fix mapping for unmapped status
  [CIFS] rename cifs_strndup to cifs_strndup_from_ucs
  Added loop check when mounting DFS tree.
  Enable dfs submounts to handle remote referrals.
  [CIFS] Remove older session setup implementation
  ...

15 years ago[CIFS] Fix double list addition in cifs posix open code
Steve French [Fri, 8 May 2009 03:04:30 +0000 (03:04 +0000)]
[CIFS] Fix double list addition in cifs posix open code

Remove adding open file entry twice to lists in the file
Do not fill file info twice in case of posix opens and creates

Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agonet: remove stale reference to fastroute from Kconfig help text
Ashish Karkare [Thu, 7 May 2009 23:31:01 +0000 (16:31 -0700)]
net: remove stale reference to fastroute from Kconfig help text

Signed-off-by: Ashish Karkare <akarkare@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoNOMMU: Don't check vm_region::vm_start is page aligned in add_nommu_region()
David Howells [Thu, 7 May 2009 10:41:37 +0000 (11:41 +0100)]
NOMMU: Don't check vm_region::vm_start is page aligned in add_nommu_region()

Don't check vm_region::vm_start is page aligned in add_nommu_region() because
the region may reflect some non-page-aligned mapped file, such as could be
obtained from RomFS XIP.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Thu, 7 May 2009 19:01:41 +0000 (12:01 -0700)]
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md: remove rd%d links immediately after stopping an array.
  md: remove ability to explicit set an inactive array to 'clean'.
  md: constify VFTs
  md: tidy up status_resync to handle large arrays.
  md: fix some (more) errors with bitmaps on devices larger than 2TB.
  md/raid10: don't clear bitmap during recovery if array will still be degraded.
  md: fix loading of out-of-date bitmap.

15 years agorandom: make get_random_int() more random
Linus Torvalds [Tue, 5 May 2009 15:17:43 +0000 (08:17 -0700)]
random: make get_random_int() more random

It's a really simple patch that basically just open-codes the current
"secure_ip_id()" call, but when open-coding it we now use a _static_
hashing area, so that it gets updated every time.

And to make sure somebody can't just start from the same original seed of
all-zeroes, and then do the "half_md4_transform()" over and over until
they get the same sequence as the kernel has, each iteration also mixes in
the same old "current->pid + jiffies" we used - so we should now have a
regular strong pseudo-number generator, but we also have one that doesn't
have a single seed.

Note: the "pid + jiffies" is just meant to be a tiny tiny bit of noise. It
has no real meaning. It could be anything. I just picked the previous
seed, it's just that now we keep the state in between calls and that will
feed into the next result, and that should make all the difference.

I made that hash be a per-cpu data just to avoid cache-line ping-pong:
having multiple CPU's write to the same data would be fine for randomness,
and add yet another layer of chaos to it, but since get_random_int() is
supposed to be a fast interface I did it that way instead. I considered
using "__raw_get_cpu_var()" to avoid any preemption overhead while still
getting the hash be _mostly_ ping-pong free, but in the end good taste won
out.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Thu, 7 May 2009 17:54:32 +0000 (10:54 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 5507/1: support R_ARM_MOVW_ABS_NC and MOVT_ABS relocation types
  [ARM] 5506/1: davinci: DMA_32BIT_MASK --> DMA_BIT_MASK(32)
  i.MX31: Disable CPU_32v6K in mx3_defconfig.
  mx3fb: Fix compilation with CONFIG_PM
  mx27ads: move PBC mapping out of vmalloc space
  MXC: remove BUG_ON in interrupt handler
  mx31: remove mx31moboard_defconfig
  ARM: ARCH_MXC should select HAVE_CLK
  mxc : BUG in imx_dma_request
  mxc : Clean up properly when imx_dma_free() used without imx_dma_disable()
  [ARM] mv78xx0: update defconfig
  [ARM] orion5x: update defconfig
  [ARM] Kirkwood: update defconfig
  [ARM] Kconfig typo fix:  "PXA930" -> "CPU_PXA930".
  [ARM] S3C2412: Add missing cache flush in suspend code
  [ARM] S3C: Add UDIVSLOT support for newer UARTS
  [ARM] S3C64XX: Add S3C64XX_PA_IIS{0,1} to <mach/map.h>

15 years ago[ARM] 5507/1: support R_ARM_MOVW_ABS_NC and MOVT_ABS relocation types
Paul Gortmaker [Thu, 7 May 2009 15:18:40 +0000 (16:18 +0100)]
[ARM] 5507/1: support R_ARM_MOVW_ABS_NC and MOVT_ABS relocation types

From: Bruce Ashfield <bruce.ashfield@windriver.com>

To fully support the armv7-a instruction set/optimizations, support
for the R_ARM_MOVW_ABS_NC and R_ARM_MOVT_ABS relocation types is
required.

The MOVW and MOVT are both load-immediate instructions, MOVW loads 16
bits into the bottom half of a register, and MOVT loads 16 bits into the
top half of a register.

The relocation information for these instructions has a full 32 bit
value, plus an addend which is stored in the 16 immediate bits in the
instruction itself.  The immediate bits in the instruction are not
contiguous (the register # splits it into a 4 bit and 12 bit value),
so the addend has to be extracted accordingly and added to the value.
The value is then split and put into the instruction; a MOVW uses the
bottom 16 bits of the value, and a MOVT uses the top 16 bits.

Signed-off-by: David Borman <david.borman@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5506/1: davinci: DMA_32BIT_MASK --> DMA_BIT_MASK(32)
Kevin Hilman [Thu, 7 May 2009 13:25:48 +0000 (14:25 +0100)]
[ARM] 5506/1: davinci: DMA_32BIT_MASK --> DMA_BIT_MASK(32)

As per commit 284901a90a9e0b812ca3f5f852cbbfb60d10249d, use
DMA_BIT_MASK(n)

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agomd: remove rd%d links immediately after stopping an array.
NeilBrown [Thu, 7 May 2009 02:51:06 +0000 (12:51 +1000)]
md: remove rd%d links immediately after stopping an array.

md maintains link in sys/mdXX/md/ to identify which device has
which role in the array. e.g.
   rd2 -> dev-sda

indicates that the device with role '2' in the array is sda.

These links are only present when the array is active.  They are
created immediately after ->run is called, and so should be removed
immediately after ->stop is called.
However they are currently removed a little bit later, and it is
possible for ->run to be called again, thus adding these links, before
they are removed.

So move the removal earlier so they are consistently only present when
the array is active.

Signed-off-by: NeilBrown <neilb@suse.de>
15 years agomd: remove ability to explicit set an inactive array to 'clean'.
NeilBrown [Thu, 7 May 2009 02:50:57 +0000 (12:50 +1000)]
md: remove ability to explicit set an inactive array to 'clean'.

Being able to write 'clean' to an 'array_state' of an inactive array
to activate it in 'clean' mode is both unnecessary and inconvenient.

It is unnecessary because the same can be achieved by writing
'active'.  This activates and array, but it still remains 'clean'
until the first write.

It is inconvenient because writing 'clean' is more often used to
cause an 'active' array to revert to 'clean' mode (thus blocking
any writes until a 'write-pending' is promoted to 'active').

Allowing 'clean' to both activate an array and mark an active array as
clean can lead to races:  One program writes 'clean' to mark the
active array as clean at the same time as another program writes
'inactive' to deactivate (stop) and active array.  Depending on which
writes first, the array could be deactivated and immediately
reactivated which isn't what was desired.

So just disable the use of 'clean' to activate an array.

This avoids a race that can be triggered with mdadm-3.0 and external
metadata, so it suitable for -stable.

Reported-by: Rafal Marszewski <rafal.marszewski@intel.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Cc: <stable@kernel.org>
Signed-off-by: NeilBrown <neilb@suse.de>
15 years agomd: constify VFTs
Jan Engelhardt [Thu, 7 May 2009 02:49:37 +0000 (12:49 +1000)]
md: constify VFTs

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: NeilBrown <neilb@suse.de>
15 years agomd: tidy up status_resync to handle large arrays.
NeilBrown [Thu, 7 May 2009 02:49:35 +0000 (12:49 +1000)]
md: tidy up status_resync to handle large arrays.

Two problems in status_resync.
1/ It still used Kilobytes as the basic block unit, while most code
   now uses sectors uniformly.
2/ It doesn't allow for the possibility that max_sectors exceeds
   the range of "unsigned long".

So
 - change "max_blocks" to "max_sectors", and store sector numbers
   in there and in 'resync'
 - Make 'rt' a 'sector_t' so it can temporarily hold the number of
   remaining sectors.
 - use sector_div rather than normal division.
 - change the magic '100' used to preserve precision to '32'.
   + making it a power of 2 makes division easier
   + it doesn't need to be as large as it was chosen when we averaged
     speed over the entire run.  Now we average speed over the last 30
     seconds or so.

Reported-by: "Mario 'BitKoenig' Holbe" <Mario.Holbe@TU-Ilmenau.DE>
Signed-off-by: NeilBrown <neilb@suse.de>
15 years agomd: fix some (more) errors with bitmaps on devices larger than 2TB.
NeilBrown [Thu, 7 May 2009 02:49:06 +0000 (12:49 +1000)]
md: fix some (more) errors with bitmaps on devices larger than 2TB.

If a write intent bitmap covers more than 2TB, we sometimes work with
values beyond 32bit, so these need to be sector_t.  This patches
add the required casts to some unsigned longs that are being shifted
up.

This will affect any raid10 larger than 2TB, or any raid1/4/5/6 with
member devices that are larger than 2TB.

Signed-off-by: NeilBrown <neilb@suse.de>
Reported-by: "Mario 'BitKoenig' Holbe" <Mario.Holbe@TU-Ilmenau.DE>
Cc: stable@kernel.org
15 years agomd/raid10: don't clear bitmap during recovery if array will still be degraded.
NeilBrown [Thu, 7 May 2009 02:48:10 +0000 (12:48 +1000)]
md/raid10: don't clear bitmap during recovery if array will still be degraded.

If we have a raid10 with multiple missing devices, and we recover just
one of these to a spare, then we risk (depending on the bitmap and
array chunk size) clearing bits of the bitmap for which recovery isn't
complete (because a device is still missing).

This can lead to a subsequent "re-add" being recovered without
any IO happening, which would result in loss of data.

This patch takes the safe approach of not clearing bitmap bits
if the array will still be degraded.

This patch is suitable for all active -stable kernels.

Cc: stable@kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
15 years agomd: fix loading of out-of-date bitmap.
NeilBrown [Thu, 7 May 2009 02:47:19 +0000 (12:47 +1000)]
md: fix loading of out-of-date bitmap.

When md is loading a bitmap which it knows is out of date, it fills
each page with 1s and writes it back out again.  However the
write_page call makes used of bitmap->file_pages and
bitmap->last_page_size which haven't been set correctly yet.  So this
can sometimes fail.

Move the setting of file_pages and last_page_size to before the call
to write_page.

This bug can cause the assembly on an array to fail, thus making the
data inaccessible.  Hence I think it is a suitable candidate for
-stable.

Cc: stable@kernel.org
Reported-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: NeilBrown <neilb@suse.de>
15 years agonet: update skb_recycle_check() for hardware timestamping changes
Lennert Buytenhek [Wed, 6 May 2009 23:49:18 +0000 (16:49 -0700)]
net: update skb_recycle_check() for hardware timestamping changes

Commit ac45f602ee3d1b6f326f68bc0c2591ceebf05ba4 ("net: infrastructure
for hardware time stamping") added two skb initialization actions to
__alloc_skb(), which need to be added to skb_recycle_check() as well.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>