summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-11-19Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfsLinus Torvalds2-2/+4
* 'for-linus' of git://oss.sgi.com/xfs/xfs: MAINTAINERS: update XFS maintainer entry xfs: use doalloc flag in xfs_qm_dqattach_one()
2011-11-18Merge branch 'for-3.2-fixes' of ↵Linus Torvalds1-1/+2
git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup * 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: Replace Paul Menage with Tejun Heo as cgroups maintainer
2011-11-18Merge branch 'x86-urgent-for-linus' of ↵Linus Torvalds14-23/+121
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: random: Fix handing of arch_get_random_long in get_random_bytes() x86: Call stop_machine_text_poke() on all CPUs x86, ioapic: Only print ioapic debug information for IRQs belonging to an ioapic chip x86/mrst: Avoid reporting wrong nmi status x86/mrst: Add support for Penwell clock calibration x86/apic: Allow use of lapic timer early calibration result x86/apic: Do not clear nr_irqs_gsi if no legacy irqs x86/platform: Add a wallclock_init func to x86_platforms ops x86/mce: Make mce_chrdev_ops 'static const'
2011-11-18Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ideLinus Torvalds4-13/+29
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide: cy82c693: fix PCI device selection icside: DMA support fix IDE: Don't powerdown Compaq Triflex IDE device on suspend piix: ICH7 MWDMA1 errata
2011-11-18Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparcLinus Torvalds12-319/+159
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Patch sun4v code sequences properly on module load. sparc: Kill custom io_remap_pfn_range(). sparc: Stash orig_i0 into %g6 instead of %g2 sparc: Fix handling of orig_i0 wrt. debugging when restarting syscalls. sparc: sigutil: Include <linux/errno.h>
2011-11-18cgroup: Replace Paul Menage with Tejun Heo as cgroups maintainerPaul Menage1-1/+2
As is probably painfully obvious, I don't have time to be a cgroups maintainer. Rather than have me continue to hope that I'll magically find more spare time, instead Tejun has kindly agreed to take over the role, along with Li Zefan. -tj: added cgroup tree URL to MAINTAINERS file Signed-off-by: Paul Menage <paul@paulmenage.org> Acked-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Tejun Heo <tj@kernel.org> LKML-Reference: <1321320612-57855-1-git-send-email-paul@paulmenage.org>
2011-11-18MAINTAINERS: update XFS maintainer entryAlex Elder1-1/+2
I will no longer be maintaining XFS for SGI. Ben Myers (bpm@sgi.com) has agreed to be the primary maintainer for XFS in my place. I will continue to be able to push commits to the SGI XFS tree if required. As such I will continue to be a designated XFS maintainer, but plan to serve in more of a backup role. Signed-off-by: Alex Elder <aelder@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
2011-11-18Merge branch 'stable/for-linus-fixes-3.2' of ↵Linus Torvalds10-35/+36
git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen * 'stable/for-linus-fixes-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: xen-gntalloc: signedness bug in add_grefs() xen-gntalloc: integer overflow in gntalloc_ioctl_alloc() xen-gntdev: integer overflow in gntdev_alloc_map() xen:pvhvm: enable PVHVM VCPU placement when using more than 32 CPUs. xen/balloon: Avoid OOM when requesting highmem xen: Remove hanging references to CONFIG_XEN_PLATFORM_PCI xen: map foreign pages for shared rings by updating the PTEs directly
2011-11-18Merge branch 'for-linus' of git://git.kernel.dk/linux-blockLinus Torvalds13-128/+79
* 'for-linus' of git://git.kernel.dk/linux-block: block: add missed trace_block_plug paride: fix potential information leak in pg_read() bio: change some signed vars to unsigned block: avoid unnecessary plug list flush cciss: auto engage SCSI mid layer at driver load time loop: cleanup set_status interface include/linux/bio.h: use a static inline function for bio_integrity_clone() loop: prevent information leak after failed read block: Always check length of all iov entries in blk_rq_map_user_iov() The Windows driver .inf disables ASPM on all cciss devices. Do the same. backing-dev: ensure wakeup_timer is deleted block: Revert "[SCSI] genhd: add a new attribute "alias" in gendisk"
2011-11-18Merge branch 'unicore32' of git://github.com/gxt/linuxLinus Torvalds8-35/+22
* 'unicore32' of git://github.com/gxt/linux: unicore32, exec: remove redundant set_fs(USER_DS) unicore32: Fix typo 'PUV3_I2C' unicore32: drop unused Kconfig symbols rtc: rtc-puv3: Add __devinit and __devexit markers for probe and remove arch/unicore32: do not use EXTRA_AFLAGS or EXTRA_CFLAGS unicore32: fix build error for find bitops
2011-11-18Merge branch 'merge' of ↵Linus Torvalds27-119/+158
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc/signal32: Fix sigset_t conversion when copying to user powerpc: Fix atomic_xxx_return barrier semantics powerpc: Remove buggy 9-year-old test for binutils < 2.12.1 powerpc/book3e-64: Fix debug support for userspace powerpc: Remove extraneous CONFIG_PPC_ADV_DEBUG_REGS define powerpc: Revert show_regs() define for readability powerpc/ps3: Fix SMP lockdep boot warning powerpc/ps3: Fix lost SMP IPIs powerpc: Add hvcall.h include to book3s_hv.c powerpc/trace: Add a dummy stack frame for trace_hardirqs_off powerpc: Copy down exception vectors after feature fixups powerpc: panic if we can't instantiate RTAS powerpc/4xx: Fix typos in kexec config dependencies powerpc/fsl: MCU_MPC8349EMITX wants I2C built-in, modular won't do... powerpc/fsl_udc_core: Fix dumb typo carma-fpga: Missed switch from of_register_platform_driver() powerpc: Fix build breakage in jump_label.c
2011-11-18Merge branch 'for-linus' of git://git.selinuxproject.org/~jmorris/linux-securityLinus Torvalds4-80/+48
* 'for-linus' of git://git.selinuxproject.org/~jmorris/linux-security: encrypted-keys: module build fixes encrypted-keys: fix error return code Smack: smackfs cipso seq read repair
2011-11-17sparc64: Patch sun4v code sequences properly on module load.David S. Miller3-19/+63
Some of the sun4v code patching occurs in inline functions visible to, and usable by, modules. Therefore we have to patch them up during module load. Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-17sparc: Kill custom io_remap_pfn_range().David S. Miller5-273/+32
To handle the large physical addresses, just make a simple wrapper around remap_pfn_range() like MIPS does. Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-18Merge branch 'encrypted-key-fixes' of ↵James Morris3-4/+9
git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity into for-linus
2011-11-18Merge branch 'for-1111' of git://gitorious.org/smack-next/kernel into for-linusJames Morris1-76/+39
2011-11-17Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6Linus Torvalds5-6/+17
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: [SCSI] hpsa: Disable ASPM [SCSI] aacraid: controller hangs if kernel uses non-default ASPM policy [SCSI] mpt2sas: add missing allocation. [SCSI] Silencing 'killing requests for dead queue' [SCSI] fix WARNING: at drivers/scsi/scsi_lib.c:1704
2011-11-17Merge branch 'for-linus' of ↵Linus Torvalds7-65/+72
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: hda - Fix the connection selection of ADCs on Cirrus codecs ALSA: hda - Update URLs in document ALSA: hda - move eld->spk_alloc fixup to hdmi_update_eld() ALSA: hda - delayed ELD repoll ALSA: hda - fix ELD memory leak ALSA: hda/realtek: remove redundant semicolon ALSA: hda - pwr_nids cleanup for IDT codecs
2011-11-17Merge branch 'irq-urgent-for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Fix irqfixup, irqpoll regression
2011-11-17fix typo/thinko in get_random_bytes()Luck, Tony1-1/+1
If there is an architecture-specific random number generator we use it to acquire randomness one "long" at a time. We should put these random words into consecutive words in the result buffer - not just overwrite the first word again and again. Signed-off-by: Tony Luck <tony.luck@intel.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-17platform/x86: fix dell-laptop function prototypesRandy Dunlap1-2/+2
Fix build warnings: drivers/platform/x86/dell-laptop.c:592:13: warning: function declaration isn't a prototype drivers/platform/x86/dell-laptop.c:599:13: warning: function declaration isn't a prototype Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-17media/staging: fix allyesconfig build errorRandy Dunlap2-3/+4
Fix x86 allyesconfig builds. Builds fail due to a non-static variable named 'debug' in drivers/staging/media/as102: arch/x86/built-in.o:arch/x86/kernel/entry_32.S:1296: first defined here ld: Warning: size of symbol `debug' changed from 90 in arch/x86/built-in.o to 4 in drivers/built-in.o Thou shalt have no non-static identifiers that are named 'debug'. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Pierrick Hascoet <pierrick.hascoet@abilis.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-17powerpc/signal32: Fix sigset_t conversion when copying to userWill Deacon1-1/+1
On PPC64, put_sigset_t converts a sigset_t to a compat_sigset_t before copying it to userspace. There is a typo in the case that we have 4 words to copy, meaning that we corrupt the compat_sigset_t. It appears that _NSIG_WORDS can't be greater than 2 at the moment so this code is probably always optimised away anyway. Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2011-11-17powerpc: Fix atomic_xxx_return barrier semanticsBenjamin Herrenschmidt4-35/+40
The Documentation/memory-barriers.txt document requires that atomic operations that return a value act as a memory barrier both before and after the actual atomic operation. Our current implementation doesn't guarantee this. More specifically, while a load following the isync can not be issued before stwcx. has completed, that completion doesn't architecturally means that the result of stwcx. is visible to other processors (or any previous stores for that matter) (typically, the other processors L1 caches can still hold the old value). This has caused an actual crash in RCU torture testing on Power 7 This fixes it by changing those atomic ops to use new macros instead of RELEASE/ACQUIRE barriers, called ATOMIC_ENTRY and ATMOIC_EXIT barriers, which are then defined respectively to lwsync and sync. I haven't had a chance to measure the performance impact (or rather what I measured with kernel compiles is in the noise, I yet have to find a more precise benchmark) Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2011-11-17powerpc: Remove buggy 9-year-old test for binutils < 2.12.1Kyle Moffett1-6/+0
Recent binutils refuses to assemble AltiVec opcodes when in e500/SPE mode, as some of those opcodes alias the "SPE" instructions. This triggers an ancient binutils version check even when building a kernel with CONFIG_ALTIVEC disabled. In theory, the check could be conditionalized on CONFIG_ALTIVEC, but in practice it has long outlived its utility. It is virtually impossible to find binutils older than 2.12.1 (released 2002) in the wild anymore. Even ancient RedHat Enterprise Linux 4 has binutils-2.14. To fix the kernel build when done natively on e500 systems with this new binutils, the test is simply removed. Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2011-11-17powerpc/book3e-64: Fix debug support for userspaceKumar Gala2-23/+1
With the introduction of CONFIG_PPC_ADV_DEBUG_REGS user space debug is broken on Book-E 64-bit parts that support delayed debug events. When switch_booke_debug_regs() sets DBCR0 we'll start getting debug events as MSR_DE is also set and we aren't able to handle debug events from kernel space. We can remove the hack that always enables MSR_DE and loads up DBCR0 and just utilize switch_booke_debug_regs() to get user space debug working again. We still need to handle critical/debug exception stacks & proper save/restore of state for those exception levles to support debug events from kernel space like we have on 32-bit. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2011-11-17powerpc: Remove extraneous CONFIG_PPC_ADV_DEBUG_REGS defineKumar Gala1-2/+0
All of DebugException is already protected by CONFIG_PPC_ADV_DEBUG_REGS there is no need to have another such ifdef inside the function. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2011-11-17powerpc: Revert show_regs() define for readabilityKumar Gala1-1/+1
We had an existing ifdef for 4xx & BOOKE processors that got changed to CONFIG_PPC_ADV_DEBUG_REGS. The define has nothing to do with CONFIG_PPC_ADV_DEBUG_REGS. The define really should be: #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) and not #ifdef CONFIG_PPC_ADV_DEBUG_REGS Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2011-11-16random: Fix handing of arch_get_random_long in get_random_bytes()Luck, Tony1-1/+1
If there is an architecture-specific random number generator we use it to acquire randomness one "long" at a time. We should put these random words into consecutive words in the result buffer - not just overwrite the first word again and again. Signed-off-by: Tony Luck <tony.luck@intel.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/4ec4061010261a4cb0@agluck-desktop.sc.intel.com Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2011-11-16encrypted-keys: module build fixesMimi Zohar2-3/+8
Encrypted keys are encrypted/decrypted using either a trusted or user-defined key type, which is referred to as the 'master' key. The master key may be of type trusted iff the trusted key is builtin or both the trusted key and encrypted keys are built as modules. This patch resolves the build dependency problem. - Use "masterkey-$(CONFIG_TRUSTED_KEYS)-$(CONFIG_ENCRYPTED_KEYS)" construct to encapsulate the above logic. (Suggested by Dimtry Kasatkin.) - Fixing the encrypted-keys Makefile, results in a module name change from encrypted.ko to encrypted-keys.ko. - Add module dependency for request_trusted_key() definition Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
2011-11-16encrypted-keys: fix error return codeMimi Zohar1-1/+1
Fix request_master_key() error return code. Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
2011-11-16xen-gntalloc: signedness bug in add_grefs()Dan Carpenter1-1/+1
gref->gref_id is unsigned so the error handling didn't work. gnttab_grant_foreign_access() returns an int type, so we can add a cast here, and it doesn't cause any problems. gnttab_grant_foreign_access() can return a variety of errors including -ENOSPC, -ENOSYS and -ENOMEM. CC: stable@kernel.org Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-16xen-gntalloc: integer overflow in gntalloc_ioctl_alloc()Dan Carpenter1-1/+1
On 32 bit systems a high value of op.count could lead to an integer overflow in the kzalloc() and gref_ids would be smaller than expected. If the you triggered another integer overflow in "if (gref_size + op.count > limit)" then you'd probably get memory corruption inside add_grefs(). CC: stable@kernel.org Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-16xen-gntdev: integer overflow in gntdev_alloc_map()Dan Carpenter1-5/+5
The multiplications here can overflow resulting in smaller buffer sizes than expected. "count" comes from a copy_from_user(). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-16xen:pvhvm: enable PVHVM VCPU placement when using more than 32 CPUs.Zhenzhong Duan1-2/+1
PVHVM running with more than 32 vcpus and pv_irq/pv_time enabled need VCPU placement to work, or else it will softlockup. CC: stable@kernel.org Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-16xen/balloon: Avoid OOM when requesting highmemDaniel De Graaf1-2/+2
If highmem pages are requested from the balloon on a system without highmem, the implementation of alloc_xenballooned_pages will allocate all available memory trying to find highmem pages to return. Allow low memory to be returned when highmem pages are requested to avoid this loop. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-16xen: Remove hanging references to CONFIG_XEN_PLATFORM_PCIDaniel De Graaf1-4/+2
In 5fbdc10395cd500d6ff844825a918c4e6f38de37 the XEN_PLATFORM_PCI config option was removed, but references in header files remained. Clean up those references. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-11-16xen: map foreign pages for shared rings by updating the PTEs directlyDavid Vrabel5-20/+24
When mapping a foreign page with xenbus_map_ring_valloc() with the GNTTABOP_map_grant_ref hypercall, set the GNTMAP_contains_pte flag and pass a pointer to the PTE (in init_mm). After the page is mapped, the usual fault mechanism can be used to update additional MMs. This allows the vmalloc_sync_all() to be removed from alloc_vm_area(). Signed-off-by: David Vrabel <david.vrabel@citrix.com> Acked-by: Andrew Morton <akpm@linux-foundation.org> [v1: Squashed fix by Michal for no-mmu case] Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-11-16ALSA: hda - Fix the connection selection of ADCs on Cirrus codecsTakashi Iwai1-10/+13
spec->cur_adc isn't set until cs_capture_pcm_prepare() is called although the driver tries to select the connection at init time and at auto-mic switch. This results in the access to the widget NID 0, which is obviously invalid, also a wrong capture source. This patch fixes the issue by issuing the connect-select verb conditionally at appropriate places. Reported-and-tested-by: Dylan Reid <dgreid@chromium.org> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16ALSA: hda - Update URLs in documentTakashi Iwai1-4/+4
Some stuff was moved from kernel.org to other places. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16ALSA: hda - move eld->spk_alloc fixup to hdmi_update_eld()Wu Fengguang2-10/+8
It looks more natural and saves two lines of code. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16ALSA: hda - delayed ELD repollWu Fengguang1-7/+29
The Intel HDMI chips (ironlake at least) are found to have ~250ms delay between the ELD_Valid=1 hotplug event is send and the ELD buffer becomes actually readable. During the time the ELD buffer is mysteriously all 0. Fix it by scheduling a delayed work to re-read ELD buffer after 300ms. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16ALSA: hda - fix ELD memory leakWu Fengguang3-10/+9
memset(eld) clears eld->proc_entry which will leak the struct snd_info_entry when unloading module. Fix it by - memset only the fields before eld->eld_buffer - set eld->eld_valid to true _after_ all eld fields have been filled Cc: <stable@kernel.org> Cc: Pierre-louis Bossart <pierre-louis.bossart@intel.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6Linus Torvalds15-23/+115
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: [S390] topology: fix topology on z10 machines [S390] crypto: avoid MSA3 and MSA4 instructions in ESA mode [S390] avoid STCKF if running in ESA mode [S390] zfcpdump: Do not initialize zfcpdump in kdump mode [S390] ap: Setup processing for messages in request queue. [S390] Kconfig: Select CONFIG_KEXEC for CONFIG_CRASH_DUMP [S390] incorrect note program header [S390] pfault: ignore leftover completion interrupts [S390] fix pgste update logic [S390] wire up process_vm syscalls
2011-11-16block: add missed trace_block_plugShaohua Li1-1/+3
After flush plug list, the list has no request, so we need to add a trace_block_plug(). Signed-off-by: Shaohua Li <shaohua.li@intel.com> Reviewed-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2011-11-16paride: fix potential information leak in pg_read()Dan Carpenter1-0/+1
Smatch has a new check for Rosenberg type information leaks where structs are copied to the user with uninitialized stack data in them. i In this case, the pg_write_hdr struct has a hole in it. struct pg_write_hdr { char magic; /* 0 1 */ char func; /* 1 1 */ /* XXX 2 bytes hole, try to pack */ int dlen; /* 4 4 */ Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Tim Waugh <tim@cyberelk.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2011-11-16bio: change some signed vars to unsignedDan Carpenter2-5/+6
This is just a cleanup patch to silence a static checker warning. The problem is that we cap "nr_iovecs" so it can't be larger than "UIO_MAXIOV" but we don't check for negative values. It turns out this is prevented at other layers, but logically it doesn't make sense to have negative nr_iovecs so making it unsigned is nicer. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2011-11-16block: avoid unnecessary plug list flushShaohua Li1-7/+9
get_request_wait() could sleep and flush the plug list. If the list is already flushed, don't flush again. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Reviewed-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2011-11-16cciss: auto engage SCSI mid layer at driver load timeStephen M. Cameron3-8/+8
A long time ago, probably in 2002, one of the distros, or maybe more than one, loaded block drivers prior to loading the SCSI mid layer. This meant that the cciss driver, being a block driver, could not engage the SCSI mid layer at init time without panicking, and relied on being poked by a userland program after the system was up (and the SCSI mid layer was therefore present) to engage the SCSI mid layer. This is no longer the case, and cciss can safely rely on the SCSI mid layer being present at init time and engage the SCSI mid layer straight away. This means that users will see their tape drives and medium changers at driver load time without need for a script in /etc/rc.d that does this: for x in /proc/driver/cciss/cciss* do echo "engage scsi" > $x done However, if no tape drives or medium changers are detected, the SCSI mid layer will not be engaged. If a tape drive or medium change is later hot-added to the system it will then be necessary to use the above script or similar for the device(s) to be acceesible. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2011-11-16loop: cleanup set_status interfaceDmitry Monakhov1-15/+29
1) Anyone who has read access to loopdev has permission to call set_status and may change important parameters such as lo_offset, lo_sizelimit and so on, which contradicts to read access pattern and definitely equals to write access pattern. 2) Add lo_offset over i_size check to prevent blkdev_size overflow. ##Testcase_bagin #dd if=/dev/zero of=./file bs=1k count=1 #losetup /dev/loop0 ./file /* userspace_application */ struct loop_info64 loinf; fd = open("/dev/loop0", O_RDONLY); ioctl(fd, LOOP_GET_STATUS64, &loinf); /* Set offset to any value which is bigger than i_size, and sizelimit * to nonzero value*/ loinf.lo_offset = 4096*1024; loinf.lo_sizelimit = 1024; ioctl(fd, LOOP_SET_STATUS64, &loinf); /* After this loop device will have size similar to 0x7fffffffffxxxx */ #blockdev --getsz /dev/loop0 ##OUTPUT: 36028797018955968 ##Testcase_end [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>