]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agoapplied Ka-Ro specific patches v3.3-karo
Lothar Waßmann [Mon, 2 Apr 2012 08:45:45 +0000 (10:45 +0200)]
applied Ka-Ro specific patches

12 years agoMerged Linux v3.3
Lothar Waßmann [Mon, 2 Apr 2012 07:45:32 +0000 (09:45 +0200)]
Merged Linux v3.3

12 years agoAdd support for matrix keypad
Lothar Waßmann [Fri, 30 Mar 2012 08:27:59 +0000 (10:27 +0200)]
Add support for matrix keypad

12 years agouse threaded IRQ to be able to co-exist with TSC2007 driver
Lothar Waßmann [Fri, 30 Mar 2012 08:24:21 +0000 (10:24 +0200)]
use threaded IRQ to be able to co-exist with TSC2007 driver

12 years agoadd support for bothedge IRQs and check for errors from various functions
Lothar Waßmann [Fri, 30 Mar 2012 08:23:30 +0000 (10:23 +0200)]
add support for bothedge IRQs and check for errors from various functions

12 years agoMerge remote branch 'remotes/lradc/mxs-lradc' into karo-tx28
Lothar Waßmann [Thu, 29 Mar 2012 17:24:51 +0000 (19:24 +0200)]
Merge remote branch 'remotes/lradc/mxs-lradc' into karo-tx28

12 years agomerged selected files from staging-next
Lothar Waßmann [Thu, 29 Mar 2012 17:23:40 +0000 (19:23 +0200)]
merged selected files from staging-next

12 years agoundo changes from merge
Lothar Waßmann [Thu, 29 Mar 2012 17:21:15 +0000 (19:21 +0200)]
undo changes from merge

12 years agoundo most changes from iio merge
Lothar Waßmann [Thu, 29 Mar 2012 17:06:31 +0000 (19:06 +0200)]
undo most changes from iio merge

12 years agoiio: adc: MXS-LRADC cleanups
Lothar Waßmann [Thu, 29 Mar 2012 15:46:36 +0000 (17:46 +0200)]
iio: adc: MXS-LRADC cleanups

12 years agosplit long lines and insert some blank lines
Lothar Waßmann [Thu, 29 Mar 2012 14:10:19 +0000 (16:10 +0200)]
split long lines and insert some blank lines

12 years agoiio: adc: MXS_LRADC several bugfixes and support for dynamic change of trigger delay
Lothar Waßmann [Thu, 29 Mar 2012 12:57:23 +0000 (14:57 +0200)]
iio: adc: MXS_LRADC several bugfixes and support for dynamic change of trigger delay

12 years agoRevert "some cleanups; needs testing"
Lothar Waßmann [Thu, 29 Mar 2012 07:23:15 +0000 (09:23 +0200)]
Revert "some cleanups; needs testing"

This reverts commit cab46a9ef2a0fd7ac7494388b44d7c6977229226.

12 years agoAdd saif platform_data
Lothar Waßmann [Thu, 29 Mar 2012 06:56:57 +0000 (08:56 +0200)]
Add saif platform_data

12 years agoseveral bugfixes
Lothar Waßmann [Thu, 29 Mar 2012 06:30:06 +0000 (08:30 +0200)]
several bugfixes

12 years agoreverted change from linux-next merge
Lothar Waßmann [Wed, 28 Mar 2012 16:02:20 +0000 (18:02 +0200)]
reverted change from linux-next merge

12 years agoapplied patch from mailinglis to fix mic bias and VAG for recording
Lothar Waßmann [Wed, 28 Mar 2012 14:19:09 +0000 (16:19 +0200)]
applied patch from mailinglis to fix mic bias and VAG for recording

12 years agoremoved debugging code
Lothar Waßmann [Wed, 28 Mar 2012 14:18:14 +0000 (16:18 +0200)]
removed debugging code

12 years agoremoved debugging code
Lothar Waßmann [Wed, 28 Mar 2012 14:17:44 +0000 (16:17 +0200)]
removed debugging code

12 years agoadded IIO_CHAN_INFO_TRIGGER_DELAY
Lothar Waßmann [Wed, 28 Mar 2012 14:16:21 +0000 (16:16 +0200)]
added IIO_CHAN_INFO_TRIGGER_DELAY

