aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-01-19Linux 3.3-rc1HEADv3.3-rc1masterLinus Torvalds1-2/+2
2012-01-19Merge branches 'sched-urgent-for-linus', 'perf-urgent-for-linus' and ↵Linus Torvalds9-104/+444
'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/accounting, proc: Fix /proc/stat interrupts sum * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tracepoints/module: Fix disabling tracepoints with taint CRAP or OOT x86/kprobes: Add arch/x86/tools/insn_sanity to .gitignore x86/kprobes: Fix typo transferred from Intel manual * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, syscall: Need __ARCH_WANT_SYS_IPC for 32 bits x86, tsc: Fix SMI induced variation in quick_pit_calibrate() x86, opcode: ANDN and Group 17 in x86-opcode-map.txt x86/kconfig: Move the ZONE_DMA entry under a menu x86/UV2: Add accounting for BAU strong nacks x86/UV2: Ack BAU interrupt earlier x86/UV2: Remove stale no-resources test for UV2 BAU x86/UV2: Work around BAU bug x86/UV2: Fix BAU destination timeout initialization x86/UV2: Fix new UV2 hardware by using native UV2 broadcast mode x86: Get rid of dubious one-bit signed bitfield
2012-01-19Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds4-7/+8
gpio bug fixes for v3.3 * tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6: gpio: tps65910: Use correct offset for gpio initialization gpio/it8761e: Restrict it8761e gpio driver to x86. gpio-ml-ioh: cleanup __iomem annotation usage gpio-ml-ioh: cleanup NULL pointer checking gpio-pch: cleanup __iomem annotation usage gpio-pch: cleanup NULL pointer checking
2012-01-19Merge branch 'for-linus' of ↵Linus Torvalds3-40/+27
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: qnx4: don't leak ->BitMap on late failure exits qnx4: reduce the insane nesting in qnx4_checkroot() qnx4: di_fname is an array, for crying out loud... vfs: remove printk from set_nlink() wake up s_wait_unfrozen when ->freeze_fs fails
2012-01-19x86, syscall: Need __ARCH_WANT_SYS_IPC for 32 bitsH. Peter Anvin1-0/+1
In checkin 303395ac3bf3 x86: Generate system call tables and unistd_*.h from tables the feature macros in <asm/unistd.h> were unified between 32 and 64 bits. Unfortunately 32 bits requires __ARCH_WANT_SYS_IPC and this was inadvertently dropped. Reported-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com> Link: http://lkml.kernel.org/r/CALLzPKbeXN5gdngo8uYYU8mAow=XhrwBFBhKfG811f37BubQOg@mail.gmail.com
2012-01-19Merge remote-tracking branch 'linus/master' into x86/urgentH. Peter Anvin9587-258975/+463528
2012-01-19Merge branch 'for-linus' of ↵Linus Torvalds4-5/+8
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: KEYS: Permit key_serial() to be called with a const key pointer keys: fix user_defined key sparse messages ima: fix cred sparse warning MPILIB: Add a missing ENOMEM check
2012-01-19qnx4: don't leak ->BitMap on late failure exitsAl Viro1-1/+3
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-19qnx4: reduce the insane nesting in qnx4_checkroot()Al Viro1-34/+22
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-19qnx4: di_fname is an array, for crying out loud...Al Viro1-14/+12
(struct qnx4_inode_entry *)(bh->b_data + some_offset)->di_fname is not going to be NULL, TYVM... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-19KEYS: Permit key_serial() to be called with a const key pointerDavid Howells1-1/+1
Permit key_serial() to be called with a const key pointer. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
2012-01-19keys: fix user_defined key sparse messagesMimi Zohar1-3/+3
Replace the rcu_assign_pointer() calls with rcu_assign_keypointer(). Signed-off-by: Mimi Zohar <zohar@us.ibm.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
2012-01-19ima: fix cred sparse warningMimi Zohar1-1/+2
Fix ima_policy.c sparse "warning: dereference of noderef expression" message, by accessing cred->uid using current_cred(). Changelog v1: - Change __cred to just cred (based on David Howell's comment) Signed-off-by: Mimi Zohar <zohar@us.ibm.com> Signed-off-by: James Morris <jmorris@namei.org>
2012-01-18uml: fix compile for x86-64Linus Torvalds1-0/+5
Randy Dunlap reports that we get arch/x86/um/shared/sysdep/ptrace.h:7:20: error: redefinition of 'regs_return_value' arch/x86/um/shared/sysdep/ptrace.h:7:20: note: previous definition of 'regs_return_value' was here when compiling UML for x86-64. Stephen Rothwell root-caused it and says: "Caused by commit d7e7528bcd45 ("Audit: push audit success and retcode into arch ptrace.h") (another patch that was never in linux-next :-(). This file now needs protection against double inclusion." so let's do as the man says. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Analyzed-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-19MPILIB: Add a missing ENOMEM checkDavid Howells1-0/+2
Add a missing ENOMEM check. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Mimi Zohar <zohar@us.ibm.com> Signed-off-by: James Morris <jmorris@namei.org>
2012-01-18Merge branch 'for-next-merge' of ↵Linus Torvalds7-0/+4672
git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending * 'for-next-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: ib_srpt: Initial SRP Target merge for v3.3-rc1
2012-01-18Merge branch 'for-next' of ↵Linus Torvalds51-1014/+829
git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (26 commits) target: Set additional sense length field in sense data target: Remove legacy device status check from transport_execute_tasks target: Remove __transport_execute_tasks() for each processing context target: Remove extra se_device->execute_task_lock access in fast path target: Drop se_device TCQ queue_depth usage from I/O path target: Fix possible NULL pointer with __transport_execute_tasks target: Remove TFO->check_release_cmd() fabric API caller tcm_fc: Convert ft_send_work to use target_submit_cmd target: Add target_submit_cmd() for process context fabric submission target: Make target_put_sess_cmd use target_release_cmd_kref target: Set response format in INQUIRY response target: tcm_mod_builder: small fixups Documentation/target: Fix tcm_mod_builder.py build breakage target: remove overagressive ____cacheline_aligned annoations tcm_loop: bump max_sectors target/configs: remove trailing newline from udev_path and alias iscsi-target: fix chap identifier simple_strtoul usage target: remove useless casts target: simplify target_check_cdb_and_preempt target: Move core_scsi3_check_cdb_abort_and_preempt ...
2012-01-18Merge branch 'release' of ↵Linus Torvalds182-795/+4824
git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux This includes initial support for the recently published ACPI 5.0 spec. In particular, support for the "hardware-reduced" bit that eliminates the dependency on legacy hardware. APEI has patches resulting from testing on real hardware. Plus other random fixes. * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (52 commits) acpi/apei/einj: Add extensions to EINJ from rev 5.0 of acpi spec intel_idle: Split up and provide per CPU initialization func ACPI processor: Remove unneeded variable passed by acpi_processor_hotadd_init V2 ACPI processor: Remove unneeded cpuidle_unregister_driver call intel idle: Make idle driver more robust intel_idle: Fix a cast to pointer from integer of different size warning in intel_idle ACPI: kernel-parameters.txt : Add intel_idle.max_cstate intel_idle: remove redundant local_irq_disable() call ACPI processor: Fix error path, also remove sysdev link ACPI: processor: fix acpi_get_cpuid for UP processor intel_idle: fix API misuse ACPI APEI: Convert atomicio routines ACPI: Export interfaces for ioremapping/iounmapping ACPI registers ACPI: Fix possible alignment issues with GAS 'address' references ACPI, ia64: Use SRAT table rev to use 8bit or 16/32bit PXM fields (ia64) ACPI, x86: Use SRAT table rev to use 8bit or 32bit PXM fields (x86/x86-64) ACPI: Store SRAT table revision ACPI, APEI, Resolve false conflict between ACPI NVS and APEI ACPI, Record ACPI NVS regions ACPI, APEI, EINJ, Refine the fix of resource conflict ...
2012-01-18tpm: fix (ACPI S3) suspend regressionStefan Berger2-0/+12
This patch fixes an (ACPI S3) suspend regression introduced in commit 68d6e6713fcb ("tpm: Introduce function to poll for result of self test") and occurring with an Infineon TPM and tpm_tis and tpm_infineon drivers active. The suspend problem occurred if the TPM was disabled and/or deactivated and therefore the TPM_PCRRead checking the result of the (asynchronous) self test returned an error code which then caused the tpm_tis driver to become inactive and this then seemed to have negatively influenced the suspend support by the tpm_infineon driver... Besides that the tpm_tis drive may stay active even if the TPM is disabled and/or deactivated. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Tested-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-18nvme: fix merge error due to change of 'make_request_fn' fn typeLinus Torvalds1-7/+1
The type of 'make_request_fn' changed in 5a7bbad27a4 ("block: remove support for bio remapping from ->make_request"), but the merge of the nvme driver didn't take that into account, and as a result the driver would compile with a warning: drivers/block/nvme.c: In function 'nvme_alloc_ns': drivers/block/nvme.c:1336:2: warning: passing argument 2 of 'blk_queue_make_request' from incompatible pointer type [enabled by default] include/linux/blkdev.h:830:13: note: expected 'void (*)(struct request_queue *, struct bio *)' but argument is of type 'int (*)(struct request_queue *, struct bio *)' It's benign, but the warning is annoying. Reported-by: Stephen Rothwell <sfr@canb.auug.org> Cc: Matthew Wilcox <matthew.r.wilcox@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-18xen: using EXPORT_SYMBOL requires including export.hStephen Rothwell1-0/+1
Fix these warnings: drivers/xen/biomerge.c:14:1: warning: data definition has no type or storage class [enabled by default] drivers/xen/biomerge.c:14:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int] drivers/xen/biomerge.c:14:1: warning: parameter names (without types) in function declaration [enabled by default] And this build error: ERROR: "xen_biovec_phys_mergeable" [drivers/block/nvme.ko] undefined! Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-18Merge branch 'for-linus/i2c-33' of git://git.fluff.org/bjdooks/linuxLinus Torvalds4-54/+119
* 'for-linus/i2c-33' of git://git.fluff.org/bjdooks/linux: i2c-eg20t: Change-company-name-OKI-SEMICONDUCTOR to LAPIS Semiconductor i2c-eg20t: Support new device LAPIS Semiconductor ML7831 IOH i2c-eg20t: modified the setting of transfer rate. i2c-eg20t: use i2c_add_numbered_adapter to get a fixed bus number i2c: OMAP: Add DT support for i2c controller I2C: OMAP: NACK without STP I2C: OMAP: correct SYSC register offset for OMAP4
2012-01-18Merge branch 'v4l_for_linus' of ↵Linus Torvalds56-679/+727
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (57 commits) [media] as3645a: Fix compilation by including slab.h [media] s5p-fimc: Remove linux/version.h include from fimc-mdevice.c [media] s5p-mfc: Remove linux/version.h include from s5p_mfc.c [media] ds3000: using logical && instead of bitwise & [media] v4l2-ctrls: make control names consistent [media] DVB: dib0700, add support for Nova-TD LEDs [media] DVB: dib0700, add corrected Nova-TD frontend_attach [media] DVB: dib0700, separate stk7070pd initialization [media] DVB: dib0700, move Nova-TD Stick to a separate set [media] : add MODULE_FIRMWARE to dib0700 [media] DVB-CORE: remove superfluous DTV_CMDs [media] s5p-jpeg: adapt to recent videobuf2 changes [media] s5p-g2d: fixed a bug in controls setting function [media] s5p-mfc: Fix volatile controls setup [media] drivers/media/video/s5p-mfc/s5p_mfc.c: adjust double test [media] drivers/media/video/s5p-fimc/fimc-capture.c: adjust double test [media] s5p-fimc: Fix incorrect control ID assignment [media] dvb_frontend: Don't call get_frontend() if idle [media] DocBook/dvbproperty.xml: Remove DTV_MODULATION from ISDB-T [media] DocBook/dvbproperty.xml: Fix ISDB-T delivery system parameters ...
2012-01-18Merge branch 'fix/asoc' of ↵Linus Torvalds5-7/+19
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound * 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: Wait for WM8993 FLL to stabilise ASoC: core - Free platform DAPM context at platform removal. ASoC: dapm - Fix check for codec context in dapm_power_widgets(). ASoC: sgtl5000: update author email address ASoC: Fix DMA channel leak in imx-pcm-dma-mx2 driver.
2012-01-18gpio: tps65910: Use correct offset for gpio initializationLaxman Dewangan1-1/+1
Using the correct gpio offset for setting the initial value of gpio when setting output direction. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-01-18Merge tag 'scsi-misc' of ↵Linus Torvalds62-1482/+1192
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 SCSI updates on 20120118 * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (49 commits) [SCSI] libfc: remove redundant timer init for fcp [SCSI] fcoe: Move fcoe_debug_logging from fcoe.h to fcoe.c [SCSI] libfc: Declare local functions static [SCSI] fcoe: fix regression on offload em matching function for initiator/target [SCSI] qla4xxx: Update driver version to 5.02.00-k12 [SCSI] qla4xxx: Cleanup modinfo display [SCSI] qla4xxx: Update license [SCSI] qla4xxx: Clear the RISC interrupt bit during FW init [SCSI] qla4xxx: Added error logging for firmware abort [SCSI] qla4xxx: Disable generating pause frames in case of FW hung [SCSI] qla4xxx: Temperature monitoring for ISP82XX core. [SCSI] megaraid: fix sparse warnings [SCSI] sg: convert to kstrtoul_from_user() [SCSI] don't change sdev starvation list order without request dispatched [SCSI] isci: fix, prevent port from getting stuck in the 'configuring' state [SCSI] isci: fix start OOB [SCSI] isci: fix io failures while wide port links are coming up [SCSI] isci: allow more time for wide port targets [SCSI] isci: enable wide port targets [SCSI] isci: Fix IO fails when pull cable from phy in x4 wideport in MPC mode. ...
2012-01-18Merge git://git.infradead.org/users/willy/linux-nvmeLinus Torvalds6-0/+2193
* git://git.infradead.org/users/willy/linux-nvme: (105 commits) NVMe: Set number of queues correctly NVMe: Version 0.8 NVMe: Set queue flags correctly NVMe: Simplify nvme_unmap_user_pages NVMe: Mark the end of the sg list NVMe: Fix DMA mapping for admin commands NVMe: Rename IO_TIMEOUT to NVME_IO_TIMEOUT NVMe: Merge the nvme_bio and nvme_prp data structures NVMe: Change nvme_completion_fn to take a dev NVMe: Change get_nvmeq to take a dev instead of a namespace NVMe: Simplify completion handling NVMe: Update Identify Controller data structure NVMe: Implement doorbell stride capability NVMe: Version 0.7 NVMe: Don't probe namespace 0 Fix calculation of number of pages in a PRP List NVMe: Create nvme_identify and nvme_get_features functions NVMe: Fix memory leak in nvme_dev_add() NVMe: Fix calls to dma_unmap_sg NVMe: Correct sg list setup in nvme_map_user_pages ...
2012-01-17Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds58-380/+429
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (47 commits) tg3: Fix single-vector MSI-X code openvswitch: Fix multipart datapath dumps. ipv6: fix per device IP snmp counters inetpeer: initialize ->redirect_genid in inet_getpeer() net: fix NULL-deref in WARN() in skb_gso_segment() net: WARN if skb_checksum_help() is called on skb requiring segmentation caif: Remove bad WARN_ON in caif_dev caif: Fix typo in Vendor/Product-ID for CAIF modems bnx2x: Disable AN KR work-around for BCM57810 bnx2x: Remove AutoGrEEEn for BCM84833 bnx2x: Remove 100Mb force speed for BCM84833 bnx2x: Fix PFC setting on BCM57840 bnx2x: Fix Super-Isolate mode for BCM84833 net: fix some sparse errors net: kill duplicate included header net: sh-eth: Fix build error by the value which is not defined net: Use device model to get driver name in skb_gso_segment() bridge: BH already disabled in br_fdb_cleanup() net: move sock_update_memcg outside of CONFIG_INET mwl8k: Fixing Sparse ENDIAN CHECK warning ...
2012-01-18Merge branches 'einj', 'intel_idle', 'misc', 'srat' and 'turbostat-ivb' into ↵Len Brown12-111/+345
release
2012-01-18acpi/apei/einj: Add extensions to EINJ from rev 5.0 of acpi specTony Luck3-48/+234
ACPI 5.0 provides extensions to the EINJ mechanism to specify the target for the error injection - by APICID for cpu related errors, by address for memory related errors, and by segment/bus/device/function for PCIe related errors. Also extensions for vendor specific error injections. Tested-by: Chen Gong <gong.chen@linux.intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-18Merge branch 'atomicio-remove' into releaseLen Brown5-25/+133
2012-01-18Merge branch 'apei' into releaseLen Brown11-55/+321
2012-01-17intel_idle: Split up and provide per CPU initialization funcThomas Renninger2-40/+49
Function split up, should have no functional change. Provides entry point for physically hotplugged CPUs to initialize and activate cpuidle. Signed-off-by: Thomas Renninger <trenn@suse.de> CC: Deepthi Dharwar <deepthi@linux.vnet.ibm.com> CC: Shaohua Li <shaohua.li@intel.com> CC: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPI processor: Remove unneeded variable passed by acpi_processor_hotadd_init V2Thomas Renninger1-9/+8
V2: Fix typo: pr->handle -> pr, here: acpi_processor_hotadd_init(pr) This is a very small part taken from patches which afaik are coming from Yunhong Jiang (for a Xen not a Linus repo?). Cleanup only: no functional change. Advantage (beside cleanup) is that other data of the pr (acpi_processor) struct in the acpi_processor_hotadd_init() is needed later, for example a newly introduced flag: pr->flags.need_hotplug_init Signed-off-by: Thomas Renninger <trenn@suse.de> CC: Bjorn Helgaas <bhelgaas@google.com> CC: Jiang, Yunhong <yunhong.jiang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17tg3: Fix single-vector MSI-X codeMatt Carlson1-13/+14
Kdump kernels leave MSI-X interrupts (as setup by the crashed kernel) enabled. However, kdump only enables one CPU in the new environment, thus causing tg3 to abort MSI-X setup. When the driver attempts to enable INTA or MSI interrupt modes on a kdump kernel, interrupt delivery fails. This patch attempts to workaround the problem by forcing the driver to enable a single MSI-X interrupt. In such a configuration, the device's multivector interrupt mode must be disabled. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17openvswitch: Fix multipart datapath dumps.Ben Pfaff1-4/+3
The logic to split up the list of datapaths into multiple Netlink messages was simply wrong, causing the list to be terminated after the first part. Only about the first 50 datapaths would be dumped. This fixes the problem. Reported-by: Paul Ingram <paul@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17ipv6: fix per device IP snmp countersEric Dumazet1-2/+2
In commit 4ce3c183fca (snmp: 64bit ipstats_mib for all arches), I forgot to change the /proc/net/dev_snmp6/xxx output for IP counters. percpu array is 64bit per counter but the folding still used the 'long' variant, and output garbage on 32bit arches. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17Merge tag 'arm-soc-fixes' of ↵Linus Torvalds19-40/+30
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc ARM: fixes for ARM platforms Some fallout from the 3.3. merge window as well as a couple bug fixes for older preexisting bugs that seem valid to include at this time: * sched_clock changes broke picoxcell, fix included * BSYM bugs causing issues with thumb2-built kernels on SMP * Missing module.h include on msm. * A collection of bugfixes for samsung platforms that didn't make it into the first pull requests. * tag 'arm-soc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: make BSYM macro assembly only ARM: highbank: remove incorrect BSYM usage ARM: imx: remove incorrect BSYM usage ARM: exynos: remove incorrect BSYM usage ARM: ux500: add missing ENDPROC to headsmp.S ARM: msm: Add missing ENDPROC to headsmp.S ARM: versatile: Add missing ENDPROC to headsmp.S ARM: EXYNOS: Invert VCLK polarity for framebuffer on ORIGEN ARM: S3C64XX: Fix interrupt configuration for PCA935x on Cragganmore ARM: S3C64XX: Fix the memory mapped GPIOs on Cragganmore ARM: S3C64XX: Remove hsmmc1 from Cragganmore ARM: S3C64XX: Remove unconditional power domain disables ARM: SAMSUNG: Declare struct platform_device in plat/s3c64xx-spi.h ARM: SAMSUNG: dma-ops.h needs mach/dma.h ARM: SAMSUNG: Guard against multiple inclusion of plat/dma.h ARM: picoxcell: fix sched_clock() cleanup fallout ARM: msm: vreg is a module and so needs module.h
2012-01-17Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dmaLinus Torvalds73-530/+1872
* 'next' of git://git.infradead.org/users/vkoul/slave-dma: (53 commits) ARM: mach-shmobile: specify CHCLR registers on SH7372 dma: shdma: fix runtime PM: clear channel buffers on reset dma/imx-sdma: save irq flags when use spin_lock in sdma_tx_submit dmaengine/ste_dma40: clear LNK on channel startup dmaengine: intel_mid_dma: remove legacy pm interface ASoC: mxs: correct 'direction' of device_prep_dma_cyclic dmaengine: intel_mid_dma: error path fix dmaengine: intel_mid_dma: locking and freeing fixes mtd: gpmi-nand: move to dma_transfer_direction mtd: fix compile error for gpmi-nand mmc: mxs-mmc: fix the dma_transfer_direction migration dmaengine: add DMA_TRANS_NONE to dma_transfer_direction dma: mxs-dma: Don't use CLKGATE bits in CTRL0 to disable DMA channels dma: mxs-dma: make mxs_dma_prep_slave_sg() multi user safe dma: mxs-dma: Always leave mxs_dma_init() with the clock disabled. dma: mxs-dma: fix a typo in comment DMA: PL330: Remove pm_runtime_xxx calls from pl330 probe/remove video i.MX IPU: Fix display connections i.MX IPU DMA: Fix wrong burstsize settings dmaengine/ste_dma40: allow fixed physical channel ... Fix up conflicts in drivers/dma/{Kconfig,mxs-dma.c,pl330.c} The conflicts looked pretty trivial, but I'll ask people to verify them.
2012-01-17Merge branch 'upstream-linus' of git://github.com/jgarzik/libata-devLinus Torvalds5-79/+109
* 'upstream-linus' of git://github.com/jgarzik/libata-dev: [libata] ata_piix: Add Toshiba Satellite Pro A120 to the quirks list due to broken suspend functionality. [libata] add DVRTD08A and DVR-215 to NOSETXFER device quirk list [libata] pata_bf54x: Support sg list in bmdma transfer. [libata] sata_fsl: fix the controller operating mode [libata] enable ata port async suspend
2012-01-17x86-32: Fix build failure with AUDIT=y, AUDITSYSCALL=nAl Viro1-0/+2
JONGMAN HEO reports: With current linus git (commit a25a2b84), I got following build error, arch/x86/kernel/vm86_32.c: In function 'do_sys_vm86': arch/x86/kernel/vm86_32.c:340: error: implicit declaration of function '__audit_syscall_exit' make[3]: *** [arch/x86/kernel/vm86_32.o] Error 1 OK, I can reproduce it (32bit allmodconfig with AUDIT=y, AUDITSYSCALL=n) It's due to commit d7e7528bcd45: "Audit: push audit success and retcode into arch ptrace.h". Reported-by: JONGMAN HEO <jongman.heo@samsung.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-17[libata] ata_piix: Add Toshiba Satellite Pro A120 to the quirks listBenjamin Larsson1-0/+7
due to broken suspend functionality. Signed-off-by: Benjamin Larsson <benjamin@southpole.se> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-01-17[libata] add DVRTD08A and DVR-215 to NOSETXFER device quirk listVladimir LAVALLADE1-0/+2
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-01-17[libata] pata_bf54x: Support sg list in bmdma transfer.Sonic Zhang1-79/+88
BF54x on-chip ATAPI controller allows maximum 0x1fffe bytes to be transfered in one ATAPI transfer. So, set the max sg_tablesize to 4. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-01-17[libata] sata_fsl: fix the controller operating modeJerry Huang1-0/+11
Configure the FSL SATA controller to the preferred, enterprise mode. Signed-off-by: Yutaka Ando <r46913@freescale.com> Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com> CC: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-01-17[libata] enable ata port async suspendLin Ming1-0/+1
This saves devices suspend/resume time. Tested system suspend/resume with SATA IDE/AHCI mode 3 times. Below is the time took for devices suspend/resume. SATA mode vanilla-kernel patched-kernel --------- --------------------- --------------------- IDE suspend: 0.744 suspend: 0.432 (0.716, 0.768, 0.748) (0.440, 0.428, 0.428) resume: 5.084 resume: 2.209 (5.100, 5.064, 5.088) (2.168, 2.232, 2.228) AHCI: suspend: 0.725 suspend: 0.449 (0.740, 0.708, 0.728) (0.456, 0.448, 0.444) resume: 2.556 resume: 1.896 (2.604, 2.492, 2.572) (1.932, 1.872, 1.884) Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-01-17[media] as3645a: Fix compilation by including slab.hLaurent Pinchart1-0/+1
The as3645a driver calls kzalloc(). Include slab.h. Reported-by: Fredrik Lingvall <fredrik.lingvall@gmail.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17[media] s5p-fimc: Remove linux/version.h include from fimc-mdevice.cSachin Kamat1-1/+0
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17[media] s5p-mfc: Remove linux/version.h include from s5p_mfc.cSachin Kamat1-1/+0
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17[media] ds3000: using logical && instead of bitwise &Dan Carpenter1-1/+1
The intent here was to test if the FE_HAS_LOCK was set. The current test is equivalent to "if (status) { ..." Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17[media] v4l2-ctrls: make control names consistentHans Verkuil1-27/+27
Several control names used inconsistent capitalization or were inconsistent in other ways. I also corrected a spelling mistake and fixed four strings that were too long (>31 characters). Harmless, but the string is cut off when it is returned with QUERYCTRL. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17[media] DVB: dib0700, add support for Nova-TD LEDsJiri Slaby2-1/+42
Add an override of read_status to intercept lock status. This allows us to switch LEDs appropriately on and off with signal un/locked. The second phase is to override sleep to properly turn off both. This is a hackish way to achieve that. Thanks to Mike Krufky for his help. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17[media] DVB: dib0700, add corrected Nova-TD frontend_attachJiri Slaby1-2/+34
This means cut & paste from the former f. attach. But while at it write to the right GPIO to turn on the right LED. Also turn the other two off jsut for sure. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17[media] DVB: dib0700, separate stk7070pd initializationJiri Slaby1-8/+14
The start is common for both stk7070pd and novatd specific routine. This is just a preparation for the next patch. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17[media] DVB: dib0700, move Nova-TD Stick to a separate setJiri Slaby1-5/+52
To properly support the three LEDs which are on the stick, we need a special handling in the ->frontend_attach function. Thus let's have a separate ->frontend_attach instead of ifs in the common one. The hadnling itself will be added in further patches. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17[media] : add MODULE_FIRMWARE to dib0700Patrick Boettcher1-0/+1
The dib0700 needs a binary firmware file. This patch added the MODULE_FIRMWARE-macro. Signed-off-by: Christoph Anton Mitterer <calestyo@scientia.net> Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17[media] DVB-CORE: remove superfluous DTV_CMDsPatrick Boettcher1-19/+0
This small patch removes superfluous DTV_CMDs from dvb_frontend.c which were added in the initially when ISBD-T support was added. They were there unnoticed even though compilers should have warning about those duplicates. Finally they did and now we can remove them. Thanks to Dan Carpenter <dan.carpenter@oracle.com> for pointing that out. Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17[media] s5p-jpeg: adapt to recent videobuf2 changesMarek Szyprowski1-3/+4
queue_setup callback has been extended with struct v4l2_format *fmt parameter in 2d86401c2c commit. This patch adds this parameter to s5p-jpeg driver. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17[media] s5p-g2d: fixed a bug in controls setting functionKamil Debski1-0/+1
Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17[media] s5p-mfc: Fix volatile controls setupKamil Debski1-1/+1
Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17[media] drivers/media/video/s5p-mfc/s5p_mfc.c: adjust double testJulia Lawall1-1/+1
Rewrite a duplicated test to test the correct value The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression E; @@ ( * E || ... || E | * E && ... && E ) // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17[media] drivers/media/video/s5p-fimc/fimc-capture.c: adjust double testJulia Lawall1-3/+4
Rewrite a duplicated test to test the correct value The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression E; @@ ( * E || ... || E | * E && ... && E ) // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17[media] s5p-fimc: Fix incorrect control ID assignmentSachin Kamat1-3/+3
This patch fixes the mismatch between control IDs (CID) and controls for hflip, vflip and rotate. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17Merge branch 'for-linus' of ↵Linus Torvalds14-36/+50
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: integrity: digital signature config option name change lib: Removed MPILIB, MPILIB_EXTRA, and SIGNATURE prompts lib: MPILIB Kconfig description update lib: digital signature dependency fix lib: digital signature config option name change encrypted-keys: fix rcu and sparse messages keys: fix trusted/encrypted keys sparse rcu_assign_pointer messages KEYS: Add missing smp_rmb() primitives to the keyring search code TOMOYO: Accept \000 as a valid character. security: update MAINTAINERS file with new git repo
2012-01-17gpio/it8761e: Restrict it8761e gpio driver to x86.Grant Likely1-0/+1
This driver does an unconditional read of io space during module init which causes a bad dereference on ARM. It looks to me like this is an x86 only drivers, so restrict it to only compile on x86. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: Denis Turischev <denis@compulab.co.il>
2012-01-17Merge branch 'for-linus' of ↵Linus Torvalds43-500/+810
git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit: (29 commits) audit: no leading space in audit_log_d_path prefix audit: treat s_id as an untrusted string audit: fix signedness bug in audit_log_execve_info() audit: comparison on interprocess fields audit: implement all object interfield comparisons audit: allow interfield comparison between gid and ogid audit: complex interfield comparison helper audit: allow interfield comparison in audit rules Kernel: Audit Support For The ARM Platform audit: do not call audit_getname on error audit: only allow tasks to set their loginuid if it is -1 audit: remove task argument to audit_set_loginuid audit: allow audit matching on inode gid audit: allow matching on obj_uid audit: remove audit_finish_fork as it can't be called audit: reject entry,always rules audit: inline audit_free to simplify the look of generic code audit: drop audit_set_macxattr as it doesn't do anything audit: inline checks for not needing to collect aux records audit: drop some potentially inadvisable likely notations ... Use evil merge to fix up grammar mistakes in Kconfig file. Bad speling and horrible grammar (and copious swearing) is to be expected, but let's keep it to commit messages and comments, rather than expose it to users in config help texts or printouts.
2012-01-17Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfsLinus Torvalds18-542/+374
* 'for-linus' of git://oss.sgi.com/xfs/xfs: xfs: cleanup xfs_file_aio_write xfs: always return with the iolock held from xfs_file_aio_write_checks xfs: remove the i_new_size field in struct xfs_inode xfs: remove the i_size field in struct xfs_inode xfs: replace i_pin_wait with a bit waitqueue xfs: replace i_flock with a sleeping bitlock xfs: make i_flags an unsigned long xfs: remove the if_ext_max field in struct xfs_ifork xfs: remove the unused dm_attrs structure xfs: cleanup xfs_iomap_eof_align_last_fsb xfs: remove xfs_itruncate_data
2012-01-17Merge branch 'btrfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfsLinus Torvalds7-125/+110
* 'btrfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: btrfs: take allocation of ->tree_root into open_ctree() btrfs: let ->s_fs_info point to fs_info, not root... btrfs: consolidate failure exits in btrfs_mount() a bit btrfs: make free_fs_info() call ->kill_sb() unconditional btrfs: merge free_fs_info() calls on fill_super failures btrfs: kill pointless reassignment of ->s_fs_info in btrfs_fill_super() btrfs: make open_ctree() return int btrfs: sanitizing ->fs_info, part 5 btrfs: sanitizing ->fs_info, part 4 btrfs: sanitizing ->fs_info, part 3 btrfs: sanitizing ->fs_info, part 2 btrfs: sanitizing ->fs_info, part 1 btrfs: fix a deadlock in btrfs_scan_one_device() btrfs: fix mount/umount race btrfs: get ->kill_sb() of its own btrfs: preparation to fixing mount/umount race
2012-01-17Merge branch 'for-linus' of ↵Linus Torvalds34-921/+6949
git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (62 commits) Btrfs: use larger system chunks Btrfs: add a delalloc mutex to inodes for delalloc reservations Btrfs: space leak tracepoints Btrfs: protect orphan block rsv with spin_lock Btrfs: add allocator tracepoints Btrfs: don't call btrfs_throttle in file write Btrfs: release space on error in page_mkwrite Btrfs: fix btrfsck error 400 when truncating a compressed Btrfs: do not use btrfs_end_transaction_throttle everywhere Btrfs: add balance progress reporting Btrfs: allow for resuming restriper after it was paused Btrfs: allow for canceling restriper Btrfs: allow for pausing restriper Btrfs: add skip_balance mount option Btrfs: recover balance on mount Btrfs: save balance parameters to disk Btrfs: soft profile changing mode (aka soft convert) Btrfs: implement online profile changing Btrfs: do not reduce profile in do_chunk_alloc() Btrfs: virtual address space subset filter ... Fix up trivial conflict in fs/btrfs/ioctl.c due to the use of the new mnt_drop_write_file() helper.
2012-01-17x86, tsc: Fix SMI induced variation in quick_pit_calibrate()Linus Torvalds1-8/+6
pit_expect_msb() returns success wrongly in the below SMI scenario: a. pit_verify_msb() has not yet seen the MSB transition. b. we are close to the MSB transition though and got a SMI immediately after returning from pit_verify_msb() which didn't see the MSB transition. PIT MSB transition has happened somewhere during SMI execution. c. returned from SMI and we noted down the 'tsc', saw the pit MSB change now and exited the loop to calculate 'deltatsc'. Instead of noting the TSC at the MSB transition, we are way off because of the SMI. And as the SMI happened between the pit_verify_msb() and before the 'tsc' is recorded in the for loop, 'delattsc' (d1/d2 in quick_pit_calibrate()) will be small and quick_pit_calibrate() will not notice this error. Depending on whether SMI disturbance happens while computing d1 or d2, we will see the TSC calibrated value smaller or bigger than the expected value. As a result, in a cluster we were seeing a variation of approximately +/- 20MHz in the calibrated values, resulting in NTP failures. [ As far as the SMI source is concerned, this is a periodic SMI that gets disabled after ACPI is enabled by the OS. But the TSC calibration happens before the ACPI is enabled. ] To address this, change pit_expect_msb() so that - the 'tsc' is the TSC in between the two reads that read the MSB change from the PIT (same as before) - the 'delta' is the difference in TSC from *before* the MSB changed to *after* the MSB changed. Now the delta is twice as big as before (it covers four PIT accesses, roughly 4us) and quick_pit_calibrate() will loop a bit longer to get the calibrated value with in the 500ppm precision. As the delta (d1/d2) covers four PIT accesses, actual calibrated result might be closer to 250ppm precision. As the loop now takes longer to stabilize, double MAX_QUICK_PIT_MS to 50. SMI disturbance will showup as much larger delta's and the loop will take longer than usual for the result to be with in the accepted precision. Or will fallback to slow PIT calibration if it takes more than 50msec. Also while we are at this, remove the calibration correction that aims to get the result to the middle of the error bars. We really don't know which direction to correct into, so remove it. Reported-and-tested-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Link: http://lkml.kernel.org/r/1326843337.5291.4.camel@sbsiddha-mobl2 Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2012-01-18integrity: digital signature config option name changeDmitry Kasatkin3-4/+4
Similar to SIGNATURE, rename INTEGRITY_DIGSIG to INTEGRITY_SIGNATURE. Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com> Signed-off-by: James Morris <jmorris@namei.org>
2012-01-18lib: Removed MPILIB, MPILIB_EXTRA, and SIGNATURE promptsDmitry Kasatkin1-3/+3
As modules are expected to select MPILIB, MPILIB_EXTRA, and SIGNATURE, removed Kconfig prompts. Requested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com> Signed-off-by: James Morris <jmorris@namei.org>
2012-01-18lib: MPILIB Kconfig description updateDmitry Kasatkin1-5/+3
It was reported that description of the MPILIB_EXTRA is confusing. Indeed it was copy-paste typo. It is fixed here. Reported-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com> Signed-off-by: James Morris <jmorris@namei.org>
2012-01-18lib: digital signature dependency fixDmitry Kasatkin1-1/+2
Randy Dunlap reported build break: ERROR: "crypto_alloc_shash" [lib/digsig.ko] undefined! ERROR: "crypto_shash_final" [lib/digsig.ko] undefined! ERROR: "crypto_shash_update" [lib/digsig.ko] undefined! ERROR: "crypto_destroy_tfm" [lib/digsig.ko] undefined! Added CRYPTO dependency and selected SHA1 algorithm. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com> Signed-off-by: James Morris <jmorris@namei.org>
2012-01-18lib: digital signature config option name changeDmitry Kasatkin4-5/+5
It was reported that DIGSIG is confusing name for digital signature module. It was suggested to rename DIGSIG to SIGNATURE. Requested-by: Linus Torvalds <torvalds@linux-foundation.org> Suggested-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com> Signed-off-by: James Morris <jmorris@namei.org>
2012-01-18encrypted-keys: fix rcu and sparse messagesMimi Zohar2-2/+2
Enabling CONFIG_PROVE_RCU and CONFIG_SPARSE_RCU_POINTER resulted in "suspicious rcu_dereference_check() usage!" and "incompatible types in comparison expression (different address spaces)" messages. Access the masterkey directly when holding the rwsem. Changelog v1: - Use either rcu_read_lock()/rcu_derefence_key()/rcu_read_unlock() or remove the unnecessary rcu_derefence() - David Howells Reported-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com> Signed-off-by: Mimi Zohar <zohar@us.ibm.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
2012-01-18keys: fix trusted/encrypted keys sparse rcu_assign_pointer messagesMimi Zohar4-4/+9
Define rcu_assign_keypointer(), which uses the key payload.rcudata instead of payload.data, to resolve the CONFIG_SPARSE_RCU_POINTER message: "incompatible types in comparison expression (different address spaces)" Replace the rcu_assign_pointer() calls in encrypted/trusted keys with rcu_assign_keypointer(). Signed-off-by: Mimi Zohar <zohar@us.ibm.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
2012-01-18KEYS: Add missing smp_rmb() primitives to the keyring search codeDavid Howells2-8/+18
Add missing smp_rmb() primitives to the keyring search code. When keyring payloads are appended to without replacement (thus using up spare slots in the key pointer array), an smp_wmb() is issued between the pointer assignment and the increment of the key count (nkeys). There should be corresponding read barriers between the read of nkeys and dereferences of keys[n] when n is dependent on the value of nkeys. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: James Morris <jmorris@namei.org>
2012-01-18TOMOYO: Accept \000 as a valid character.Tetsuo Handa1-3/+3
TOMOYO 2.5 in Linux 3.2 and later handles Unix domain socket's address. Thus, tomoyo_correct_word2() needs to accept \000 as a valid character, or TOMOYO 2.5 cannot handle Unix domain's abstract socket address. Reported-by: Steven Allen <steven@stebalien.com> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> CC: stable@vger.kernel.org [3.2+] Signed-off-by: James Morris <jmorris@namei.org>
2012-01-17Fix compile breakage with kref.hJames Bottomley1-0/+1
This set of build failures just started appearing on parisc: In file included from drivers/input/serio/serio_raw.c:12: include/linux/kref.h: In function 'kref_get': include/linux/kref.h:40: error: 'TAINT_WARN' undeclared (first use in this function) include/linux/kref.h:40: error: (Each undeclared identifier is reported only once include/linux/kref.h:40: error: for each function it appears in.) include/linux/kref.h: In function 'kref_sub': include/linux/kref.h:65: error: 'TAINT_WARN' undeclared (first use in this function) It happens because TAINT_WARN is defined in kernel.h and this particular compile doesn't seem to include it (no idea why it's just manifesting .. probably some #include file untangling exposed it). Fix by adding #include <linux/kernel.h> to linux/kref.h Signed-off-by: James Bottomley <JBottomley@Parallels.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-18security: update MAINTAINERS file with new git repoJames Morris1-1/+1
Update MAINTAINERS file with new git repo: git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git Signed-off-by: James Morris <jmorris@namei.org>
2012-01-17Merge branches 'for-33/i2c/eg20t' and 'for-33/i2c/omap' into for-linus/i2c-33Ben Dooks2-40/+100
2012-01-17i2c-eg20t: Change-company-name-OKI-SEMICONDUCTOR to LAPIS SemiconductorTomoya MORINAGA1-6/+6
On October 1 in 2011, OKI SEMICONDUCTOR Co., Ltd. changed the company name in to LAPIS Semiconductor Co., Ltd. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2012-01-17i2c-eg20t: Support new device LAPIS Semiconductor ML7831 IOHTomoya MORINAGA2-7/+10
ML7831 is companion chip for Intel Atom E6xx series. Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2012-01-17i2c-eg20t: modified the setting of transfer rate.Toshiharu Okada1-1/+1
This patch modified the setting value of I2C Bus Transfer Rate Setting Counter regisrer. Signed-off-by: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2012-01-17i2c-eg20t: use i2c_add_numbered_adapter to get a fixed bus numberFeng Tang1-1/+3
For EG20T and ML7213 IOH, the i2c controller numbers are fixed, using fixed bus number will make it much easier for platform code to use i2c_register_board_info() to register i2c devices. Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2012-01-17proc: clean up and fix /proc/<pid>/mem handlingLinus Torvalds1-106/+39
Jüri Aedla reported that the /proc/<pid>/mem handling really isn't very robust, and it also doesn't match the permission checking of any of the other related files. This changes it to do the permission checks at open time, and instead of tracking the process, it tracks the VM at the time of the open. That simplifies the code a lot, but does mean that if you hold the file descriptor open over an execve(), you'll continue to read from the _old_ VM. That is different from our previous behavior, but much simpler. If somebody actually finds a load where this matters, we'll need to revert this commit. I suspect that nobody will ever notice - because the process mapping addresses will also have changed as part of the execve. So you cannot actually usefully access the fd across a VM change simply because all the offsets for IO would have changed too. Reported-by: Jüri Aedla <asd@ut.ee> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-17i2c: OMAP: Add DT support for i2c controllerBenoit Cousson2-35/+97
Add initial DT support to retrieve the frequency using a DT attribute instead of the pdata pointer if of_node exist. Add documentation for omap i2c controller binding. Based on original patches from Manju and Grant. Signed-off-by: Benoit Cousson <b-cousson@ti.com> Cc: Ben Dooks <ben-linux@fluff.org> Reviewed-by: Rob Herring <rob.herring@calxeda.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kevin Hilman <khilman@ti.com>
2012-01-17I2C: OMAP: NACK without STPJan Weitzel1-4/+2
On OMAP4 OMAP_I2C_STAT_NACK is causing a timeout on the next access. The isr cleans all flags in OMAP_I2C_CON_REG by setting OMAP_I2C_CON_STP OMAP_I2C_CON_STP is also set in omap_i2c_xfer_msg on the last message. According to the TI TSR the sequence for OMAP_I2C_STAT_NACK and OMAP_I2C_STAT_AL are nearly the same. Removing the OMAP_I2C_CON_STP part in the isr fix the problem. Tested on OMAP4430 and OMAP3530 (here NACK was not a problem) Fixes also booting on 2430sdp. Signed-off-by: Jan Weitzel <j.weitzel@phytec.de> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
2012-01-17I2C: OMAP: correct SYSC register offset for OMAP4Alexander Aring1-1/+1
Correct OMAP_I2C_SYSC_REG offset in omap4 register map. Offset 0x20 is reserved and OMAP_I2C_SYSC_REG has 0x10 as offset. Signed-off-by: Alexander Aring <a.aring@phytec.de> [khilman@ti.com: minor changelog edits] Cc: stable@vger.kernel.org Signed-off-by: Kevin Hilman <khilman@ti.com>
2012-01-17vfs: remove printk from set_nlink()Miklos Szeredi1-3/+0
Don't log a message for set_nlink(0). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-17wake up s_wait_unfrozen when ->freeze_fs failsKazuya Mio1-0/+2
dd slept infinitely when fsfeeze failed because of EIO. To fix this problem, if ->freeze_fs fails, freeze_super() wakes up the tasks waiting for the filesystem to become unfrozen. When s_frozen isn't SB_UNFROZEN in __generic_file_aio_write(), the function sleeps until FITHAW ioctl wakes up s_wait_unfrozen. However, if ->freeze_fs fails, s_frozen is set to SB_UNFROZEN and then freeze_super() returns an error number. In this case, FITHAW ioctl returns EINVAL because s_frozen is already SB_UNFROZEN. There is no way to wake up s_wait_unfrozen, so __generic_file_aio_write() sleeps infinitely. Signed-off-by: Kazuya Mio <k-mio@sx.jp.nec.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-01-17audit: no leading space in audit_log_d_path prefixKees Cook3-6/+6
audit_log_d_path() injects an additional space before the prefix, which serves no purpose and doesn't mix well with other audit_log*() functions that do not sneak extra characters into the log. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: treat s_id as an untrusted stringKees Cook2-13/+18
The use of s_id should go through the untrusted string path, just to be extra careful. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Mimi Zohar <zohar@us.ibm.com> Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: fix signedness bug in audit_log_execve_info()Xi Wang1-2/+2
In the loop, a size_t "len" is used to hold the return value of audit_log_single_execve_arg(), which returns -1 on error. In that case the error handling (len <= 0) will be bypassed since "len" is unsigned, and the loop continues with (p += len) being wrapped. Change the type of "len" to signed int to fix the error handling. size_t len; ... for (...) { len = audit_log_single_execve_arg(...); if (len <= 0) break; p += len; } Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: comparison on interprocess fieldsPeter Moody2-1/+62
This allows audit to specify rules in which we compare two fields of a process. Such as is the running process uid != to the running process euid? Signed-off-by: Peter Moody <pmoody@google.com> Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: implement all object interfield comparisonsPeter Moody2-1/+38
This completes the matrix of interfield comparisons between uid/gid information for the current task and the uid/gid information for inodes. aka I can audit based on differences between the euid of the process and the uid of fs objects. Signed-off-by: Peter Moody <pmoody@google.com> Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: allow interfield comparison between gid and ogidEric Paris2-1/+8
Allow audit rules to compare the gid of the running task to the gid of the inode in question. Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: complex interfield comparison helperEric Paris1-11/+39
Rather than code the same loop over and over implement a helper function which uses some pointer magic to make it generic enough to be used numerous places as we implement more audit interfield comparisons Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: allow interfield comparison in audit rulesEric Paris3-2/+37
We wish to be able to audit when a uid=500 task accesses a file which is uid=0. Or vice versa. This patch introduces a new audit filter type AUDIT_FIELD_COMPARE which takes as an 'enum' which indicates which fields should be compared. At this point we only define the task->uid vs inode->uid, but other comparisons can be added. Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17Kernel: Audit Support For The ARM PlatformNathaniel Husted6-9/+25
This patch provides functionality to audit system call events on the ARM platform. The implementation was based off the structure of the MIPS platform and information in this (http://lists.fedoraproject.org/pipermail/arm/2009-October/000382.html) mailing list thread. The required audit_syscall_exit and audit_syscall_entry checks were added to ptrace using the standard registers for system call values (r0 through r3). A thread information flag was added for auditing (TIF_SYSCALL_AUDIT) and a meta-flag was added (_TIF_SYSCALL_WORK) to simplify modifications to the syscall entry/exit. Now, if either the TRACE flag is set or the AUDIT flag is set, the syscall_trace function will be executed. The prober changes were made to Kconfig to allow CONFIG_AUDITSYSCALL to be enabled. Due to platform availability limitations, this patch was only tested on the Android platform running the modified "android-goldfish-2.6.29" kernel. A test compile was performed using Code Sourcery's cross-compilation toolset and the current linux-3.0 stable kernel. The changes compile without error. I'm hoping, due to the simple modifications, the patch is "obviously correct". Signed-off-by: Nathaniel Husted <nhusted@gmail.com> Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: do not call audit_getname on errorEric Paris2-18/+13
Just a code cleanup really. We don't need to make a function call just for it to return on error. This also makes the VFS function even easier to follow and removes a conditional on a hot path. Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: only allow tasks to set their loginuid if it is -1Eric Paris3-4/+24
At the moment we allow tasks to set their loginuid if they have CAP_AUDIT_CONTROL. In reality we want tasks to set the loginuid when they log in and it be impossible to ever reset. We had to make it mutable even after it was once set (with the CAP) because on update and admin might have to restart sshd. Now sshd would get his loginuid and the next user which logged in using ssh would not be able to set his loginuid. Systemd has changed how userspace works and allowed us to make the kernel work the way it should. With systemd users (even admins) are not supposed to restart services directly. The system will restart the service for them. Thus since systemd is going to loginuid==-1, sshd would get -1, and sshd would be allowed to set a new loginuid without special permissions. If an admin in this system were to manually start an sshd he is inserting himself into the system chain of trust and thus, logically, it's his loginuid that should be used! Since we have old systems I make this a Kconfig option. Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: remove task argument to audit_set_loginuidEric Paris3-5/+5
The function always deals with current. Don't expose an option pretending one can use it for something. You can't. Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: allow audit matching on inode gidEric Paris3-0/+14
Much like the ability to filter audit on the uid of an inode collected, we should be able to filter on the gid of the inode. Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: allow matching on obj_uidEric Paris3-0/+14
Allow syscall exit filter matching based on the uid of the owner of an inode used in a syscall. aka: auditctl -a always,exit -S open -F obj_uid=0 -F perm=wa Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: remove audit_finish_fork as it can't be calledEric Paris3-24/+0
Audit entry,always rules are not allowed and are automatically changed in exit,always rules in userspace. The kernel refuses to load such rules. Thus a task in the middle of a syscall (and thus in audit_finish_fork()) can only be in one of two states: AUDIT_BUILD_CONTEXT or AUDIT_DISABLED. Since the current task cannot be in AUDIT_RECORD_CONTEXT we aren't every going to actually use the code in audit_finish_fork() since it will return without doing anything. Thus drop the code. Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: reject entry,always rulesEric Paris1-2/+4
We deprecated entry,always rules a long time ago. Reject those rules as invalid. Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: inline audit_free to simplify the look of generic codeEric Paris3-4/+8
make the conditional a static inline instead of doing it in generic code. Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: drop audit_set_macxattr as it doesn't do anythingEric Paris1-2/+0
unused. deleted. Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: inline checks for not needing to collect aux recordsEric Paris2-15/+23
A number of audit hooks make function calls before they determine that auxilary records do not need to be collected. Do those checks as static inlines since the most common case is going to be that records are not needed and we can skip the function call overhead. Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: drop some potentially inadvisable likely notationsEric Paris1-6/+6
The audit code makes heavy use of likely() and unlikely() macros, but they don't always make sense. Drop any that seem questionable and let the computer do it's thing. Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: remove AUDIT_SETUP_CONTEXT as it isn't usedEric Paris1-5/+1
Audit contexts have 3 states. Disabled, which doesn't collect anything, build, which collects info but might not emit it, and record, which collects and emits. There is a 4th state, setup, which isn't used. Get rid of it. Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: inline audit_syscall_entry to reduce burden on archsEric Paris16-86/+72
Every arch calls: if (unlikely(current->audit_context)) audit_syscall_entry() which requires knowledge about audit (the existance of audit_context) in the arch code. Just do it all in static inline in audit.h so that arch's can remain blissfully ignorant. Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: ia32entry.S sign extend error codes when calling 64 bit codeEric Paris1-1/+3
In the ia32entry syscall exit audit fastpath we have assembly code which calls __audit_syscall_exit directly. This code was, however, zeroes the upper 32 bits of the return code. It then proceeded to call code which expects longs to be 64bits long. In order to handle code which expects longs to be 64bit we sign extend the return code if that code is an error. Thus the __audit_syscall_exit function can correctly handle using the values in snprintf("%ld"). This fixes the regression introduced in 5cbf1565f29eb57a86a. Old record: type=SYSCALL msg=audit(1306197182.256:281): arch=40000003 syscall=192 success=no exit=4294967283 New record: type=SYSCALL msg=audit(1306197182.256:281): arch=40000003 syscall=192 success=no exit=-13 Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: H. Peter Anvin <hpa@zytor.com>
2012-01-17Audit: push audit success and retcode into arch ptrace.hEric Paris26-74/+132
The audit system previously expected arches calling to audit_syscall_exit to supply as arguments if the syscall was a success and what the return code was. Audit also provides a helper AUDITSC_RESULT which was supposed to simplify things by converting from negative retcodes to an audit internal magic value stating success or failure. This helper was wrong and could indicate that a valid pointer returned to userspace was a failed syscall. The fix is to fix the layering foolishness. We now pass audit_syscall_exit a struct pt_reg and it in turns calls back into arch code to collect the return value and to determine if the syscall was a success or failure. We also define a generic is_syscall_success() macro which determines success/failure based on if the value is < -MAX_ERRNO. This works for arches like x86 which do not use a separate mechanism to indicate syscall failure. We make both the is_syscall_success() and regs_return_value() static inlines instead of macros. The reason is because the audit function must take a void* for the regs. (uml calls theirs struct uml_pt_regs instead of just struct pt_regs so audit_syscall_exit can't take a struct pt_regs). Since the audit function takes a void* we need to use static inlines to cast it back to the arch correct structure to dereference it. The other major change is that on some arches, like ia64, MIPS and ppc, we change regs_return_value() to give us the negative value on syscall failure. THE only other user of this macro, kretprobe_example.c, won't notice and it makes the value signed consistently for the audit functions across all archs. In arch/sh/kernel/ptrace_64.c I see that we were using regs[9] in the old audit code as the return value. But the ptrace_64.h code defined the macro regs_return_value() as regs[3]. I have no idea which one is correct, but this patch now uses the regs_return_value() function, so it now uses regs[3]. For powerpc we previously used regs->result but now use the regs_return_value() function which uses regs->gprs[3]. regs->gprs[3] is always positive so the regs_return_value(), much like ia64 makes it negative before calling the audit code when appropriate. Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: H. Peter Anvin <hpa@zytor.com> [for x86 portion] Acked-by: Tony Luck <tony.luck@intel.com> [for ia64] Acked-by: Richard Weinberger <richard@nod.at> [for uml] Acked-by: David S. Miller <davem@davemloft.net> [for sparc] Acked-by: Ralf Baechle <ralf@linux-mips.org> [for mips] Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [for ppc]
2012-01-17seccomp: audit abnormal end to a process due to seccompEric Paris3-21/+39
The audit system likes to collect information about processes that end abnormally (SIGSEGV) as this may me useful intrusion detection information. This patch adds audit support to collect information when seccomp forces a task to exit because of misbehavior in a similar way. Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: check current inode and containing object when filtering on major and ↵Eric Paris1-10/+14
minor The audit system has the ability to filter on the major and minor number of the device containing the inode being operated upon. Lets say that /dev/sda1 has major,minor 8,1 and that we mount /dev/sda1 on /boot. Now lets say we add a watch with a filter on 8,1. If we proceed to open an inode inside /boot, such as /vboot/vmlinuz, we will match the major,minor filter. Lets instead assume that one were to use a tool like debugfs and were to open /dev/sda1 directly and to modify it's contents. We might hope that this would also be logged, but it isn't. The rules will check the major,minor of the device containing /dev/sda1. In other words the rule would match on the major/minor of the tmpfs mounted at /dev. I believe these rules should trigger on either device. The man page is devoid of useful information about the intended semantics. It only seems logical that if you want to know everything that happened on a major,minor that would include things that happened to the device itself... Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: drop the meaningless and format breaking word 'user'Eric Paris1-1/+1
userspace audit messages look like so: type=USER msg=audit(1271170549.415:24710): user pid=14722 uid=0 auid=500 ses=1 subj=unconfined_u:unconfined_r:auditctl_t:s0-s0:c0.c1023 msg='' That third field just says 'user'. That's useless and doesn't follow the key=value pair we are trying to enforce. We already know it came from the user based on the record type. Kill that word. Die. Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: dynamically allocate audit_names when not enough space is in the ↵Eric Paris1-188/+215
names array This patch does 2 things. First it reduces the number of audit_names allocated in every audit context from 20 to 5. 5 should be enough for all 'normal' syscalls (rename being the worst). Some syscalls can still touch more the 5 inodes such as mount. When rpc filesystem is mounted it will create inodes and those can exceed 5. To handle that problem this patch will dynamically allocate audit_names if it needs more than 5. This should decrease the typicall memory usage while still supporting all the possible kernel operations. Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17audit: make filetype matching consistent with other filtersEric Paris2-12/+11
Every other filter that matches part of the inodes list collected by audit will match against any of the inodes on that list. The filetype matching however had a strange way of doing things. It allowed userspace to indicated if it should match on the first of the second name collected by the kernel. Name collection ordering seems like a kernel internal and making userspace rules get that right just seems like a bad idea. As it turns out the userspace audit writers had no idea it was doing this and thus never overloaded the value field. The kernel always checked the first name collected which for the tested rules was always correct. This patch just makes the filetype matching like the major, minor, inode, and LSM rules in that it will match against any of the names collected. It also changes the rule validation to reject the old unused rule types. Noone knew it was there. Noone used it. Why keep around the extra code? Signed-off-by: Eric Paris <eparis@redhat.com>
2012-01-17xfs: cleanup xfs_file_aio_writeChristoph Hellwig1-45/+37
With all the size field updates out of the way xfs_file_aio_write can be further simplified by pushing all iolock handling into xfs_file_dio_aio_write and xfs_file_buffered_aio_write and using the generic generic_write_sync helper for synchronous writes. Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com>
2012-01-17xfs: always return with the iolock held from xfs_file_aio_write_checksChristoph Hellwig1-3/+4
While xfs_iunlock is fine with 0 lockflags the calling conventions are much cleaner if xfs_file_aio_write_checks never returns without the iolock held. Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com>
2012-01-17xfs: remove the i_new_size field in struct xfs_inodeChristoph Hellwig5-92/+30
Now that we use the VFS i_size field throughout XFS there is no need for the i_new_size field any more given that the VFS i_size field gets updated in ->write_end before unlocking the page, and thus is always uptodate when writeback could see a page. Removing i_new_size also has the advantage that we will never have to trim back di_size during a failed buffered write, given that it never gets updated past i_size. Note that currently the generic direct I/O code only updates i_size after calling our end_io handler, which requires a small workaround to make sure di_size actually makes it to disk. I hope to fix this properly in the generic code. A downside is that we lose the support for parallel non-overlapping O_DIRECT appending writes that recently was added. I don't think keeping the complex and fragile i_new_size infrastructure for this is a good tradeoff - if we really care about parallel appending writers we should investigate turning the iolock into a range lock, which would also allow for parallel non-overlapping buffered writers. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com>
2012-01-17xfs: remove the i_size field in struct xfs_inodeChristoph Hellwig12-82/+56
There is no fundamental need to keep an in-memory inode size copy in the XFS inode. We already have the on-disk value in the dinode, and the separate in-memory copy that we need for regular files only in the XFS inode. Remove the xfs_inode i_size field and change the XFS_ISIZE macro to use the VFS inode i_size field for regular files. Switch code that was directly accessing the i_size field in the xfs_inode to XFS_ISIZE, or in cases where we are limited to regular files direct access of the VFS inode i_size field. This also allows dropping some fairly complicated code in the write path which dealt with keeping the xfs_inode i_size uptodate with the VFS i_size that is getting updated inside ->write_end. Note that we do not bother resetting the VFS i_size when truncating a file that gets freed to zero as there is no point in doing so because the VFS inode is no longer in use at this point. Just relax the assert in xfs_ifree to only check the on-disk size instead. Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com>
2012-01-17xfs: replace i_pin_wait with a bit waitqueueChristoph Hellwig4-9/+24
Replace i_pin_wait, which is only used during synchronous inode flushing with a bit waitqueue. This trades off a much smaller inode against slightly slower wakeup performance, and saves 12 (32-bit) or 20 (64-bit) bytes in the XFS inode. Reviewed-by: Alex Elder <aelder@sgi.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com>
2012-01-17xfs: replace i_flock with a sleeping bitlockChristoph Hellwig6-46/+76
We almost never block on i_flock, the exception is synchronous inode flushing. Instead of bloating the inode with a 16/24-byte completion that we abuse as a semaphore just implement it as a bitlock that uses a bit waitqueue for the rare sleeping path. This primarily is a tradeoff between a much smaller inode and a faster non-blocking path vs faster wakeups, and we are much better off with the former. A small downside is that we will lose lockdep checking for i_flock, but given that it's always taken inside the ilock that should be acceptable. Note that for example the inode writeback locking is implemented in a very similar way. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Alex Elder <aelder@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
2012-01-17xfs: make i_flags an unsigned longChristoph Hellwig1-1/+1
To be used for bit wakeup i_flags needs to be an unsigned long or we'll run into trouble on big endian systems. Because of the 1-byte i_update field right after it this actually causes a fairly large size increase on its own (4 or 8 bytes), but that increase will be more than offset by the next two patches. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Alex Elder <aelder@sgi.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com>
2012-01-17xfs: remove the if_ext_max field in struct xfs_iforkChristoph Hellwig8-115/+81
We spent a lot of effort to maintain this field, but it always equals to the fork size divided by the constant size of an extent. The prime use of it is to assert that the two stay in sync. Just divide the fork size by the extent size in the few places that we actually use it and remove the overhead of maintaining it. Also introduce a few helpers to consolidate the places where we actually care about the value. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com>
2012-01-17inetpeer: initialize ->redirect_genid in inet_getpeer()Dan Carpenter1-0/+1
kmemcheck complains that ->redirect_genid doesn't get initialized. Presumably it should be set to zero. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17net: fix NULL-deref in WARN() in skb_gso_segment()Michał Mirosław1-2/+3
Bug was introduced in commit c8f44affb7244f2ac3e703cab13d55ede27621bb. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17net: WARN if skb_checksum_help() is called on skb requiring segmentationBen Hutchings1-12/+19
skb_checksum_help() has never done anything useful with skbs that require segmentation. Setting skb->ip_summed = CHECKSUM_NONE makes them invalid and provokes a later WARNing in skb_gso_segment(). Passing such an skb to skb_checksum_help() indicates a bug, so we should warn about it immediately. Move the warning from skb_gso_segment() into a shared function, and add gso_type and gso_size to it. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17Merge branch 'for-linus' of git://git.kernel.dk/linux-blockLinus Torvalds1-4/+3
* 'for-linus' of git://git.kernel.dk/linux-block: cfq-iosched: fix use-after-free of cfqq
2012-01-17cfq-iosched: fix use-after-free of cfqqJens Axboe1-4/+3
With the changes in life time management between the cfq IO contexts and the cfq queues, we now risk having cfqd->active_queue being freed when cfq_slice_expired() is being called. cfq_preempt_queue() caches this queue and uses it after calling said function, causing a use-after-free condition. This triggers the following oops, when cfqq_type() attempts to dereference it: BUG: unable to handle kernel paging request at ffff8800746c4f0c IP: [<ffffffff81266d59>] cfqq_type+0xb/0x20 PGD 18d4063 PUD 1fe15067 PMD 1ffb9067 PTE 80000000746c4160 Oops: 0000 [#1] SMP DEBUG_PAGEALLOC CPU 3 Modules linked in: Pid: 1, comm: init Not tainted 3.2.0-josef+ #367 Bochs Bochs RIP: 0010:[<ffffffff81266d59>] [<ffffffff81266d59>] cfqq_type+0xb/0x20 RSP: 0018:ffff880079c11778 EFLAGS: 00010046 RAX: 0000000000000000 RBX: ffff880076f3df08 RCX: 0000000000000000 RDX: 0000000000000006 RSI: ffff880074271888 RDI: ffff8800746c4f08 RBP: ffff880079c11778 R08: 0000000000000078 R09: 0000000000000001 R10: 09f911029d74e35b R11: 09f911029d74e35b R12: ffff880076f337f0 R13: ffff8800746c4f08 R14: ffff8800746c4f08 R15: 0000000000000002 FS: 00007f62fd44f700(0000) GS:ffff88007cd80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff8800746c4f0c CR3: 0000000076c21000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process init (pid: 1, threadinfo ffff880079c10000, task ffff880079c0a040) Stack: ffff880079c117c8 ffffffff812683d8 ffff880079c117a8 ffffffff8125de43 ffff8800744fcf48 ffff880074b43e98 ffff8800770c8828 ffff880074b43e98 0000000000000003 0000000000000000 ffff880079c117f8 ffffffff81254149 Call Trace: [<ffffffff812683d8>] cfq_insert_request+0x3f5/0x47c [<ffffffff8125de43>] ? blk_recount_segments+0x20/0x31 [<ffffffff81254149>] __elv_add_request+0x1ca/0x200 [<ffffffff8125aa99>] blk_queue_bio+0x2ef/0x312 [<ffffffff81258f7b>] generic_make_request+0x9f/0xe0 [<ffffffff8125907b>] submit_bio+0xbf/0xca [<ffffffff81136ec7>] submit_bh+0xdf/0xfe [<ffffffff81176d04>] ext3_bread+0x50/0x99 [<ffffffff811785b3>] dx_probe+0x38/0x291 [<ffffffff81178864>] ext3_dx_find_entry+0x58/0x219 [<ffffffff81178ad5>] ext3_find_entry+0xb0/0x406 [<ffffffff8110c4d5>] ? cache_alloc_debugcheck_after.isra.46+0x14d/0x1a0 [<ffffffff8110cfbd>] ? kmem_cache_alloc+0xef/0x191 [<ffffffff8117a330>] ext3_lookup+0x39/0xe1 [<ffffffff81119461>] d_alloc_and_lookup+0x45/0x6c [<ffffffff8111ac41>] do_lookup+0x1e4/0x2f5 [<ffffffff8111aef6>] link_path_walk+0x1a4/0x6ef [<ffffffff8111b557>] path_lookupat+0x59/0x5ea [<ffffffff8127406c>] ? __strncpy_from_user+0x30/0x5a [<ffffffff8111bce0>] do_path_lookup+0x23/0x59 [<ffffffff8111cfd6>] user_path_at_empty+0x53/0x99 [<ffffffff8107b37b>] ? remove_wait_queue+0x51/0x56 [<ffffffff8111d02d>] user_path_at+0x11/0x13 [<ffffffff811141f5>] vfs_fstatat+0x3a/0x64 [<ffffffff8111425a>] vfs_stat+0x1b/0x1d [<ffffffff81114359>] sys_newstat+0x1a/0x33 [<ffffffff81060e12>] ? task_stopped_code+0x42/0x42 [<ffffffff815d6712>] system_call_fastpath+0x16/0x1b Code: 89 e6 48 89 c7 e8 fa ca fe ff 85 c0 74 06 4c 89 2b 41 b6 01 5b 44 89 f0 41 5c 41 5d 41 5e 5d c3 55 48 89 e5 66 66 66 66 90 31 c0 <8b> 57 04 f6 c6 01 74 0b 83 e2 20 83 fa 01 19 c0 83 c0 02 5d c3 RIP [<ffffffff81266d59>] cfqq_type+0xb/0x20 RSP <ffff880079c11778> CR2: ffff8800746c4f0c Get rid of the caching of cfqd->active_queue, and reorder the check so that it happens before we expire the active queue. Thanks to Tejun for pin pointing the error location. Reported-by: Chris Mason <chris.mason@oracle.com> Tested-by: Chris Mason <chris.mason@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-01-17x86, opcode: ANDN and Group 17 in x86-opcode-map.txtUlrich Drepper1-2/+2
The Intel documentation at http://software.intel.com/file/36945 shows the ANDN opcode and Group 17 with encoding f2 and f3 encoding respectively. The current version of x86-opcode-map.txt shows them with f3 and f4. Unless someone can point to documentation which shows the currently used encoding the following patch be applied. Signed-off-by: Ulrich Drepper <drepper@gmail.com> Link: http://lkml.kernel.org/r/CAOPLpQdq5SuVo9=023CYhbFLAX9rONyjmYq7jJkqc5xwctW5eA@mail.gmail.com Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2012-01-17Merge branch 'stable/for-linus-fixes-3.3' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen * 'stable/for-linus-fixes-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: xen/balloon: Move the registration from device to subsystem.
2012-01-17ACPI processor: Remove unneeded cpuidle_unregister_driver callThomas Renninger1-2/+0
Since commit 46bcfad7a819bd17ac4e831b04405152d59784ab registering and unregistering cpuidle is done in processor_idle.c. Unregistering via: acpi_bus_unregister_driver(&acpi_processor_driver) -> acpi_processor_remove() -> acpi_processor_power_exit() Remove not needed cpuidle_unregister_driver() call from acpi_processor_exit Signed-off-by: Thomas Renninger <trenn@suse.de> CC: Deepthi Dharwar <deepthi@linux.vnet.ibm.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17intel idle: Make idle driver more robustThomas Renninger1-1/+2
kvm -cpu host passes the original cpuid info to the guest. Latest kvm version seem to return true for mwait_leaf cpuid function on recent Intel CPUs. But it does not return mwait C-states (mwait_substates), instead zero is returned. While real CPUs seem to always return non-zero values, the intel idle driver should not get active in kvm (mwait_substates == 0) case and bail out. Otherwise a Null pointer exception will happen later when the cpuidle subsystem tries to get active: [0.984807] BUG: unable to handle kernel NULL pointer dereference at (null) [0.984807] IP: [<(null)>] (null) ... [0.984807][<ffffffff8143cf34>] ? cpuidle_idle_call+0xb4/0x340 [0.984807][<ffffffff8159e7bc>] ? __atomic_notifier_call_chain+0x4c/0x70 [0.984807][<ffffffff81001198>] ? cpu_idle+0x78/0xd0 Reference: https://bugzilla.novell.com/show_bug.cgi?id=726296 Cc: stable@vger.kernel.org Signed-off-by: Thomas Renninger <trenn@suse.de> CC: Bruno Friedmann <bruno@ioda-net.ch> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17intel_idle: Fix a cast to pointer from integer of different size warning in ↵David Howells1-1/+1
intel_idle Fix the following warning: drivers/idle/intel_idle.c: In function 'intel_idle_cpuidle_devices_init': drivers/idle/intel_idle.c:518:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] By making get_driver_data() return a long instead of an int. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPI: kernel-parameters.txt : Add intel_idle.max_cstateMasanari Iida1-0/+5
Add missing intel_idle.max_cstate in kernel-parameters.txt Signed-off-by Masanari Iida <standby24x7@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17intel_idle: remove redundant local_irq_disable() callYanmin Zhang1-2/+1
irq disabling happens earlier in process_32.c:cpu_idle. Basically, cpuidle_state->enter is called, cpu irq is disabled. cpuidle_state->enter would turn on irq when exiting. intel_idle doesn't follow this assumption. Although it doesn't cause real issue, it misleads developers. Remove the call to local_irq_disable() at entry. [akpm@linux-foundation.org: add comment] Signed-off-by: Mingming Zhang <mingmingx.zhang@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblazeLinus Torvalds2-2/+21
* 'next' of git://git.monstr.eu/linux-2.6-microblaze: USB: EHCI: Don't use NO_IRQ in xilinx ehci driver microblaze: Add topology init
2012-01-17Merge branch 'for-linus' of ↵Linus Torvalds7-17/+15
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: virtuoso: Xonar DS: fix polarity of front output ALSA: Au88x0 - Reduce the number of playback subdevices of au8830 from 32 to 16 ALSA: Au88x0 - Support 4 channels playback when AC97 codecs has SDAC bit ALSA: HDA: Fix internal microphone on Dell Studio 16 XPS 1645 ALSA: Don't prompt for CONFIG_SND_COMPRESS_OFFLOAD ALSA: HDA: Use LPIB position fix for Macbook Pro 7,1
2012-01-17tty: remove unused tty_driver->termios_lockedKonstantin Khlebnikov1-1/+0
This field is unused since 2.6.28 (commit fe6e29fdb1a7: "tty: simplify ktermios allocation", to be exact) Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-17[media] dvb_frontend: Don't call get_frontend() if idleMauro Carvalho Chehab1-2/+8
If the frontend is in idle state, don't call get_frontend. Calling get_frontend() when the device is not tuned may result in wrong parameters to be returned to the userspace. I was tempted to not call get_frontend() at all, except inside the dvb frontend thread, but this won't work for all cases. The ISDB-T specs (ABNT NBR 15601 and ARIB STD-B31) allow the broadcaster to dynamically change the channel specs at runtime. That means that an ISDB-T optimized application may want/need to monitor the TMCC tables, decoded at the frontends via get_frontend call. So, let's do the simpler change here. Eventually, the logic could be changed to work only if the device is tuned and has lock, but, even so, the lock is also standard-dependent. For ISDB-T, the right lock to wait is that the demod has TMCC lock. So, drivers may need to implement some logic to detect if the get_frontend info was retrieved or not. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17Revert "capabitlies: ns_capable can use the cap helpers rather than lsm call"Linus Torvalds1-1/+1
This reverts commit d2a7009f0bb03fa22ad08dd25472efa0568126b9. J. R. Okajima explains: "After this commit, I am afraid access(2) on NFS may not work correctly. The scenario based upon my guess. - access(2) overrides the credentials. - calls inode_permission() -- ... -- generic_permission() -- ns_capable(). - while the old ns_capable() calls security_capable(current_cred()), the new ns_capable() calls has_ns_capability(current) -- security_capable(__task_cred(t)). current_cred() returns current->cred which is effective (overridden) credentials, but __task_cred(current) returns current->real_cred (the NFSD's credential). And the overridden credentials by access(2) lost." Requested-by: J. R. Okajima <hooanon05@yahoo.co.jp> Acked-by: Eric Paris <eparis@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-17Merge branch 'master' of ↵David S. Miller20-112/+108
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
2012-01-17ASoC: Wait for WM8993 FLL to stabiliseMark Brown1-0/+6
Ensure the FLL is locked before we return from set_fll(). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-17caif: Remove bad WARN_ON in caif_devsjur.brandeland@stericsson.com1-7/+9
Remove WARN_ON and bad handling of SKB without destructor callback in caif_flow_cb. SKB without destructor cannot be handled as an error case. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17caif: Fix typo in Vendor/Product-ID for CAIF modemssjur.brandeland@stericsson.com1-1/+1
Fix typo for the Vendor/Product Id for ST-Ericsson CAIF modems. Discovery is based on fixed USB vendor 0x04cc (ST-Ericsson), product-id 0x230f (NCM). Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17bnx2x: Disable AN KR work-around for BCM57810Yaniv Rosner1-1/+9
Disable the work-around for the autoneg KR of the BCM57810 in case the Warpcore version is 0xD108 and above, which fixes this problem. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17bnx2x: Remove AutoGrEEEn for BCM84833Yaniv Rosner1-6/+2
Disable the autoGrEEEn feature for BCM84833. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17bnx2x: Remove 100Mb force speed for BCM84833Yaniv Rosner2-6/+21
Remove unsupported speed of 100Mb force for BCM84833 due to hardware limitation. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17bnx2x: Fix PFC setting on BCM57840Yaniv Rosner2-10/+13
This patch handles the second port of a path in a 4-port device of BCM57840. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17bnx2x: Fix Super-Isolate mode for BCM84833Yaniv Rosner1-113/+137
The Super-Isolate mode comes to isolate the BCM84833 PHY from the outside world. Not doing it correctly, made link partner see the link before the driver was loaded. This patch also involves SPIROM version fixes since it is used to determine whether the common init of the PHY was already executed, and the common init of this PHY is partially responsible for setting the Super-Isolate mode. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17net: fix some sparse errorsEric Dumazet6-21/+22
make C=2 CF="-D__CHECK_ENDIAN__" M=net And fix flowi4_init_output() prototype for sport Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17net: kill duplicate included headerShan Wei3-3/+0
For net part, remove duplicate included header. Signed-off-by: Shan Wei <davidshan@tencent.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17net: sh-eth: Fix build error by the value which is not definedNobuhiro Iwamatsu1-1/+1
----- drivers/net/ethernet/renesas/sh_eth.c:1706: error: 'pdid' undeclared (first use in this function) drivers/net/ethernet/renesas/sh_eth.c:1706: error: (Each undeclared identifier is reported only once drivers/net/ethernet/renesas/sh_eth.c:1706: error: for each function it appears in.) make[5]: *** [drivers/net/ethernet/renesas/sh_eth.o] Error 1 ----- Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> CC: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17net: Use device model to get driver name in skb_gso_segment()Ben Hutchings1-4/+4
ethtool operations generally require the caller to hold RTNL and are not safe to call in atomic context. The device model provides this information for most devices; we'll only lose it for some old ISA drivers. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17bridge: BH already disabled in br_fdb_cleanup()Eric Dumazet1-2/+2
br_fdb_cleanup() is run from timer interrupt, BH already masked. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Stephen Hemminger <shemminger@vyatta.com> CC: Štefan Gula <steweg@gmail.com> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17net: move sock_update_memcg outside of CONFIG_INETGlauber Costa1-1/+1
Although only used currently for tcp sockets, this function is now used in common sock code (for sock_clone()) Commit 475f1b52645a29936b9df1d8fcd45f7e56bd4a9f moved the declaration of sock_update_clone() to inside sock.c, but this only fixes the problem when CONFIG_CGROUP_MEM_RES_CTLR_KMEM is also not defined. This patch here is verified to fix both problems, although reverting the previous one is not necessary. Signed-off-by: Glauber Costa <glommer@parallels.com> CC: David S. Miller <davem@davemloft.net> CC: Stephen Rothwell <sfr@canb.auug.org.au> Reported-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17mwl8k: Fixing Sparse ENDIAN CHECK warningYogesh Ashok Powar1-1/+1
Fixing following sparse warning >drivers/net/wireless/mwl8k.c:2780:15: warning: incorrect type in assignment (different base types) >drivers/net/wireless/mwl8k.c:2780:15: expected restricted unsigned short [usertype] channel >drivers/net/wireless/mwl8k.c:2780:15: got unsigned short [unsigned] [usertype] hw_value Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-17mac80211: Fix possible race between sta_unblock and network softirqHelmut Schaa1-2/+4
All other code paths in sta_unblock synchronize with the network softirq by using local_bh_disable/enable. Do the same around ieee80211_sta_ps_deliver_wakeup. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-17mwl8k: fix condition in mwl8k_cmd_encryption_remove_key()Dan Carpenter1-1/+1
The intent here was to check whether key->cipher was WEP40 or WEP104. We do a similar check correctly in several other places in this file. The current condition is always true. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-17brcmfmac: work-around gcc 4.7 build issueAlexandre Oliva1-1/+1
Alexandre Oliva <oliva@lsd.ic.unicamp.br> says: "It's an issue brought about by GCC 4.7's partial-inlining, that ends up splitting the udelay function just at the wrong spot, in such a way that some sanity checks for constants fails, and we end up calling bad_udelay. This patch fixes the problem. Feel free to push it upstream if it makes sense to you." Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-17net: remove version.h includes in net/openvswitch/Devendra Naga4-4/+0
remove version.h includes in net/openswitch/ as reported by make versioncheck. Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17bql: Fix inconsistency between file mode and attr method.Hiroaki SHIMODA1-1/+1
There is no store() method for inflight attribute in the tx-<n>/byte_queue_limits sysfs directory. So remove S_IWUSR bit. Signed-off-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17ehea: make some functions and variables staticThadeu Lima de Souza Cascardo3-25/+23
Some functions and variables in ehea are only used in their own file, so they should be static. One particular function had a very generic name, print_error_data. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17brcmsmac: remove PCI suspend/resume from bcma driverLinus Torvalds1-35/+3
The brcmsmac driver isn't a PCI driver any more, it's a bcma one. The PCI device has been resumed by the PCI driver (the generic PCI layer, really), we should be resuming just our own driver state. Also add pr_debug() calls to show that we now actually get the suspend/resume events. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-17bcma: connect the bcma bus suspend/resume to the bcma driver suspend/resumeLinus Torvalds3-2/+21
Now the low-level driver actually gets informed that it is getting suspended and resumed. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-17bcma: add stub for bcma_bus_suspend()Linus Torvalds3-1/+7
.. and connect it up with the pci host bcma driver. Now, the next step is to connect those bcma bus-level suspend/resume functions to the actual bcma device suspend resume functions. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-17bcma: convert suspend/resume to pm_opsLinus Torvalds1-26/+16
.. and avoid doing the unnecessary PCI operations - the PCI layer will do them for us. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-17[media] DocBook/dvbproperty.xml: Remove DTV_MODULATION from ISDB-TMauro Carvalho Chehab1-1/+0
On ISDB-T, each layer can have its own independent modulation, applied to the carriers that belong to the segments associated with them. So, there's no sense to define a global modulation parameter. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17[media] DocBook/dvbproperty.xml: Fix ISDB-T delivery system parametersMauro Carvalho Chehab1-3/+0
The ISDB-T differs on its way to implement the hierarchical transmissions: instead of using a low-priority/high-priority FEC codes, it does that by using different layers, each layer with their groups of segments. So, those parameters don't make sense for ISDB-T. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17[media] DocBook/dvbproperty.xml: Fix the units for DTV_FREQUENCYMauro Carvalho Chehab1-3/+5
The units for DTV_FREQUENCY are kHz for satellital delivery systems (DVB-S/DVB-S2/DVB-TURBO/ISDB-S). Fix it at the API spec. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17ACPI processor: Fix error path, also remove sysdev linkThomas Renninger1-0/+1
Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPI: processor: fix acpi_get_cpuid for UP processorLin Ming1-2/+24
For UP processor, it is likely that no _MAT method or MADT table defined. So currently acpi_get_cpuid(...) always return -1 for UP processor. This is wrong. It should return valid value for CPU0. In the other hand, BIOS may define multiple CPU handles even for UP processor, for example Scope (_PR) { Processor (CPU0, 0x00, 0x00000410, 0x06) {} Processor (CPU1, 0x01, 0x00000410, 0x06) {} Processor (CPU2, 0x02, 0x00000410, 0x06) {} Processor (CPU3, 0x03, 0x00000410, 0x06) {} } We should only return valid value for CPU0's acpi handle. And return invalid value for others. http://marc.info/?t=132329819900003&r=1&w=2 Cc: stable@vger.kernel.org Reported-and-tested-by: wallak@free.fr Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17intel_idle: fix API misuseShaohua Li1-3/+3
smp_call_function() only lets all other CPUs execute a specific function, while we expect all CPUs do in intel_idle. Without the fix, we could have one cpu which has auto_demotion enabled or has no broadcast timer setup. Usually we don't see impact because auto demotion just harms power and the intel_idle init is called in CPU 0, where boradcast timer delivers interrupt, but this still could be a problem. Cc: stable@vger.kernel.org Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17netfilter: ipset: dumping error triggered removing references twiceJozsef Kadlecsik1-0/+1
If there was a dumping error in the middle, the set-specific variable was not zeroed out and thus the 'done' function of the dumping wrongly tried to release the already released reference of the set. The already released reference was caught by __ip_set_put and triggered a kernel BUG message. Reported by Jean-Philippe Menil. Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2012-01-17netfilter: ipset: autoload set type modules safelyJozsef Kadlecsik1-10/+26
Jan Engelhardt noticed when userspace requests a set type unknown to the kernel, it can lead to a loop due to the unsafe type module loading. The issue is fixed in this patch. Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2012-01-17x86/kconfig: Move the ZONE_DMA entry under a menuRandy Dunlap1-10/+10
Move the ZONE_DMA kconfig symbol under a menu item instead of having it listed before everything else in "make {xconfig | gconfig | nconfig | menuconfig}". This drops the first line of the top-level kernel config menu (in 3.2) below and moves it under "Processor type and features". [*] DMA memory allocation support General setup ---> [*] Enable loadable module support ---> [*] Enable the block layer ---> Processor type and features ---> Power management and ACPI options ---> Bus options (PCI etc.) ---> Executable file formats / Emulations ---> Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: David Rientjes <rientjes@google.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: linux-mm@kvack.org <linux-mm@kvack.org> Link: http://lkml.kernel.org/r/4F14811E.6090107@xenotime.net Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: David Rientjes <rientjes@google.com>
2012-01-17ACPI APEI: Convert atomicio routinesMyron Stowe3-11/+104
APEI needs memory access in interrupt context. The obvious choice is acpi_read(), but originally it couldn't be used in interrupt context because it makes temporary mappings with ioremap(). Therefore, we added drivers/acpi/atomicio.c, which provides: acpi_pre_map_gar() -- ioremap in process context acpi_atomic_read() -- memory access in interrupt context acpi_post_unmap_gar() -- iounmap Later we added acpi_os_map_generic_address() (2971852) and enhanced acpi_read() so it works in interrupt context as long as the address has been previously mapped (620242a). Now this sequence: acpi_os_map_generic_address() -- ioremap in process context acpi_read()/apei_read() -- now OK in interrupt context acpi_os_unmap_generic_address() is equivalent to what atomicio.c provides. This patch introduces apei_read() and apei_write(), which currently are functional equivalents of acpi_read() and acpi_write(). This is mainly proactive, to prevent APEI breakages if acpi_read() and acpi_write() are ever augmented to support the 'bit_offset' field of GAS, as APEI's __apei_exec_write_register() precludes splitting up functionality related to 'bit_offset' and APEI's 'mask' (see its APEI_EXEC_PRESERVE_REGISTER block). With apei_read() and apei_write() in place, usages of atomicio routines are converted to apei_read()/apei_write() and existing calls within osl.c and the CA, based on the re-factoring that was done in an earlier patch series - http://marc.info/?l=linux-acpi&m=128769263327206&w=2: acpi_pre_map_gar() --> acpi_os_map_generic_address() acpi_post_unmap_gar() --> acpi_os_unmap_generic_address() acpi_atomic_read() --> apei_read() acpi_atomic_write() --> apei_write() Note that acpi_read() and acpi_write() currently use 'bit_width' for accessing GARs which seems incorrect. 'bit_width' is the size of the register, while 'access_width' is the size of the access the processor must generate on the bus. The 'access_width' may be larger, for example, if the hardware only supports 32-bit or 64-bit reads. I wanted to minimize any possible impacts with this patch series so I did *not* change this behavior. Signed-off-by: Myron Stowe <myron.stowe@redhat.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPI: Export interfaces for ioremapping/iounmapping ACPI registersMyron Stowe2-2/+7
Export remapping and unmapping interfaces - acpi_os_map_generic_address() and acpi_os_unmap_generic_address() - for ACPI generic registers that are backed by memory mapped I/O (MMIO). The acpi_os_map_generic_address() and acpi_os_unmap_generic_address() declarations may more properly belong in include/acpi/acpiosxf.h next to acpi_os_read_memory() but I believe that would require the ACPI CA making them an official part of the ACPI CA - OS interface. ACPI Generic Address Structure (GAS) reference (ACPI's fixed/generic hardware registers use the GAS format): ACPI Specification, Revision 4.0, Section 5.2.3.1, "Generic Address Structure" Signed-off-by: Myron Stowe <myron.stowe@redhat.com> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPI: Fix possible alignment issues with GAS 'address' referencesMyron Stowe1-14/+24
Generic Address Structures (GAS) may reside within ACPI tables which are byte aligned. This patch copies GAS 'address' references to a local variable, which will be naturally aligned, to be used going forward. ACPI Generic Address Structure (GAS) reference: ACPI Specification, Revision 4.0, Section 5.2.3.1, "Generic Address Structure" Signed-off-by: Myron Stowe <myron.stowe@redhat.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPI, ia64: Use SRAT table rev to use 8bit or 16/32bit PXM fields (ia64)Kurt Garloff1-4/+6
In SRAT v1, we had 8bit proximity domain (PXM) fields; SRAT v2 provides 32bits for these. The new fields were reserved before. According to the ACPI spec, the OS must disregrard reserved fields. ia64 did handle the PXM fields almost consistently, but depending on sgi's sn2 platform. This patch leaves the sn2 logic in, but does also use 16/32 bits for PXM if the SRAT has rev 2 or higher. The patch also adds __init to the two pxm accessor functions, as they access __initdata now and are called from an __init function only anyway. Note that the code only uses 16 bits for the PXM field in the processor proximity field; the patch does not address this as 16 bits are more than enough. Signed-off-by: Kurt Garloff <kurt@garloff.de> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPI, x86: Use SRAT table rev to use 8bit or 32bit PXM fields (x86/x86-64)Kurt Garloff1-0/+4
In SRAT v1, we had 8bit proximity domain (PXM) fields; SRAT v2 provides 32bits for these. The new fields were reserved before. According to the ACPI spec, the OS must disregrard reserved fields. x86/x86-64 was rather inconsistent prior to this patch; it used 8 bits for the pxm field in cpu_affinity, but 32 bits in mem_affinity. This patch makes it consistent: Either use 8 bits consistently (SRAT rev 1 or lower) or 32 bits (SRAT rev 2 or higher). cc: x86@kernel.org Signed-off-by: Kurt Garloff <kurt@garloff.de> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPI: Store SRAT table revisionKurt Garloff2-0/+7
In SRAT v1, we had 8bit proximity domain (PXM) fields; SRAT v2 provides 32bits for these. The new fields were reserved before. According to the ACPI spec, the OS must disregrard reserved fields. In order to know whether or not, we must know what version the SRAT table has. This patch stores the SRAT table revision for later consumption by arch specific __init functions. Signed-off-by: Kurt Garloff <kurt@garloff.de> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPI, APEI, Resolve false conflict between ACPI NVS and APEIHuang Ying1-1/+28
Some firmware will access memory in ACPI NVS region via APEI. That is, instructions in APEI ERST/EINJ table will read/write ACPI NVS region. The original resource conflict checking in APEI code will check memory/ioport accessed by APEI via general resource management mech. But ACPI NVS region is marked as busy already, so that the false resource conflict will prevent APEI ERST/EINJ to work. To fix this, this patch excludes ACPI NVS regions when APEI components request resources. So that they will not conflict with ACPI NVS regions. Reported-and-tested-by: Pavel Ivanov <paivanof@gmail.com> Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPI, Record ACPI NVS regionsHuang Ying4-10/+70
Some firmware will access memory in ACPI NVS region via APEI. That is, instructions in APEI ERST/EINJ table will read/write ACPI NVS region. The original resource conflict checking in APEI code will check memory/ioport accessed by APEI via general resource management mechanism. But ACPI NVS region is marked as busy already, so that the false resource conflict will prevent APEI ERST/EINJ to work. To fix this, this patch record ACPI NVS regions, so that we can avoid request resources for memory region inside it. Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPI, APEI, EINJ, Refine the fix of resource conflictXiao, Hui1-6/+32
Current fix for resource conflict is to remove the address region <param1 & param2, ~param2+1> from trigger resource, which is highly relies on valid user input. This patch is trying to avoid such potential issues by fetching the exact address region from trigger action table entry. Signed-off-by: Xiao, Hui <hui.xiao@linux.intel.com> Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPI, APEI, EINJ, Fix resource conflict on some machineHuang Ying3-2/+36
Some APEI firmware implementation will access injected address specified in param1 to trigger the error when injecting memory error. This will cause resource conflict with RAM. On one of our testing machine, if injecting at memory address 0x10000000, the following error will be reported in dmesg: APEI: Can not request iomem region <0000000010000000-0000000010000008> for GARs. This patch removes the injecting memory address range from trigger table resources to avoid conflict. Signed-off-by: Huang Ying <ying.huang@intel.com> Tested-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPI, Add RAM mapping support to ACPI atomic IO supportHuang Ying1-4/+37
On one of our testing machine, the following EINJ command lines: # echo 0x10000000 > param1 # echo 0xfffffffffffff000 > param2 # echo 0x8 > error_type # echo 1 > error_inject Will get: echo: write error: Input/output error The EIO comes from: rc = apei_exec_pre_map_gars(&trigger_ctx); The root cause is as follow. Normally, ACPI atomic IO support is used to access IO memory. But in EINJ of that machine, it is used to access RAM to trigger the injected error. And the ioremap() called by apei_exec_pre_map_gars() can not map the RAM. This patch add RAM mapping support to ACPI atomic IO support to satisfy EINJ requirement. Signed-off-by: Huang Ying <ying.huang@intel.com> Tested-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPI, APEI, Printk queued error record before panicHuang Ying1-9/+44
Because printk is not safe inside NMI handler, the recoverable error records received in NMI handler will be queued to be printked in a delayed IRQ context via irq_work. If a fatal error occurs after the recoverable error and before the irq_work processed, we lost a error report. To solve the issue, the queued error records are printked in NMI handler if system will go panic. Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPI, APEI, GHES, Distinguish interleaved error report in kernel logHuang Ying1-5/+11
In most cases, printk only guarantees messages from different printk calling will not be interleaved between each other. But, one APEI GHES hardware error report will involve multiple printk calling, normally each for one line. So it is possible that the hardware error report comes from different generic hardware error source will be interleaved. In this patch, a sequence number is prefixed to each line of error report. So that, even if they are interleaved, they still can be distinguished by the prefixed sequence number. Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPI, APEI, Remove table not found messageHuang Ying3-9/+6
Because APEI tables are optional, these message may confuse users, for example, https://bugs.launchpad.net/ubuntu/+source/linux/+bug/599715 Reported-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPI, APEI, Print resource errors in conventional formatBjorn Helgaas2-9/+10
Use the normal %pR-like format for MMIO and I/O port ranges. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPI, APEI, GHES: Add PCIe AER recovery supportHuang Ying1-0/+23
aer_recover_queue() is called when recoverable PCIe AER errors are notified by firmware to do the recovery work. Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPI, Add 64bit read/write support to atomicio on i386Huang Ying1-6/+30
There is no 64bit read/write support in ACPI atomicio because readq/writeq is used to implement 64bit read/write, but readq/writeq is not available on i386. This patch implement 64bit read/write support in atomicio via two readl/writel. Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17Merge branch 'tip/perf/urgent-2' of ↵Ingo Molnar153-535/+938
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/urgent
2012-01-17ACPICA: Update to version 20120111Bob Moore1-1/+1
Version 20120111. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>