Commit 1c8542c7bb replaced kmalloc() with memdup_user() in the write()
function but also dropped the kfree(temp). The memdup_user() function
allocates memory which is never freed.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Parag Warudkar <parag.warudkar@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: gpio_mouse - use standard driver registration method
Input: mark serio and i8042 as suspended when hibernating too
Input: add support for generic GPIO-based matrix keypad
Input: arrange keyboards alphabetically
Input: gpio-keys - avoid possibility of sleeping in timer function
Input: gpio-keys - revert 'change timer to workqueue'
Input: dm355evm_keys - fix kconfig symbol names
Input: wacom - add DTF720a support and fix rotation on Intuos3
Input: i8042 - more reset quirks for MSI Wind-clone netbooks
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc: Don't use alloc_bootmem() in init_IRQ() path
powerpc: Fix spin_event_timeout() to be robust over context switches
powerpc: Use pr_devel() in do_dcache_icache_coherency()
powerpc/cell: Use pr_devel() in axon_msi.c
powerpc: Use pr_devel() in arch/powerpc/mm/gup.c
powerpc: Cleanup & use pr_devel() in arch/powerpc/mm/slb.c
powerpc/perf_counter: Remove duplicated #include
powerpc: Use pr_devel() in arch/powerpc/mm/mmu_context_nohash.c
powerpc/pseries: Use pr_devel() in xics.c
powerpc: Remove unnecessary semicolons
powerpc/pseries: Use pr_devel() in pseries LPAR HPTE routines
powerpc/44x: Fix build error with -Werror for Warp platform
powerpc/4xx: Have Warp take advantage of GPIO LEDs default-state = keep
powerpc/44x: Update Warp defconfig
Fix various silly problems wrt mnt_namespace.h:
- exit_mnt_ns() isn't used, remove it
- done that, sched.h and nsproxy.h inclusions aren't needed
- mount.h inclusion was need for vfsmount_lock, but no longer
- remove mnt_namespace.h inclusion from files which don't use anything
from mnt_namespace.h
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This reverts commit 4148df9b0f.
Let's hope that the mm_lock initialization is now correct with all
drivers, following Krzysztof's patches.
Requested-by: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Remove redundant locking by the mm_lock mutex before a second head of
matrox framebuffer is registered.
This fixes a problem with uninitialized the fb_info->mm_lock mutex
introduced by the commit 537a1bf059 " fbdev: add mutex for fb_mmap
locking"
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Remove redundant call to the matroxfb_update_fix() before matrox
frambuffer is registered.
This fixes a problem with uninitialized the fb_info->mm_lock mutex
introduced by the commit 537a1bf059 " fbdev: add mutex for fb_mmap
locking"
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Remove redundant call to the w100fb_set_par() before w100 frambuffer is
registered.
This fixes a problem with uninitialized the fb_info->mm_lock mutex
introduced by the commit 537a1bf059 " fbdev: add mutex for fb_mmap
locking"
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Remove redundant locking of the fb_info->mm_lock mutex before the
frambuffer is registered.
This fixes a problem with uninitialized the fb_info->mm_lock mutex
introduced by the commit 537a1bf059 " fbdev: add mutex for fb_mmap
locking"
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Remove redundant call to the encode_fix() before i810 frambuffer is
registered.
This fixes a problem with uninitialized the fb_info->mm_lock mutex
introduced by the commit 537a1bf059 " fbdev: add mutex for fb_mmap
locking"
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Commit a65e7bfcd7 broke the UML build with
the following error -
In file included from fs/proc/kcore.c:17:
include/linux/elfcore.h: In function 'elf_core_copy_task_regs':
include/linux/elfcore.h:129: error: implicit declaration of function 'task_pt_regs'
Fix this by restoring the previous behavior of returning 0 for all arches
like UML that don't define task_pt_regs.
Signed-off-by: Parag Warudkar <parag.lkml@gmail.com>
Acked-by: Amerigo Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
There is a regression, introduced in aa202455ee
(in alsa-kernel) which I noticed when trying to use the headphone socket on
my EeeCPC 901: the output was *very* quiet, practically silent.
This patch corrects the control types to that which was obviously intended in
the referenced commit.
Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the last device in the dpm list is unregistered directly after its
prepare() callback returned with -EAGAIN, the return code is passed to
the calling function, resulting in a suspend failure. Prevent this by
clearing the return code after -EAGAIN.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Patch 08687aec71bc9134fe336e561f6did877bacf74fc0a (x86: unify
power/cpu_(32|64).c) renamed cpu_32.c to cpu.c, but did not update
the special compilation flags for the file for the new name.
This patch fixes the compilation flags, and therefore fixes resume
from suspend on my Acer Aspire One.
[rjw: The regression from 2.6.30 fixed by this patch is tracked as
http://bugzilla.kernel.org/show_bug.cgi?id=13661]
Signed-off-by: Peter Chubb <peterc@nicta.com.au>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
The recent "UBI: fix NOR flash recovery" introduced compilation
warnings which were immediately spotted by our linux-next keeper.
This patch fixes them.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
HDA driver disabled HD audio 64bit address support for all AMD
SB600/SB700/SB800 platforms with commit
09240cf429 due to one SB600 issue
reported by community, but we do not see the similar issue on
SB700/SB800 platforms.
This patch is to refine the workaround for SB600 only.
Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch is needed when the gpio's became available only at late
stages, for example, when using i2c gpio expander.
Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Serio ports are not being restarted any longer because resume operations
after hibernate do nothing, since the device has not been marked as
suspended. This happens because suspend is only considering the SUSPEND
event but not the FREEZE event.
Note that this driver has still to migrate to dev_pm_ops, but this fixes
this particular bug now.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Check the widget type and don't take invalid widgets while parsing
the capture source in patch_via.c.
Also, fixed some compile warnings introduced in the previous commit.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Current implementation of spin_event_timeout can be interrupted by an
IRQ or context switch after testing the condition, but before checking
the timeout. This can cause the loop to report a timeout when the
condition actually became true in the middle.
This patch adds one final check of the condition upon exit of the loop
if the last test of the condition was still false.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
pr_debug() can now result in code being generated even when DEBUG
is not defined. That's not really desirable in some places.
With CONFIG_DYNAMIC_DEBUG=y:
size before:
text data bss dec hex filename
2036 368 8 2412 96c arch/powerpc/mm/pgtable.o
size after:
text data bss dec hex filename
1677 248 8 1933 78d arch/powerpc/mm/pgtable.o
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
pr_debug() can now result in code being generated even when DEBUG
is not defined. That's not really desirable in some places.
With CONFIG_DYNAMIC_DEBUG=y:
size before:
text data bss dec hex filename
7083 1616 0 8699 21fb arch/powerpc/../axon_msi.o
size after:
text data bss dec hex filename
5772 1208 0 6980 1b44 arch/powerpc/../axon_msi.o
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
pr_debug() can now result in code being generated even when DEBUG
is not defined. That's not really desirable in some places.
With CONFIG_DYNAMIC_DEBUG=y:
size before:
text data bss dec hex filename
3252 384 0 3636 e34 arch/powerpc/mm/gup.o
size after:
text data bss dec hex filename
2576 96 0 2672 a70 arch/powerpc/mm/gup.o
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
pr_debug() can now result in code being generated even when DEBUG
is not defined. That's not really desirable in some places.
With CONFIG_DYNAMIC_DEBUG=y:
size before:
text data bss dec hex filename
3261 416 4 3681 e61 arch/powerpc/mm/slb.o
size after:
text data bss dec hex filename
2861 248 4 3113 c29 arch/powerpc/mm/slb.o
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
pr_debug() can now result in code being generated even when DEBUG
is not defined. That's not really desirable in some places.
With CONFIG_DYNAMIC_DEBUG=y:
size before:
text data bss dec hex filename
1508 48 28 1584 630 powerpc/mm/mmu_context_nohash.o
size after:
text data bss dec hex filename
1088 0 28 1116 45c powerpc/mm/mmu_context_nohash.o
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
pr_debug() can now result in code being generated even when DEBUG
is not defined. That's not really desirable in some places.
With CONFIG_DYNAMIC_DEBUG=y:
size before:
text data bss dec hex filename
7720 5488 296 13504 34c0 platforms/pseries/xics.o
size after:
text data bss dec hex filename
7535 5456 296 13287 33e7 platforms/pseries/xics.o
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
pr_debug() can now result in code being generated even when DEBUG
is not defined. That's not really desirable in some places.
In particular, pSeries_lpar_hpte_insert() goes from 185 instructions
to 77 instructions as a result of this patch. Luckily that code
isn't called very often ...
With CONFIG_DYNAMIC_DEBUG=y:
size before:
text data bss dec hex filename
7284 1552 296 9132 23ac platforms/pseries/lpar.o
size after:
text data bss dec hex filename
5806 1096 296 7198 1c1e platforms/pseries/lpar.o
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Make this consistent with the unlock statement. Also fix a
minor typo in debugfs formatting
Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
This is quite useful for verifying that objects are actually mapped when
they need to be.
Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
This wasn't even used as far as I could tell and will only confuse
people (like me).
Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Usually crt mainly get modes via GPIOA ports.
However on G4X platform we need to probe possible
ports for DVI-I, which could be wired to GPIOD,
then fetch our desired EDID, i.e on DG45ID platform
we successfully fetch EDID by GPIOD port.
It fixed freedesktop.org bug #21084
Signed-off-by: Ma Ling <ling.ma@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
If rix is not found in mi->r[], i will become -1 after the loop. This value
is eventually used to access arrays, so we were accessing arrays with a
negative index, which is obviously not what we want to do. This patch fixes
this potential problem.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The code in cfg80211's cfg80211_bss_update erroneously
grabs a reference to the BSS, which means that it will
never be freed.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: stable@kernel.org [2.6.29, 2.6.30]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Fix the third (I think) polarity error I accidentally
introduced in the rfkill rewrite to make wireless work
again on (certain?) HP laptops.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Maciej Rutecki <maciej.rutecki@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
We're missing a Kconfig help for the iwmc3200wifi driver.
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
When we reclaim the tx desc, we always assume that the
last desc is a holding desc, which is not true, and skip it.
If the tx queue is drained during channel change, internal
reset and etc, the last descriptor may not be the holding
descriptor and we fail to reclaim them. This results in the
following two issues.
1. Tx stuck - We drop all the frames coming from upper layer
due to shortage in tx desc.
2. Crash - If we fail to reclaim a tx descriptor, we miss to
update the tx BA window with the seq number of the frame
associated to that desc, which, at some point, result in
the following crash due to an assert failure in ath_tx_addto_baw().
This patch fixes these two issues.
kernel BUG at ../drivers/net/wireless/ath/ath9k/xmit.c:180!
[155064.304164] invalid opcode: 0000 [#1] SMP
Call Trace:
[<fbc6d83b>] ? ath9k_tx+0xeb/0x160 [ath9k]
[<fbbc9591>] ipv6? __ieee80211_tx+0x41/0x120 [mac80211]
[<fbbcb5ae>] ? aes_i586ieee80211_master_start_xmit+0x28e/0x560 [mac80211]
[<c037e501>] aes_generic? _spin_lock_irqsave+0x31/0x40
[<c02f347b>] ? dev_hard_start_xmit+0x16b/0x1c0
[<c03058b5>] ? __qdisc_run+0x1b5/0x200
[<fbbcda5a>] ? af_packetieee80211_select_queue+0xa/0x100 [mac80211]
[<c02f53b7>] ? i915dev_queue_xmit+0x2e7/0x3f0
[<fbbc9b49>] ? ieee80211_subif_start_xmit+0x369/0x7a0 [mac80211]
[<c031bc35>] ? ip_output+0x55/0xb0
[<c02e0188>] ? show_memcpy_count+0x18/0x60
[<c02eb186>] ? __kfree_skb+0x36/0x90
[<c02f2202>] ? binfmt_miscdev_queue_xmit_nit+0xd2/0x110
[<c02f347b>] ? dev_hard_start_xmit+0x16b/0x1c0
[<c03058b5>] ? __qdisc_run+0x1b5/0x200
[<c033bca7>] ? scoarp_create+0x57/0x2a0
[<c02f53b7>] ? bridgedev_queue_xmit+0x2e7/0x3f0
[<c03034a0>] ? eth_header+0x0/0xc0
[<c033b95f>] stp? arp_xmit+0x5f/0x70
[<c033bf4f>] ? arp_send+0x5f/0x70
[<c033c8f5>] bnep? arp_solicit+0x105/0x210
[<c02fa5aa>] ? neigh_timer_handler+0x19a/0x390
[<c013bf88>] ? run_timer_softirq+0x138/0x210
[<c02fa410>] ? ppdevneigh_timer_handler+0x0/0x390
[<c02fa410>] ? neigh_timer_handler+0x0/0x390
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Fix condition in which radio LED did not initialize correctly, and remove
4 compilation warnings.
After the recent changes in rfkill, the radio LED used by b43/b43legacy
did not always initialize correctly.
Both b43 and b43legacy used the deprecated variable radio_enabled in
struct ieee80211_conf.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Don't forget to unlock cfg80211_mutex in one fail path of
nl80211_set_wiphy.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The fixed widget NIDs in patch_via.c seem wrong for some codecs,
and it resulted in the invalid capture source selection.
This patch adds the code to parse the topology instead of using
fixed numbers in order to get the right MUX widget id corresponding
to the ADCs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The following test script triggers a deadlock on ext2 filesystem:
while true; do quotaon /dev/hda >&/dev/null; usleep $RANDOM; done &
while true; do quotaoff /dev/hda >&/dev/null; usleep $RANDOM; done &
I found there is a potential deadlock between quotaon and quotaoff (or
quotasync). Basically, all of quotactl operations need to be protected by
dqonoff_mutex. vfs_quota_off and vfs_quota_sync also call sb->s_op->quota_write
that needs to grab the i_mutex of the quota file. But in vfs_quota_on_inode
(called from quotaon operation), the current code tries to grab the i_mutex of
the quota file first before getting quonoff_mutex.
Reverse the order in which we take locks in vfs_quota_on_inode().
Jan Kara: Changed changelog to be more readable, made lockdep happy with
I_MUTEX_QUOTA.
Signed-off-by: Jiaying Zhang <jiayingz@google.com>
Signed-off-by: Jan Kara <jack@suse.cz>
32-bit s390 has efficient support for 64/32-bit conversions, define
KTIME_SCALAR to enable the use of the plain scalar nanosecond based
representation of ktime.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Performance counters need 64 bit atomic operations.
To keep the patch small we use the simple generic atomic64_t implementation.
The native implementation follows with the next kernel.
Fixes this build bug:
In file included from kernel/sched.c:42:
include/linux/perf_counter.h:427: error: expected specifier-qualifier-list before 'atomic64_t'
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>