12 years agoremoved debugging code
Lothar Waßmann [Wed, 28 Mar 2012 14:16:01 +0000 (16:16 +0200)]
removed debugging code

12 years agolet MXS_LRADC_TS select IIO_TRIGGER
Lothar Waßmann [Wed, 28 Mar 2012 14:15:14 +0000 (16:15 +0200)]
let MXS_LRADC_TS select IIO_TRIGGER

12 years agorevert file to v3.3 version
Lothar Waßmann [Wed, 28 Mar 2012 07:20:50 +0000 (09:20 +0200)]
revert file to v3.3 version

12 years agoadd checks for refcount overflow
Lothar Waßmann [Wed, 28 Mar 2012 07:18:35 +0000 (09:18 +0200)]
add checks for refcount overflow

12 years agochange the way the video mode is selected.
Lothar Waßmann [Mon, 26 Mar 2012 12:59:56 +0000 (14:59 +0200)]
change the way the video mode is selected.
fb_add_videomode() refuses to add video modes with identical parameters.
So, the modelist may not contain the currently processed mode.

12 years agosome cleanups; needs testing
Lothar Waßmann [Sun, 25 Mar 2012 22:18:41 +0000 (00:18 +0200)]
some cleanups; needs testing

12 years agoworking code; needs cleanup
Lothar Waßmann [Sun, 25 Mar 2012 22:18:08 +0000 (00:18 +0200)]
working code; needs cleanup

12 years agocleanup
Lothar Waßmann [Sun, 25 Mar 2012 22:16:59 +0000 (00:16 +0200)]
cleanup

12 years ago- remove calls to iio_device_(un)register_trigger_consumer()
Lothar Waßmann [Sat, 24 Mar 2012 11:49:28 +0000 (12:49 +0100)]
- remove calls to iio_device_(un)register_trigger_consumer()
- search suitable channel by trigger name
- use module_get()/module_put() on open()/close()

12 years agolet MXS_LRADC_TS depend on IIO_TRIGGER
Lothar Waßmann [Sat, 24 Mar 2012 11:36:29 +0000 (12:36 +0100)]
let MXS_LRADC_TS depend on IIO_TRIGGER

12 years agouse kzalloc() instead of kmalloc()
Lothar Waßmann [Sat, 24 Mar 2012 11:35:39 +0000 (12:35 +0100)]
use kzalloc() instead of kmalloc()

12 years agoremove redundant forward declaration of struct iio_dev
Lothar Waßmann [Sat, 24 Mar 2012 10:34:08 +0000 (11:34 +0100)]
remove redundant forward declaration of struct iio_dev

12 years agodon't select IIO_TRIGGER on MXS_LRADC_TS
Lothar Waßmann [Sat, 24 Mar 2012 10:25:11 +0000 (11:25 +0100)]
don't select IIO_TRIGGER on MXS_LRADC_TS

12 years agoenable DEBUG
Lothar Waßmann [Sat, 24 Mar 2012 10:23:57 +0000 (11:23 +0100)]
enable DEBUG

12 years agoAdd threshold IRQs to mxs_lradc_rsrc
Lothar Waßmann [Sat, 24 Mar 2012 10:22:18 +0000 (11:22 +0100)]
Add threshold IRQs to mxs_lradc_rsrc

12 years agoMerge branch 'mxs-lradc' of /usr/local/src/arm/kernel-work/linux-git/kc-tx28 into...
Lothar Waßmann [Sat, 24 Mar 2012 07:30:35 +0000 (08:30 +0100)]
Merge branch 'mxs-lradc' of /usr/local/src/arm/kernel-work/linux-git/kc-tx28 into mxs-lradc

12 years agoadd triggers
Lothar Waßmann [Sat, 24 Mar 2012 07:29:56 +0000 (08:29 +0100)]
add triggers

12 years agouse constants instead of bare numbers
Lothar Waßmann [Sat, 24 Mar 2012 07:29:38 +0000 (08:29 +0100)]
use constants instead of bare numbers

12 years agoseveral cleanups
Lothar Waßmann [Sat, 24 Mar 2012 07:29:03 +0000 (08:29 +0100)]
several cleanups

