aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-10-17staging:iio:hmc5843: Check initialization and chip identifierPeter Meerwald1-6/+27
Signed-off-by: Peter Meerwald <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2013-10-17staging:iio:hmc5843: Introduce _set_range_gain()Peter Meerwald1-12/+17
Signed-off-by: Peter Meerwald <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2013-10-17staging:iio:hmc5843: Rename _set_rate() to _set_samp_freq()Peter Meerwald1-16/+15
move locking inside _set() function Signed-off-by: Peter Meerwald <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2013-10-17staging:iio:hmc5843: Reorganize _set_meas_conf()Peter Meerwald1-25/+20
move locking inside _set() function Signed-off-by: Peter Meerwald <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2013-10-17staging:iio:hmc5843: Rename _configure() to _set_mode()Peter Meerwald1-11/+16
and be consistent with other setter functions in that first argument is hmc5843_data Signed-off-by: Peter Meerwald <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2013-10-17staging:iio:hmc5843: Remove ability to change operating modePeter Meerwald1-68/+0
only continuous mode is supported for now; the driver could/should be switched to single conversion mode operating mode should be determined by the way IIO accesses the device and not exposed explicitly Signed-off-by: Peter Meerwald <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2013-10-17staging:iio:hmc5843: Add trigger handlingPeter Meerwald1-8/+61
v3: * use __be16 instead of s16 v2 (thanks to Jonathan Cameron): * drop dynamic buffer allocation, buffer is in hmc5842_data * grab timestamp near data acquisition * restrict available scan masks (only read all axis) Signed-off-by: Peter Meerwald <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2013-10-17staging:iio:hmc5843: Always read all channels values otherwise no updatesPeter Meerwald1-21/+32
v2: * use __be16 instead of s16 Split out data ready/wait for read measurement fix bug in case reading status register fails Signed-off-by: Peter Meerwald <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2013-10-17staging:iio:hmc5843: Rename _check_samp_freq to get_samp_freq_indexPeter Meerwald1-31/+16
and drop/inline helper functions _check_int_plus_micros() and _show_int_plus_micros() Signed-off-by: Peter Meerwald <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2013-10-17staging:iio:hmc5843: Use SCALE instead of magn_rangePeter Meerwald1-101/+59
v3: * rename _check_scale() to _get_scale_index() v2: * use SCALE instead of CALIBSCALE to control the range/gain of measurements Signed-off-by: Peter Meerwald <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2013-10-17DT: Add documentation for cm36651 proximity/light sensorBeomho Seo2-0/+27
This patch adds device tree binding documentation for CM36651 proximity/light sensor. Signed-off-by: Beomho Seo <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2013-10-17iio: cm36651: Add CM36651 proximity/light sensorBeomho Seo3-0/+720
This patch adds a new driver for Capella CM36651 proximity and RGB sensor. Signed-off-by: Beomho Seo <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2013-10-17staging:iio:spear_adc: Fix IRQ checkLars-Peter Clausen1-1/+1
The test in the spear_adc driver which checks whether the IRQ number returned by platform_get_irq() has multiple problems. It accepts 0 even though this is an invalid IRQ. It also rejects IRQ numbers that are larger or equal than NR_IRQS. First of all drivers should never need to reference NR_IRQS and secondly with CONFIG_SPARSE_IRQ NR_IRQS is not the upper limit, so the check might reject valid IRQ numbers. This patch modifies the check to only test against less or equal to 0. Signed-off-by: Lars-Peter Clausen <[email protected]> Reported-by: kbuild test robot <[email protected]> Cc: Stefan Roese <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2013-10-17staging:iio:lpc32xx_adc: Fix IRQ checkLars-Peter Clausen1-1/+1
The test in the lpc32xx_adc driver which checks whether the IRQ number returned by platform_get_irq() has multiple problems. It accepts 0 even though this is an invalid IRQ. It also rejects IRQ numbers that are larger or equal than NR_IRQS. First of all drivers should never need to reference NR_IRQS and secondly with CONFIG_SPARSE_IRQ NR_IRQS is not the upper limit, so the check might reject valid IRQ numbers. This patch modifies the check to only test against less or equal to 0. Signed-off-by: Lars-Peter Clausen <[email protected]> Reported-by: kbuild test robot <[email protected]> Cc: Roland Stigge <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2013-10-17staging: vt6656: removed line over 80 chars warningNandini Hanumanthagowda1-2/+4
Removed the checkpatch warning of line over 80 chars by breaking the long line into sensible chunks of 2 lines to comply with coding style Signed-off-by: Nandini Hanumanthagowda <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-17staging: vt6656: removed C99-style commentsNandini Hanumanthagowda1-2/+2
Linux style for comment is C89 style "/* */" and it doesn't prefer C99-style comment "//...". Hence replaced C99-style comments used in code by C89 style comment to comply with linux coding style Signed-off-by: Nandini Hanumanthagowda <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-17staging: vt6656: removed unnecessary parentheses in return statementNandini Hanumanthagowda1-2/+2
There was parentheses around return statement's value which was not required since return statement is not a function. Hence removed the parentheses to eliminate the checkpatch error which states: ERROR: return is not a function, parentheses are not required Signed-off-by: Nandini Hanumanthagowda <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-17staging: vt6656: removal of braces under if-control statementNandini Hanumanthagowda1-3/+2
Removed braces under if-else control flow statement whenever there is only one statement under if-else control statement to comply with linux coding style Signed-off-by: Nandini Hanumanthagowda <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-17staging: vt6656: indentation and removal of unnecessary spacesNandini Hanumanthagowda1-47/+44
Removed unnecessary white spaces at beginning of line and added proper indentation to fix checkpatch warnings/errors to improve the readability of code Signed-off-by: Nandini Hanumanthagowda <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-17staging: vt6655:removed incorrect casting in hostap.cArchana kumari1-1/+1
This patch fixes the following type of sparse warnings: drivers/staging/vt6655/hostap.c:733:42: warning: cast from restricted gfp_t drivers/staging/vt6655/hostap.c:733:42: warning: incorrect type in argument 2 (different base types) drivers/staging/vt6655/hostap.c:733:42: expected restricted gfp_t [usertype] flags drivers/staging/vt6655/hostap.c:733:42: got int [signed] <noident> Signed-off-by: Archana kumari <[email protected]> Reviewed-by: Josh Triplett <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-17Merge tag 'driver-core-3.12-rc6' of ↵Linus Torvalds1-2/+5
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fix from Greg KH: "Here is one fix for the hotplug memory path that resolves a regression when removing memory that showed up in 3.12-rc1" * tag 'driver-core-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: driver core: Release device_hotplug_lock when store_mem_state returns EINVAL
2013-10-17Merge tag 'usb-3.12-rc6' of ↵Linus Torvalds18-82/+343
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some USB fixes and new device ids for 3.12-rc6 The largest change here is a bunch of new device ids for the option USB serial driver for new Huawei devices. Other than that, just some small bug fixes for issues that people have reported (run-time and build-time), nothing major" * tag 'usb-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: usb_phy_gen: refine conditional declaration of usb_nop_xceiv_register usb: misc: usb3503: Fix compile error due to incorrect regmap depedency usb/chipidea: fix oops on memory allocation failure usb-storage: add quirk for mandatory READ_CAPACITY_16 usb: serial: option: blacklist Olivetti Olicard200 USB: quirks: add touchscreen that is dazzeled by remote wakeup Revert "usb: musb: gadget: fix otg active status flag" USB: quirks.c: add one device that cannot deal with suspension USB: serial: option: add support for Inovia SEW858 device USB: serial: ti_usb_3410_5052: add Abbott strip port ID to combined table as well. USB: support new huawei devices in option.c usb: musb: start musb on the udc side, too xhci: Fix spurious wakeups after S5 on Haswell xhci: fix write to USB3_PSSEN and XUSB2PRM pci config registers xhci: quirk for extra long delay for S4 xhci: Don't enable/disable RWE on bus suspend/resume.
2013-10-17Merge tag 'tty-3.12-rc6' of ↵Linus Torvalds2-5/+3
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull serial driver fixes from Greg KH: "Here are two serial driver fixes for your tree. One is a revert of a patch that causes a build error, the other is a fix to provide the correct brace placement which resolves a bug where the driver was not working properly" * tag 'tty-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: vt8500: add missing braces Revert "serial: i.MX: evaluate linux,stdout-path property"
2013-10-17Merge tag 'char-misc-3.12-rc6' of ↵Linus Torvalds3-2/+13
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small iio and w1 driver fixes for 3.12-rc6. There is also a hyper-v fix in here, which turned out to be incorrect, so it was reverted. That will probably have to wait unto 3.13-rc1 to get accepted as it's still being discussed" * tag 'char-misc-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: Revert "Drivers: hv: vmbus: Fix a bug in channel rescind code" Drivers: hv: vmbus: Fix a bug in channel rescind code iio:buffer: Free active scan mask in iio_disable_all_buffers() iio: frequency: adf4350: add missing clk_disable_unprepare() on error in adf4350_probe() w1 - call request_module with w1 master mutex unlocked w1 - fix fops in w1_bus_notify
2013-10-17Merge tag 'sound-3.12' of ↵Linus Torvalds3-2/+5
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "All reasonably small fixes as rc6: a HD-audio mic fix, a us122l mmap regression fix, and kernel memory leak fix in hdsp driver. Hopefully this will be the last pull request for 3.12..." * tag 'sound-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hdsp - info leak in snd_hdsp_hwdep_ioctl() ALSA: us122l: Fix pcm_usb_stream mmapping regression ALSA: hda - Fix inverted internal mic not indicated on some machines
2013-10-17Merge branch 'for-linus' of ↵Linus Torvalds2-3/+2
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull apparmor fixes from James Morris: "A couple more regressions fixed" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: apparmor: fix bad lock balance when introspecting policy apparmor: fix memleak of the profile hash
2013-10-17Merge tag 'iio-fixes-for-3.12c' of ↵Greg Kroah-Hartman318-1752/+2828
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus Jonathan writes: Third set of IIO fixes for the 3.12 cycle. Two little ones this time: 1) A missing clk_unprepare in adf4350. 2) A missing free of the active_scan_mask when iio_disable_all_buffers is called during an unexpected device removal. This leak was introduced by the fix a87c82e454f184a9473f8cdfd4d304205f585f65 iio: Stop sampling when the device is removed and hence is a regression fix.
2013-10-17usb: usb_phy_gen: refine conditional declaration of usb_nop_xceiv_registerGuenter Roeck1-1/+1
Commit 3fa4d734 (usb: phy: rename nop_usb_xceiv => usb_phy_gen_xceiv) changed the conditional around the declaration of usb_nop_xceiv_register from #if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE)) to #if IS_ENABLED(CONFIG_NOP_USB_XCEIV) While that looks the same, it is semantically different. The first expression is true if CONFIG_NOP_USB_XCEIV is built as module and if the including code is built as module. The second expression is true if code depending on CONFIG_NOP_USB_XCEIV if built as module or into the kernel. As a result, the arm:allmodconfig build fails with arch/arm/mach-omap2/built-in.o: In function `omap3_evm_init': arch/arm/mach-omap2/board-omap3evm.c:703: undefined reference to `usb_nop_xceiv_register' Fix the problem by reverting to the old conditional. Cc: Josh Boyer <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-17Revert "Drivers: hv: vmbus: Fix a bug in channel rescind code"Greg Kroah-Hartman1-2/+6
This reverts commit 90d33f3ec519db19d785216299a4ee85ef58ec97 as it's not the correct fix for this issue, and it causes a build warning to be added to the kernel tree. Cc: K. Y. Srinivasan <[email protected]> Cc: <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-17Staging: sb105x: Removing trailing whitespacesAshvini Varatharaj1-2/+2
Fix checkpatch error : ERROR: trailing whitespace Signed-off-by: Ashvini Varatharaj <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-17Staging: wlan-ng: changing "* dev" to "*dev"Ashvini Varatharaj1-1/+1
Fix checkpatch error: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Ashvini Varatharaj <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-17staging: dgnc: braces {} are not necessary for single statement in dgnc_cls.cArchana kumari1-14/+7
Fix checkpatch.pl issues with braces {} are not necessary for single statement blocks in dgnc_cls.c Signed-off-by: Archana kumari <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-17staging: vt6655: Fix Sparse Warning for Static DeclarationsArchana kumari1-10/+10
This patch fixes the Sparse Warning "symbol was not declared. Should it be static?" in aes_ccmp.c Signed-off-by: Archana kumari <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-17Staging: lustre: Removal of Space between function name and parenthesis in ↵Rashika Kheria1-17/+17
timer.c The patch fixes the following checkpatch.pl warning in timer.c- WARNING: space prohibited between function name and open parenthesis '( Signed-off-by: Rashika Kheria <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-17Staging: lustre: Removal of assignment in if condition in conrpc.cRashika Kheria1-1/+3
This patch fixes the following checkpatch.pl error in conrpc.c- ERROR: do not use assignment in if condition Signed-off-by: Rashika Kheria <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-17Staging: lustre: Fix quoted string split across lines in conrpc.cRashika Kheria1-10/+6
This patch fixes the following checkpatch.pl warning in conrpc.c- WARNING: quoted string split across lines conrpc.c Signed-off-by: Rashika Kheria <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-17Staging: lustre: Fix Space Prohibition before '++' in conrpc.cRashika Kheria1-3/+3
This patch fixes the following checkpatch.pl error in conrpc.c- ERROR: space prohibited before that '++' Signed-off-by: Rashika Kheria <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-17Staging: lustre: Fix Space Requirement around ':' in conrpc.cRashika Kheria1-3/+3
The patch fixes the following checkpatch.pl error in conrpc.c- ERROR: spaces required around that ':' Signed-off-by: Rashika Kheria <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-17Staging: lustre: Removal of Space between function name and parenthesis in ↵Rashika Kheria1-29/+29
conrpc.c The patch fixes the following checkpatch.pl warning in conrpc.c- WARNING: space prohibited between function name and open parenthesis '(' Signed-off-by: Rashika Kheria <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-17ACPI / PM: Drop two functions that are not used any moreRafael J. Wysocki3-64/+0
Two functions defined in device_pm.c, acpi_dev_pm_add_dependent() and acpi_dev_pm_remove_dependent(), have no callers and may be dropped, so drop them. Moreover, they are the only functions adding entries to and removing entries from the power_dependent list in struct acpi_device, so drop that list too. Signed-off-by: Rafael J. Wysocki <[email protected]>
2013-10-17ATA / ACPI: remove power dependent device handlingAaron Lu3-21/+0
Previously, we wanted SCSI devices corrsponding to ATA devices to be runtime resumed when the power resource for those ATA device was turned on by some other device, so we added the SCSI device to the dependent device list of the ATA device's ACPI node. However, this code has no effect after commit 41863fc (ACPI / power: Drop automaitc resume of power resource dependent devices) and the mechanism it was supposed to implement is regarded as a bad idea now, so drop it. [rjw: Changelog] Signed-off-by: Aaron Lu <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2013-10-16Merge branch 'akpm' (fixes from Andrew Morton)Linus Torvalds24-189/+219
Merge misc fixes from Andrew Morton. * emailed patches from Andrew Morton <[email protected]>: (21 commits) mm: revert mremap pud_free anti-fix mm: fix BUG in __split_huge_page_pmd swap: fix set_blocksize race during swapon/swapoff procfs: call default get_unmapped_area on MMU-present architectures procfs: fix unintended truncation of returned mapped address writeback: fix negative bdi max pause percpu_refcount: export symbols fs: buffer: move allocation failure loop into the allocator mm: memcg: handle non-error OOM situations more gracefully tools/testing/selftests: fix uninitialized variable block/partitions/efi.c: treat size mismatch as a warning, not an error mm: hugetlb: initialize PG_reserved for tail pages of gigantic compound pages mm/zswap: bugfix: memory leak when re-swapon mm: /proc/pid/pagemap: inspect _PAGE_SOFT_DIRTY only on present pages mm: migration: do not lose soft dirty bit if page is in migration state gcov: MAINTAINERS: Add an entry for gcov mm/hugetlb.c: correct missing private flag clearing mm/vmscan.c: don't forget to free shrinker->nr_deferred ipc/sem.c: synchronize semop and semctl with IPC_RMID ipc: update locking scheme comments ...
2013-10-16mm: revert mremap pud_free anti-fixHugh Dickins1-4/+1
Revert commit 1ecfd533f4c5 ("mm/mremap.c: call pud_free() after fail calling pmd_alloc()"). The original code was correct: pud_alloc(), pmd_alloc(), pte_alloc_map() ensure that the pud, pmd, pt is already allocated, and seldom do they need to allocate; on failure, upper levels are freed if appropriate by the subsequent do_munmap(). Whereas commit 1ecfd533f4c5 did an unconditional pud_free() of a most-likely still-in-use pud: saved only by the near-impossiblity of pmd_alloc() failing. Signed-off-by: Hugh Dickins <[email protected]> Cc: Chen Gang <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-10-16mm: fix BUG in __split_huge_page_pmdHugh Dickins1-1/+9
Occasionally we hit the BUG_ON(pmd_trans_huge(*pmd)) at the end of __split_huge_page_pmd(): seen when doing madvise(,,MADV_DONTNEED). It's invalid: we don't always have down_write of mmap_sem there: a racing do_huge_pmd_wp_page() might have copied-on-write to another huge page before our split_huge_page() got the anon_vma lock. Forget the BUG_ON, just go back and try again if this happens. Signed-off-by: Hugh Dickins <[email protected]> Acked-by: Kirill A. Shutemov <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Naoya Horiguchi <[email protected]> Cc: David Rientjes <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-10-16swap: fix set_blocksize race during swapon/swapoffKrzysztof Kozlowski1-1/+3
Fix race between swapoff and swapon. Swapoff used old_block_size from swap_info outside of swapon_mutex so it could be overwritten by concurrent swapon. The race has visible effect only if more than one swap block device exists with different block sizes (e.g. /dev/sda1 with block size 4096 and /dev/sdb1 with 512). In such case it leads to setting the blocksize of swapped off device with wrong blocksize. The bug can be triggered with multiple concurrent swapoff and swapon: 0. Swap for some device is on. 1. swapoff: First the swapoff is called on this device and "struct swap_info_struct *p" is assigned. This is done under swap_lock however this lock is released for the call try_to_unuse(). 2. swapon: After the assignment above (and before acquiring swapon_mutex & swap_lock by swapoff) the swapon is called on the same device. The p->old_block_size is assigned to the value of block_size the device. This block size should be the same as previous but sometimes it is not. The swapon ends successfully. 3. swapoff: Swapoff resumes, grabs the locks and mutex and continues to disable this swap device. Now it sets the block size to value taken from swap_info which was overwritten by swapon in 2. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reported-by: Weijie Yang <[email protected]> Cc: Bob Liu <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: Shaohua Li <[email protected]> Cc: Minchan Kim <[email protected]> Acked-by: Hugh Dickins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-10-16procfs: call default get_unmapped_area on MMU-present architecturesHATAYAMA Daisuke1-2/+6
Commit c4fe24485729 ("sparc: fix PCI device proc file mmap(2)") added proc_reg_get_unmapped_area in proc_reg_file_ops and proc_reg_file_ops_no_compat, by which now mmap always returns EIO if get_unmapped_area method is not defined for the target procfs file, which causes regression of mmap on /proc/vmcore. To address this issue, like get_unmapped_area(), call default current->mm->get_unmapped_area on MMU-present architectures if pde->proc_fops->get_unmapped_area, i.e. the one in actual file operation in the procfs file, is not defined. Reported-by: Michael Holzheu <[email protected]> Signed-off-by: HATAYAMA Daisuke <[email protected]> Cc: Alexey Dobriyan <[email protected]> Cc: David S. Miller <[email protected]> Tested-by: Michael Holzheu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-10-16procfs: fix unintended truncation of returned mapped addressHATAYAMA Daisuke1-1/+1
Currently, proc_reg_get_unmapped_area truncates upper 32-bit of the mapped virtual address returned from get_unmapped_area method in pde->proc_fops due to the variable rv of signed integer on x86_64. This is too small to have vitual address of unsigned long on x86_64 since on x86_64, signed integer is of 4 bytes while unsigned long is of 8 bytes. To fix this issue, use unsigned long instead. Fixes a regression added in commit c4fe24485729 ("sparc: fix PCI device proc file mmap(2)"). Signed-off-by: HATAYAMA Daisuke <[email protected]> Cc: Alexey Dobriyan <[email protected]> Cc: David S. Miller <[email protected]> Tested-by: Michael Holzheu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-10-16writeback: fix negative bdi max pauseFengguang Wu1-5/+5
Toralf runs trinity on UML/i386. After some time it hangs and the last message line is BUG: soft lockup - CPU#0 stuck for 22s! [trinity-child0:1521] It's found that pages_dirtied becomes very large. More than 1000000000 pages in this case: period = HZ * pages_dirtied / task_ratelimit; BUG_ON(pages_dirtied > 2000000000); BUG_ON(pages_dirtied > 1000000000); <--------- UML debug printf shows that we got negative pause here: ick: pause : -984 ick: pages_dirtied : 0 ick: task_ratelimit: 0 pause: + if (pause < 0) { + extern int printf(char *, ...); + printf("ick : pause : %li\n", pause); + printf("ick: pages_dirtied : %lu\n", pages_dirtied); + printf("ick: task_ratelimit: %lu\n", task_ratelimit); + BUG_ON(1); + } trace_balance_dirty_pages(bdi, Since pause is bounded by [min_pause, max_pause] where min_pause is also bounded by max_pause. It's suspected and demonstrated that the max_pause calculation goes wrong: ick: pause : -717 ick: min_pause : -177 ick: max_pause : -717 ick: pages_dirtied : 14 ick: task_ratelimit: 0 The problem lies in the two "long = unsigned long" assignments in bdi_max_pause() which might go negative if the highest bit is 1, and the min_t(long, ...) check failed to protect it falling under 0. Fix all of them by using "unsigned long" throughout the function. Signed-off-by: Fengguang Wu <[email protected]> Reported-by: Toralf Förster <[email protected]> Tested-by: Toralf Förster <[email protected]> Reviewed-by: Jan Kara <[email protected]> Cc: Richard Weinberger <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-10-16percpu_refcount: export symbolsMatias Bjorling1-0/+3
Export the interface to be used within modules. Signed-off-by: Matias Bjorling <[email protected]> Acked-by: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-10-16fs: buffer: move allocation failure loop into the allocatorJohannes Weiner2-2/+14
Buffer allocation has a very crude indefinite loop around waking the flusher threads and performing global NOFS direct reclaim because it can not handle allocation failures. The most immediate problem with this is that the allocation may fail due to a memory cgroup limit, where flushers + direct reclaim might not make any progress towards resolving the situation at all. Because unlike the global case, a memory cgroup may not have any cache at all, only anonymous pages but no swap. This situation will lead to a reclaim livelock with insane IO from waking the flushers and thrashing unrelated filesystem cache in a tight loop. Use __GFP_NOFAIL allocations for buffers for now. This makes sure that any looping happens in the page allocator, which knows how to orchestrate kswapd, direct reclaim, and the flushers sensibly. It also allows memory cgroups to detect allocations that can't handle failure and will allow them to ultimately bypass the limit if reclaim can not make progress. Reported-by: azurIt <[email protected]> Signed-off-by: Johannes Weiner <[email protected]> Cc: Michal Hocko <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>