12 years agostaging:iio:core add missing increment of loop index
Lothar Waßmann [Sat, 24 Mar 2012 06:13:49 +0000 (07:13 +0100)]
staging:iio:core add missing increment of loop index

12 years agoAdd LRADC touch and button interrupts
Lothar Waßmann [Sat, 24 Mar 2012 06:10:24 +0000 (07:10 +0100)]
Add LRADC touch and button interrupts

12 years agocomment out might_sleep() in try_to_freeze() to get rid of 'sleeping function called...
Lothar Waßmann [Fri, 23 Mar 2012 20:09:54 +0000 (21:09 +0100)]
comment out might_sleep() in try_to_freeze() to get rid of 'sleeping function called in invalid context' messages from do_notify_resume()

12 years agoAdd BUS_IIO
Lothar Waßmann [Fri, 23 Mar 2012 20:08:31 +0000 (21:08 +0100)]
Add BUS_IIO

12 years agoadd missing EXPORT_SYMBOL for iio_device_register_trigger_consumer(), iio_device_unre...
Lothar Waßmann [Fri, 23 Mar 2012 20:07:56 +0000 (21:07 +0100)]
add missing EXPORT_SYMBOL for iio_device_register_trigger_consumer(), iio_device_unregister_trigger_consumer()

12 years agoreturn -EOPNOTSUPP in iio_simple_dummy_configure_buffer() when CONFIG_IIO_SIMPLE_DUMM...
Lothar Waßmann [Fri, 23 Mar 2012 20:06:09 +0000 (21:06 +0100)]
return -EOPNOTSUPP in iio_simple_dummy_configure_buffer() when CONFIG_IIO_SIMPLE_DUMMY_BUFFER is not set

12 years agoadd mxs-lradc-ts driver
Lothar Waßmann [Fri, 23 Mar 2012 20:04:24 +0000 (21:04 +0100)]
add mxs-lradc-ts driver

12 years agoadd support for MXS_LRADC_TS and fix typo
Lothar Waßmann [Fri, 23 Mar 2012 19:54:43 +0000 (20:54 +0100)]
add support for MXS_LRADC_TS and fix typo

12 years agoremove unnecessary clearing of IRQ in mxs_gpio_toggle_irq_level()
Lothar Waßmann [Fri, 23 Mar 2012 19:53:53 +0000 (20:53 +0100)]
remove unnecessary clearing of IRQ in mxs_gpio_toggle_irq_level()

12 years agoregister mxs-lradc and mxs-lradc-ts devices
Lothar Waßmann [Fri, 23 Mar 2012 19:52:28 +0000 (20:52 +0100)]
register mxs-lradc and mxs-lradc-ts devices

12 years agoincrease number of board irqs
Lothar Waßmann [Fri, 23 Mar 2012 19:51:55 +0000 (20:51 +0100)]
increase number of board irqs

12 years agomerged git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next
Lothar Waßmann [Fri, 23 Mar 2012 15:14:29 +0000 (16:14 +0100)]
merged git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next

12 years agoapplied patches from linux-iio <1328853126-16578-2-git-send-email-marek.vasut@gmail...
Lothar Waßmann [Thu, 22 Mar 2012 13:46:55 +0000 (14:46 +0100)]
applied patches from linux-iio <1328853126-16578-2-git-send-email-marek.vasut@gmail.com>

12 years agoconvert printk(KERN_ERR...) to pr_err()
Lothar Waßmann [Thu, 22 Mar 2012 11:17:08 +0000 (12:17 +0100)]
convert printk(KERN_ERR...) to pr_err()

12 years agoremove debug messages
Lothar Waßmann [Thu, 22 Mar 2012 11:16:45 +0000 (12:16 +0100)]
remove debug messages

12 years agoupdate USB support:
Lothar Waßmann [Thu, 22 Mar 2012 11:07:37 +0000 (12:07 +0100)]
update USB support:
    - use clk_prepare_enable()
    - reject USBOTG port in host mode on STK5 v4

12 years agoremove MMC2
Lothar Waßmann [Thu, 22 Mar 2012 11:07:09 +0000 (12:07 +0100)]
remove MMC2

12 years agoupdate PAD settings
Lothar Waßmann [Thu, 22 Mar 2012 11:06:43 +0000 (12:06 +0100)]
update PAD settings

12 years agoupdate LCD support
Lothar Waßmann [Thu, 22 Mar 2012 11:06:15 +0000 (12:06 +0100)]
update LCD support

12 years agorevert some changes introduced by commit 6f02c926
Lothar Waßmann [Thu, 22 Mar 2012 10:45:08 +0000 (11:45 +0100)]
revert some changes introduced by commit 6f02c926

12 years agoconvert suspend code to using dev_pm_ops
Lothar Waßmann [Thu, 22 Mar 2012 09:32:50 +0000 (10:32 +0100)]
convert suspend code to using dev_pm_ops

12 years agopass the correct irq to free_irq()
Lothar Waßmann [Thu, 22 Mar 2012 09:32:02 +0000 (10:32 +0100)]
pass the correct irq to free_irq()

12 years agosilence checkpatch warnings about whitespace
Lothar Waßmann [Thu, 22 Mar 2012 09:31:04 +0000 (10:31 +0100)]
silence checkpatch warnings about whitespace

12 years agoenforce the semantics of clk_prepare()/ clk_unprepare() and clk_enable()/clk_disable()
Lothar Waßmann [Thu, 22 Mar 2012 08:05:04 +0000 (09:05 +0100)]
enforce the semantics of clk_prepare()/ clk_unprepare() and clk_enable()/clk_disable()

12 years agoFix polarity of cd_gpio
Lothar Waßmann [Wed, 14 Mar 2012 08:31:08 +0000 (09:31 +0100)]
Fix polarity of cd_gpio

12 years agouse clk_prepare_enable()/clk_disable_unprepare()
Lothar Waßmann [Wed, 14 Mar 2012 08:30:21 +0000 (09:30 +0100)]
use clk_prepare_enable()/clk_disable_unprepare()

12 years agoremove excessive printk's
Lothar Waßmann [Wed, 14 Mar 2012 08:28:11 +0000 (09:28 +0100)]
remove excessive printk's

12 years agouse clk_prepare_enable()/clk_disable_unprepare()
Lothar Waßmann [Wed, 14 Mar 2012 08:27:10 +0000 (09:27 +0100)]
use clk_prepare_enable()/clk_disable_unprepare()

12 years agoincorporate edt polytouch setup
Simon Budig [Fri, 27 Jan 2012 17:10:13 +0000 (18:10 +0100)]
incorporate edt polytouch setup

12 years agoTouchscreen driver for FT5x06 based EDT displays
Simon Budig [Thu, 29 Sep 2011 15:52:57 +0000 (17:52 +0200)]
Touchscreen driver for FT5x06 based EDT displays

This is a driver for the EDT "Polytouch" family of touch controllers
based on the FocalTech FT5x06 line of chips.

Signed-off-by: Simon Budig <simon.budig@kernelconcepts.de>
12 years agomake gpio-mxs.c less verbose
Lothar Waßmann [Sun, 11 Mar 2012 14:12:30 +0000 (15:12 +0100)]
make gpio-mxs.c less verbose

12 years agousb gadget: fix a section mismatch when compiling g_ffs with CONFIG_USB_FUNCTIONFS_ETH
Lothar Waßmann [Sun, 11 Mar 2012 14:03:09 +0000 (15:03 +0100)]
usb gadget: fix a section mismatch when compiling g_ffs with CONFIG_USB_FUNCTIONFS_ETH
commit 28824b18ac4705e876a282a15ea0de8fc957551f:
|Author: Michal Nazarewicz <m.nazarewicz@samsung.com>
|Date:   Wed May 5 12:53:13 2010 +0200
|
|    USB: gadget: __init and __exit tags removed
|
|    __init, __initdata and __exit tags have have been removed from
|    various files to make it possible for gadgets that do not use
|    the __init/__exit tags to use those.
obviously missed (at least) this case leading to a section mismatch in
g_ffs.c when compiling with CONFIG_USB_FUNCTIONFS_ETH enabled.

12 years agoRevert "usb gadget: fix a section mismatch when compiling g_ffs with CONFIG_USB_FUNCT...
Lothar Waßmann [Sun, 11 Mar 2012 14:01:07 +0000 (15:01 +0100)]
Revert "usb gadget: fix a section mismatch when compiling g_ffs with CONFIG_USB_FUNCTIONFS_ETH"

This reverts commit 4d56b19c422291661454ed9d4eba032cefe2f339.

12 years agousb gadget: fix a section mismatch when compiling g_ffs with CONFIG_USB_FUNCTIONFS_ETH
Lothar Waßmann [Sun, 11 Mar 2012 13:29:08 +0000 (14:29 +0100)]
usb gadget: fix a section mismatch when compiling g_ffs with CONFIG_USB_FUNCTIONFS_ETH

commit 28824b18ac4705e876a282a15ea0de8fc957551f:
|Author: Michal Nazarewicz <m.nazarewicz@samsung.com>
|Date:   Wed May 5 12:53:13 2010 +0200
|
|    USB: gadget: __init and __exit tags removed
|
|    __init, __initdata and __exit tags have have been removed from
|    various files to make it possible for gadgets that do not use
|    the __init/__exit tags to use those.
obviously missed (at least) this case leading to a section mismatch in
g_ffs.c when compiling with CONFIG_USB_FUNCTIONFS_ETH enabled.

12 years agoRevert "genirq: Fix race condition in ONESHOT irq handler"
Lothar Waßmann [Sun, 11 Mar 2012 11:35:16 +0000 (12:35 +0100)]
Revert "genirq: Fix race condition in ONESHOT irq handler"

This reverts commit 196392111db5c2243ebb069f9b140a29adef74db in favor
the mainline solution.

12 years agoGlyn displays added
Oliver Wendt [Fri, 9 Mar 2012 16:34:01 +0000 (17:34 +0100)]
Glyn displays added

12 years agogenirq: Fix race condition in ONESHOT irq handler
Lothar Waßmann [Tue, 7 Feb 2012 13:30:11 +0000 (14:30 +0100)]
genirq: Fix race condition in ONESHOT irq handler

12 years agoRevert "Fix race condition in ONESHOT IRQ handler"
Lothar Waßmann [Tue, 7 Feb 2012 13:26:57 +0000 (14:26 +0100)]
Revert "Fix race condition in ONESHOT IRQ handler"

This reverts commit 98927f231d32c5a9004be44dfc90707be05087c1.

12 years agoRemove debug messages
Lothar Waßmann [Wed, 1 Feb 2012 07:55:58 +0000 (08:55 +0100)]
Remove debug messages

12 years agoRemove debug messages
Lothar Waßmann [Wed, 1 Feb 2012 07:46:37 +0000 (08:46 +0100)]
Remove debug messages

12 years agoFix race condition in ONESHOT IRQ handler
Lothar Waßmann [Wed, 1 Feb 2012 07:23:06 +0000 (08:23 +0100)]
Fix race condition in ONESHOT IRQ handler

12 years agoapplied Ka-Ro specific patches
Lothar Waßmann [Wed, 1 Feb 2012 07:22:04 +0000 (08:22 +0100)]
applied Ka-Ro specific patches

12 years agoLinux 3.3 v3.3
Linus Torvalds [Sun, 18 Mar 2012 23:15:34 +0000 (16:15 -0700)]
Linux 3.3

12 years agoDon't limit non-nested epoll paths
Jason Baron [Fri, 16 Mar 2012 20:34:03 +0000 (16:34 -0400)]
Don't limit non-nested epoll paths

Commit 28d82dc1c4ed ("epoll: limit paths") that I did to limit the
number of possible wakeup paths in epoll is causing a few applications
to longer work (dovecot for one).

The original patch is really about limiting the amount of epoll nesting
(since epoll fds can be attached to other fds). Thus, we probably can
allow an unlimited number of paths of depth 1. My current patch limits
it at 1000. And enforce the limits on paths that have a greater depth.

This is captured in: https://bugzilla.redhat.com/show_bug.cgi?id=681578

Signed-off-by: Jason Baron <jbaron@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Sun, 18 Mar 2012 02:22:24 +0000 (19:22 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking changes from David Miller:
 "1) icmp6_dst_alloc() returns NULL instead of ERR_PTR() leading to
     crashes, particularly during shutdown.  Reported by Dave Jones and
     fixed by Eric Dumazet.

  2) hyperv and wimax/i2400m return NETDEV_TX_BUSY when they have
     already freed the SKB, which causes crashes as to the caller this
     means requeue the packet.  Fixes from Eric Dumazet.

  3) usbnet driver doesn't allocate the right amount of headroom on
     fresh RX SKBs, fix from Eric Dumazet.

  4) Fix regression in ip6_mc_find_dev_rcu(), as an RCU lookup it
     abolutely should not take a reference to 'dev', this leads to
     leaks.  Fix from RonQing Li.

  5) Fix netfilter ctnetlink race between delete and timeout expiration.
     From Pablo Neira Ayuso.

  6) Revert SFQ change which causes regressions, specifically queueing
     to tail can lead to unavoidable flow starvation.  From Eric
     Dumazet.

  7) Fix a memory leak and a crash on corrupt firmware files in bnx2x,
     from Michal Schmidt."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  netfilter: ctnetlink: fix race between delete and timeout expiration
  ipv6: Don't dev_hold(dev) in ip6_mc_find_dev_rcu.
  wimax/i2400m: fix erroneous NETDEV_TX_BUSY use
  net/hyperv: fix erroneous NETDEV_TX_BUSY use
  net/usbnet: reserve headroom on rx skbs
  bnx2x: fix memory leak in bnx2x_init_firmware()
  bnx2x: fix a crash on corrupt firmware file
  sch_sfq: revert dont put new flow at the end of flows
  ipv6: fix icmp6_dst_alloc()

12 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 17 Mar 2012 16:54:16 +0000 (09:54 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar.

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf tools, x86: Build perf on older user-space as well
  perf tools: Use scnprintf where applicable
  perf tools: Incorrect use of snprintf results in SEGV

12 years agonetfilter: ctnetlink: fix race between delete and timeout expiration
Pablo Neira Ayuso [Fri, 16 Mar 2012 02:00:34 +0000 (02:00 +0000)]
netfilter: ctnetlink: fix race between delete and timeout expiration

Kerin Millar reported hardlockups while running `conntrackd -c'
in a busy firewall. That system (with several processors) was
acting as backup in a primary-backup setup.

After several tries, I found a race condition between the deletion
operation of ctnetlink and timeout expiration. This patch fixes
this problem.

Tested-by: Kerin Millar <kerframil@gmail.com>
Reported-by: Kerin Millar <kerframil@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: Don't dev_hold(dev) in ip6_mc_find_dev_rcu.
RongQing.Li [Thu, 15 Mar 2012 22:54:14 +0000 (22:54 +0000)]
ipv6: Don't dev_hold(dev) in ip6_mc_find_dev_rcu.

ip6_mc_find_dev_rcu() is called with rcu_read_lock(), so don't
need to dev_hold().
With dev_hold(), not corresponding dev_put(), will lead to leak.

[ bug introduced in 96b52e61be1 (ipv6: mcast: RCU conversions) ]

Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'akpm' (more patches from Andrew)
Linus Torvalds [Sat, 17 Mar 2012 00:14:55 +0000 (17:14 -0700)]
Merge branch 'akpm' (more patches from Andrew)

Merge some more email patches from Andrew Morton:
 "A couple of nilfs fixes"

* emailed from Andrew Morton <akpm@linux-foundation.org>:
  nilfs2: fix NULL pointer dereference in nilfs_load_super_block()
  nilfs2: clamp ns_r_segments_percentage to [1, 99]

12 years agonilfs2: fix NULL pointer dereference in nilfs_load_super_block()
Ryusuke Konishi [Sat, 17 Mar 2012 00:08:39 +0000 (17:08 -0700)]
nilfs2: fix NULL pointer dereference in nilfs_load_super_block()

According to the report from Slicky Devil, nilfs caused kernel oops at
nilfs_load_super_block function during mount after he shrank the
partition without resizing the filesystem:

 BUG: unable to handle kernel NULL pointer dereference at 00000048
 IP: [<d0d7a08e>] nilfs_load_super_block+0x17e/0x280 [nilfs2]
 *pde = 00000000
 Oops: 0000 [#1] PREEMPT SMP
 ...
 Call Trace:
  [<d0d7a87b>] init_nilfs+0x4b/0x2e0 [nilfs2]
  [<d0d6f707>] nilfs_mount+0x447/0x5b0 [nilfs2]
  [<c0226636>] mount_fs+0x36/0x180
  [<c023d961>] vfs_kern_mount+0x51/0xa0
  [<c023ddae>] do_kern_mount+0x3e/0xe0
  [<c023f189>] do_mount+0x169/0x700
  [<c023fa9b>] sys_mount+0x6b/0xa0
  [<c04abd1f>] sysenter_do_call+0x12/0x28
 Code: 53 18 8b 43 20 89 4b 18 8b 4b 24 89 53 1c 89 43 24 89 4b 20 8b 43
 20 c7 43 2c 00 00 00 00 23 75 e8 8b 50 68 89 53 28 8b 54 b3 20 <8b> 72
 48 8b 7a 4c 8b 55 08 89 b3 84 00 00 00 89 bb 88 00 00 00
 EIP: [<d0d7a08e>] nilfs_load_super_block+0x17e/0x280 [nilfs2] SS:ESP 0068:ca9bbdcc
 CR2: 0000000000000048

This turned out due to a defect in an error path which runs if the
calculated location of the secondary super block was invalid.

This patch fixes it and eliminates the reported oops.

Reported-by: Slicky Devil <slicky.dvl@gmail.com>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Tested-by: Slicky Devil <slicky.dvl@gmail.com>
Cc: <stable@vger.kernel.org> [2.6.30+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agonilfs2: clamp ns_r_segments_percentage to [1, 99]
Haogang Chen [Sat, 17 Mar 2012 00:08:38 +0000 (17:08 -0700)]
nilfs2: clamp ns_r_segments_percentage to [1, 99]

ns_r_segments_percentage is read from the disk.  Bogus or malicious
value could cause integer overflow and malfunction due to meaningless
disk usage calculation.  This patch reports error when mounting such
bogus volumes.

Signed-off-by: Haogang Chen <haogangchen@gmail.com>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Sat, 17 Mar 2012 00:04:02 +0000 (17:04 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security

Pull maintainer update from James Morris:
 "Please pull this patch which adds Serge as maintainer of the
  capabilities code, as discussed on lwn and the lsm list.

  New capabilities must be signed off by the maintainer, and new uses of
  any capabilities should at be cc'd to the maintainer."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  MAINTAINERS: Add Serge as maintainer of capabilities

12 years agoMerge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming
Linus Torvalds [Sat, 17 Mar 2012 00:03:15 +0000 (17:03 -0700)]
Merge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming

Pull c6x bugfix from Mark Salter:
 "Remove dead code from entry.S which causes a build failure when using
  a newer assembler (v2.22 complains about it, v2.20 ignores it)."

* tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming:
  C6X: remove dead code from entry.S

12 years agoafs: Remote abort can cause BUG in rxrpc code
Anton Blanchard [Fri, 16 Mar 2012 10:28:19 +0000 (10:28 +0000)]
afs: Remote abort can cause BUG in rxrpc code

When writing files to afs I sometimes hit a BUG:

kernel BUG at fs/afs/rxrpc.c:179!

With a backtrace of:

afs_free_call
afs_make_call
afs_fs_store_data
afs_vnode_store_data
afs_write_back_from_locked_page
afs_writepages_region
afs_writepages

The cause is:

ASSERT(skb_queue_empty(&call->rx_queue));

Looking at a tcpdump of the session the abort happens because we
are exceeding our disk quota:

rx abort fs reply store-data error diskquota exceeded (32)

So the abort error is valid. We hit the BUG because we haven't
freed all the resources for the call.

By freeing any skbs in call->rx_queue before calling afs_free_call
we avoid hitting leaking memory and avoid hitting the BUG.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoafs: Read of file returns EBADMSG
Anton Blanchard [Fri, 16 Mar 2012 10:28:07 +0000 (10:28 +0000)]
afs: Read of file returns EBADMSG

A read of a large file on an afs mount failed:

# cat junk.file > /dev/null
cat: junk.file: Bad message

Looking at the trace, call->offset wrapped since it is only an
unsigned short. In afs_extract_data:

        _enter("{%u},{%zu},%d,,%zu", call->offset, len, last, count);
...

        if (call->offset < count) {
                if (last) {
                        _leave(" = -EBADMSG [%d < %zu]", call->offset, count);
                        return -EBADMSG;
                }

Which matches the trace:

[cat   ] ==> afs_extract_data({65132},{524},1,,65536)
[cat   ] <== afs_extract_data() = -EBADMSG [0 < 65536]

call->offset went from 65132 to 0. Fix this by making call->offset an
unsigned int.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agostaging/zmem: Use lockdep_assert_held instead of spin_is_locked staging-3.3
Andi Kleen [Fri, 16 Mar 2012 19:00:57 +0000 (12:00 -0700)]
staging/zmem: Use lockdep_assert_held instead of spin_is_locked

WARN_ON(!spin_is_locked()) will always trigger on UP.
Use lockdep_assert_held instead.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoC6X: remove dead code from entry.S
Mark Salter [Fri, 16 Mar 2012 13:27:57 +0000 (09:27 -0400)]
C6X: remove dead code from entry.S

The ENDPROC() on sys_fadvise64_c6x() in arch/c6x/kernel/entry.S is
outside of the conditional block with the matching ENTRY() macro. This
leads a newer (v2.22 vs. v2.20) assembler to complain:

  /tmp/ccGZBaPT.s: Assembler messages:
  /tmp/ccGZBaPT.s: Error: .size expression for sys_fadvise64_c6x does not evaluate to a constant

The conditional block became dead code when c6x switched to generic
unistd.h and should be removed along with the offending ENDPROC().

Signed-off-by: Mark Salter <msalter@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
12 years agowimax/i2400m: fix erroneous NETDEV_TX_BUSY use
Eric Dumazet [Wed, 14 Mar 2012 09:21:44 +0000 (09:21 +0000)]
wimax/i2400m: fix erroneous NETDEV_TX_BUSY use

A driver start_xmit() method cannot free skb and return NETDEV_TX_BUSY,
since caller is going to reuse freed skb.

In fact netif_tx_stop_queue() / netif_stop_queue() is needed before
returning NETDEV_TX_BUSY or you can trigger a ksoftirqd fatal loop.

In case of memory allocation error, only safe way is to drop the packet
and return NETDEV_TX_OK

Also increments tx_dropped counter

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/hyperv: fix erroneous NETDEV_TX_BUSY use
Eric Dumazet [Wed, 14 Mar 2012 08:53:34 +0000 (08:53 +0000)]
net/hyperv: fix erroneous NETDEV_TX_BUSY use

A driver start_xmit() method cannot free skb and return NETDEV_TX_BUSY,
since caller is going to reuse freed skb.

This is mostly a revert of commit bf769375c (staging: hv: fix the return
status of netvsc_start_xmit())

In fact netif_tx_stop_queue() / netif_stop_queue() is needed before
returning NETDEV_TX_BUSY or you can trigger a ksoftirqd fatal loop.

In case of memory allocation error, only safe way is to drop the packet
and return NETDEV_TX_OK

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/usbnet: reserve headroom on rx skbs
Eric Dumazet [Wed, 14 Mar 2012 06:56:25 +0000 (06:56 +0000)]
net/usbnet: reserve headroom on rx skbs

network drivers should reserve some headroom on incoming skbs so that we
dont need expensive reallocations, eg forwarding packets in tunnels.

This NET_SKB_PAD padding is done in various helpers, like
__netdev_alloc_skb_ip_align() in this patch, combining NET_SKB_PAD and
NET_IP_ALIGN magic.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Oliver Neukum <oneukum@suse.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: fix memory leak in bnx2x_init_firmware()
Michal Schmidt [Thu, 15 Mar 2012 14:08:29 +0000 (14:08 +0000)]
bnx2x: fix memory leak in bnx2x_init_firmware()

When cycling the interface down and up, bnx2x_init_firmware() knows that
the firmware is already loaded, but nevertheless it allocates certain
arrays anew (init_data, init_ops, init_ops_offsets, iro_arr). The old
arrays are leaked.

Fix the leaks by returning early if the firmware was already loaded.
Because if the firmware is loaded, so are the arrays.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>