aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-07-20pnfs-obj: Fix __r4w_get_page when offset is beyond i_sizeBoaz Harrosh1-3/+13
It is very common for the end of the file to be unaligned on stripe size. But since we know it's beyond file's end then the XOR should be preformed with all zeros. Old code used to just read zeros out of the OSD devices, which is a great waist. But what scares me more about this situation is that, we now have pages attached to the file's mapping that are beyond i_size. I don't like the kind of bugs this calls for. Fix both birds, by returning a global zero_page, if offset is beyond i_size. TODO: Change the API to ->__r4w_get_page() so a NULL can be returned without being considered as error, since XOR API treats NULL entries as zero_pages. [Bug since 3.2. Should apply the same way to all Kernels since] CC: Stable Tree <[email protected]> Signed-off-by: Boaz Harrosh <[email protected]>
2012-07-20pnfs-obj: don't leak objio_state if ore_write/read failsBoaz Harrosh1-2/+7
[Bug since 3.2 Kernel] CC: Stable Tree <[email protected]> Signed-off-by: Boaz Harrosh <[email protected]>
2012-07-20ore: Unlock r4w pages in exact reverse order of lockingBoaz Harrosh1-12/+12
The read-4-write pages are locked in address ascending order. But where unlocked in a way easiest for coding. Fix that, locks should be released in opposite order of locking, .i.e descending address order. I have not hit this dead-lock. It was found by inspecting the dbug print-outs. I suspect there is an higher lock at caller that protects us, but fix it regardless. Signed-off-by: Boaz Harrosh <[email protected]>
2012-07-20ore: Remove support of partial IO request (NFS crash)Boaz Harrosh1-7/+1
Do to OOM situations the ore might fail to allocate all resources needed for IO of the full request. If some progress was possible it would proceed with a partial/short request, for the sake of forward progress. Since this crashes NFS-core and exofs is just fine without it just remove this contraption, and fail. TODO: Support real forward progress with some reserved allocations of resources, such as mem pools and/or bio_sets [Bug since 3.2 Kernel] CC: Stable Tree <[email protected]> CC: Benny Halevy <[email protected]> Signed-off-by: Boaz Harrosh <[email protected]>
2012-07-20ore: Fix NFS crash by supporting any unaligned RAID IOBoaz Harrosh1-31/+36
In RAID_5/6 We used to not permit an IO that it's end byte is not stripe_size aligned and spans more than one stripe. .i.e the caller must check if after submission the actual transferred bytes is shorter, and would need to resubmit a new IO with the remainder. Exofs supports this, and NFS was supposed to support this as well with it's short write mechanism. But late testing has exposed a CRASH when this is used with none-RPC layout-drivers. The change at NFS is deep and risky, in it's place the fix at ORE to lift the limitation is actually clean and simple. So here it is below. The principal here is that in the case of unaligned IO on both ends, beginning and end, we will send two read requests one like old code, before the calculation of the first stripe, and also a new site, before the calculation of the last stripe. If any "boundary" is aligned or the complete IO is within a single stripe. we do a single read like before. The code is clean and simple by splitting the old _read_4_write into 3 even parts: 1._read_4_write_first_stripe 2. _read_4_write_last_stripe 3. _read_4_write_execute And calling 1+3 at the same place as before. 2+3 before last stripe, and in the case of all in a single stripe then 1+2+3 is preformed additively. Why did I not think of it before. Well I had a strike of genius because I have stared at this code for 2 years, and did not find this simple solution, til today. Not that I did not try. This solution is much better for NFS than the previous supposedly solution because the short write was dealt with out-of-band after IO_done, which would cause for a seeky IO pattern where as in here we execute in order. At both solutions we do 2 separate reads, only here we do it within a single IO request. (And actually combine two writes into a single submission) NFS/exofs code need not change since the ORE API communicates the new shorter length on return, what will happen is that this case would not occur anymore. hurray!! [Stable this is an NFS bug since 3.2 Kernel should apply cleanly] CC: Stable Tree <[email protected]> Signed-off-by: Boaz Harrosh <[email protected]>
2012-07-20UBIFS: fix a bug in empty space fix-upArtem Bityutskiy1-2/+6
UBIFS has a feature called "empty space fix-up" which is a quirk to work-around limitations of dumb flasher programs. Namely, of those flashers that are unable to skip NAND pages full of 0xFFs while flashing, resulting in empty space at the end of half-filled eraseblocks to be unusable for UBIFS. This feature is relatively new (introduced in v3.0). The fix-up routine (fixup_free_space()) is executed only once at the very first mount if the superblock has the 'space_fixup' flag set (can be done with -F option of mkfs.ubifs). It basically reads all the UBIFS data and metadata and writes it back to the same LEB. The routine assumes the image is pristine and does not have anything in the journal. There was a bug in 'fixup_free_space()' where it fixed up the log incorrectly. All but one LEB of the log of a pristine file-system are empty. And one contains just a commit start node. And 'fixup_free_space()' just unmapped this LEB, which resulted in wiping the commit start node. As a result, some users were unable to mount the file-system next time with the following symptom: UBIFS error (pid 1): replay_log_leb: first log node at LEB 3:0 is not CS node UBIFS error (pid 1): replay_log_leb: log error detected while replaying the log at LEB 3:0 The root-cause of this bug was that 'fixup_free_space()' wrongly assumed that the beginning of empty space in the log head (c->lhead_offs) was known on mount. However, it is not the case - it was always 0. UBIFS does not store in it the master node and finds out by scanning the log on every mount. The fix is simple - just pass commit start node size instead of 0 to 'fixup_leb()'. Signed-off-by: Artem Bityutskiy <[email protected]> Cc: [email protected] [v3.0+] Reported-by: Iwo Mergler <[email protected]> Tested-by: Iwo Mergler <[email protected]> Reported-by: James Nute <[email protected]>
2012-07-19Merge branch 'for-linus' of ↵Linus Torvalds3-18/+10
git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client Pull last minute Ceph fixes from Sage Weil: "The important one fixes a bug in the socket failure handling behavior that was turned up in some recent failure injection testing. The other two are minor bug fixes." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: rbd: endian bug in rbd_req_cb() rbd: Fix ceph_snap_context size calculation libceph: fix messenger retry
2012-07-19Merge tag 'md-3.5-fixes' of git://neil.brown.name/mdLinus Torvalds2-15/+32
Pull three md bugfixes from NeilBrown: "One of the bugs was introduced in 3.5-rc1. Others have been there for longer." * tag 'md-3.5-fixes' of git://neil.brown.name/md: md/raid1: close some possible races on write errors during resync md: avoid crash when stopping md array races with closing other open fds. md: fix bug in handling of new_data_offset
2012-07-19Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds4-6/+10
Pull networking changes from David Miller: "Ok, we should be good to go now" 1) We have to statically initialize the init_net device list head rather than do so in an initcall, otherwise netprio_cgroup crashes if it's built statically rather than modular (Mark D. Rustad) 2) Fix SKB null oopser in CIPSO ipv4 option processing (Paul Moore) 3) Qlogic maintainers update (Anirban Chakraborty) * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: net: Statically initialize init_net.dev_base_head MAINTAINERS: Changes in qlcnic and qlge maintainers list cipso: don't follow a NULL pointer when setsockopt() is called
2012-07-19Merge branch 'upstream-fixes' of ↵Linus Torvalds5-0/+16
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID update from Jiri Kosina: "A final round of changes for HID for 3.5: just device ID additions." * 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: hid-multitouch: add support for Zytronic panels HID: add Sennheiser BTD500USB device support HID: add battery quirk for Apple Wireless ANSI
2012-07-19cx25821: Remove bad strcpy to read-only char*Ezequiel Garcia2-4/+1
The strcpy was being used to set the name of the board. Since the destination char* was read-only and the name is set statically at compile time; this was both wrong and redundant. The type of char* is changed to const char* to prevent future errors. Reported-by: Radek Masin <[email protected]> Signed-off-by: Ezequiel Garcia <[email protected]> [ Taking directly due to vacations - Linus ] Signed-off-by: Linus Torvalds <[email protected]>
2012-07-19HID: hid-multitouch: add support for Zytronic panelsBenjamin Tissoires3-0/+9
Signed-off-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-07-19MIPS: PCI: Move fixups from __init to __devinit.Sebastian Andrzej Siewior8-22/+22
Fixups are executed once the pci-device is found which is during boot process so __init seems fine as long as the platform does not support hotplug. However it is possible to remove the PCI bus at run time and have it rediscovered again via "echo 1 > /sys/bus/pci/rescan" and this will call the fixups again. [[email protected]: Made piixirqmap[] in malta_piix_func0_fixup() __initdata.] Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Cc: [email protected] Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: Fix bug.h MIPS build regressionYoichi Yuasa2-1/+1
Commit: 3777808873b0c49c5cf27e44c948dfb02675d578 [bug.h: need linux/kernel.h for TAINT_WARN.] breaks all MIPS builds. CC arch/mips/kernel/machine_kexec.o In file included from include/linux/kernel.h:20:0, from include/asm-generic/bug.h:35, from /home/yuasa/src/linux/kernel/git/linux-2.6/arch/mips/include/asm/bug.h:41, from /home/yuasa/src/linux/kernel/git/linux-2.6/arch/mips/include/asm/bitops.h:20, from include/linux/bitops.h:22, from include/linux/signal.h:38, from include/linux/elfcore.h:5, from include/linux/kexec.h:60, from arch/mips/kernel/machine_kexec.c:9: include/linux/log2.h: In function '__ilog2_u32': include/linux/log2.h:34:2: error: implicit declaration of function 'fls' [-Werror=implicit-function-declaration] include/linux/log2.h: In function '__ilog2_u64': include/linux/log2.h:42:2: error: implicit declaration of function 'fls64' [-Werror=implicit-function-declaration] include/linux/log2.h: In function '__roundup_pow_of_two': include/linux/log2.h:63:2: error: implicit declaration of function 'fls_long' [-Werror=implicit-function-declaration] In file included from include/linux/bitops.h:22:0, from include/linux/signal.h:38, from include/linux/elfcore.h:5, from include/linux/kexec.h:60, from arch/mips/kernel/machine_kexec.c:9: /home/yuasa/src/linux/kernel/git/linux-2.6/arch/mips/include/asm/bitops.h: At top level: /home/yuasa/src/linux/kernel/git/linux-2.6/arch/mips/include/asm/bitops.h:615:19: error: static declaration of 'fls' follows non-static declaration include/linux/log2.h:34:9: note: previous implicit declaration of 'fls' was here In file included from /home/yuasa/src/linux/kernel/git/linux-2.6/arch/mips/include/asm/bitops.h:651:0, from include/linux/bitops.h:22, from include/linux/signal.h:38, from include/linux/elfcore.h:5, from include/linux/kexec.h:60, from arch/mips/kernel/machine_kexec.c:9: include/asm-generic/bitops/fls64.h:18:28: error: static declaration of 'fls64' follows non-static declaration include/linux/log2.h:42:9: note: previous implicit declaration of 'fls64' was here In file included from include/linux/signal.h:38:0, from include/linux/elfcore.h:5, from include/linux/kexec.h:60, from arch/mips/kernel/machine_kexec.c:9: include/linux/bitops.h:160:24: error: conflicting types for 'fls_long' include/linux/log2.h:63:16: note: previous implicit declaration of 'fls_long' was here cc1: all warnings being treated as errors make[2]: *** [arch/mips/kernel/machine_kexec.o] Error 1 Signed-off-by: Yoichi Yuasa <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Paul Mundt <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Linuxppc-dev <[email protected]> Cc: Linux MIPS Mailing List <[email protected]> Cc: Linux-sh list <[email protected]> Cc: Chris Zankel <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/4000/ Tested-by: John Crispin <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: sync-r4k: remove redundant irq operationYong Zhang1-5/+0
Since we have delayed irq enabling to ->smp_finish() Signed-off-by: Yong Zhang <[email protected]> Cc: Sergei Shtylyov <[email protected]> Cc: David Daney <[email protected]> Acked-by: David Daney <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: smp: Warn on too early irq enableYong Zhang1-0/+5
Just to catch a potential issue. Signed-off-by: Yong Zhang <[email protected]> Cc: Sergei Shtylyov <[email protected]> Cc: David Daney <[email protected]> Acked-by: David Daney <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/3852/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: call set_cpu_online() on cpu being brought up with irq disabledYong Zhang1-2/+2
To prevent a problem as commit 5fbd036b [sched: Cleanup cpu_active madness] and commit 2baab4e9 [sched: Fix select_fallback_rq() vs cpu_active/cpu_online] try to resolve, move set_cpu_online() to the brought up CPU and with irq disabled. Signed-off-by: Yong Zhang <[email protected]> Cc: Sergei Shtylyov <[email protected]> Cc: David Daney <[email protected]> Acked-by: David Daney <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/3851/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: call ->smp_finish() a little lateYong Zhang1-1/+2
We have move irq enable to ->smp_finish. Place ->smp_finish() a little late to prepare for move set_cpu_online() into start_secondary. And it's not necessary to call cpu_set(cpu, cpu_callin_map) and synchronise_count_slave() with irq enabled. Signed-off-by: Yong Zhang <[email protected]> Cc: Sergei Shtylyov <[email protected]> Cc: David Daney <[email protected]> Acked-by: David Daney <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/3850/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: Yosemite: delay irq enable to ->smp_finish()Yong Zhang1-1/+1
To prepare for smoothing set_cpu_[active|online]() mess up Signed-off-by: Yong Zhang <[email protected]> Cc: Sergei Shtylyov <[email protected]> Cc: David Daney <[email protected]> Acked-by: David Daney <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/3848/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: SMTC: delay irq enable to ->smp_finish()Yong Zhang1-1/+2
To prepare for smoothing set_cpu_[active|online]() mess up Signed-off-by: Yong Zhang <[email protected]> Cc: Sergei Shtylyov <[email protected]> Cc: David Daney <[email protected]> Acked-by: David Daney <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/3847/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: BMIPS: delay irq enable to ->smp_finish()Yong Zhang1-7/+7
To prepare for smoothing set_cpu_[active|online]() mess up Signed-off-by: Yong Zhang <[email protected]> Cc: Sergei Shtylyov <[email protected]> Cc: David Daney <[email protected]> Acked-by: David Daney <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/3846/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: Octeon: delay enable irq to ->smp_finish()Yong Zhang1-1/+1
To prepare for smoothing set_cpu_[active|online]() mess up Signed-off-by: Yong Zhang <[email protected]> Cc: Sergei Shtylyov <[email protected]> Cc: David Daney <[email protected]> Acked-by: David Daney <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/3845/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: Oprofile: Fix build as a module.Ralf Baechle1-0/+1
When building oprofile as a module for R10000 or R7000 class processors, E9000 or MIPSxx class cores since 3572a2c37f667ee49333f8863722b8f43eac506b [MIPS: make oprofile use cp0_perfcount_irq if it is set] an ERROR: "cp0_compare_irq" [arch/mips/oprofile/oprofile.ko] undefined! error will happen. Fixed by exporting cp0_compare_irq. Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: BCM63XX: Fix BCM6368 IPSec clock bitFlorian Fainelli1-1/+1
The IPsec clock bit is 18 and not 17. Signed-off-by: Florian Fainelli <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/3323/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: perf: Fix build error caused by unused counters_per_cpu_to_total()Florian Fainelli1-5/+0
cc1: warnings being treated as errors arch/mips/kernel/perf_event_mipsxx.c:166: error: 'counters_per_cpu_to_total' defined but not used make[2]: *** [arch/mips/kernel/perf_event_mipsxx.o] Error 1 make[2]: *** Waiting for unfinished jobs.... It was first introduced by 82091564cfd7ab8def42777a9c662dbf655c5d25 [MIPS: perf: Add support for 64-bit perf counters.] in 3.2. Signed-off-by: Florian Fainelli <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/3357/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: Fix Magic SysRq L kernel crash.Vincent Wen1-0/+3
show_backtrace() was passed a NULL pointer which caused paging request fail. Set to current task as other architectures (ARM, etc) do when passed a NULL task pointer. Signed-off-by: Vincent Wen <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/3524/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: BMIPS: Fix duplicate header inclusion.Danny Kukawka1-1/+0
Signed-off-by: Danny Kukawka <[email protected]> Cc: Danny Kukawka <[email protected]> Cc: Kevin Cernekee <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/3369/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19mips: mark const init data with __initconst instead of __initdataUwe Kleine-König7-9/+9
As long as there is no other non-const variable marked __initdata in the same compilation unit it doesn't hurt. If there were one however compilation would fail with error: $variablename causes a section type conflict because a section containing const variables is marked read only and so cannot contain non-const variables. Signed-off-by: Uwe Kleine-König <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/3565/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: cmpxchg.h: Add missing includeAaro Koskinen1-0/+1
Fix the following build breakage in v3.4-rc1: CC kernel/irq_work.o In file included from include/linux/irq_work.h:4:0, from kernel/irq_work.c:10: include/linux/llist.h: In function 'llist_del_all': include/linux/llist.h:178:2: error: implicit declaration of function 'BUILD_BUG_ON' [-Werror=implicit-function-declaration] Signed-off-by: Aaro Koskinen <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/3568/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: Malta may also be equipped with MIPS64 R2 processors.Leonid Yegoshin1-0/+1
Signed-off-by: Leonid Yegoshin <[email protected]> Signed-off-by: Steven J. Hill <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/3792/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: Fix typo multipy -> multiplyRalf Baechle1-2/+2
Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: Cavium: Fix duplicate ARCH_SPARSEMEM_ENABLE in kconfig.Yoichi Yuasa2-4/+1
Signed-off-by: Yoichi Yuasa <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/3883/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: BCM47xx: Fix BCMA_DRIVER_PCI_HOSTMODE config dependenciesYoichi Yuasa1-0/+1
warning: (BCM47XX_BCMA) selects BCMA_DRIVER_PCI_HOSTMODE which has unmet direct dependencies (BCMA_POSSIBLE && BCMA && MIPS && BCMA_HOST_PCI) warning: (BCM47XX_BCMA) selects BCMA_DRIVER_PCI_HOSTMODE which has unmet direct dependencies (BCMA_POSSIBLE && BCMA && MIPS && BCMA_HOST_PCI) Signed-off-by: Yoichi Yuasa <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/3882/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: SMTC: Spelling and grammar corrections.Ralf Baechle1-5/+5
Extractd from Steven J. Hill's https://patchwork.linux-mips.org/patch/3603/. Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: Properly align the .data..init_task section.David Daney2-3/+4
Improper alignment can lead to unbootable systems and/or random crashes. [[email protected]: This is a lond standing bug since 6eb10bc9e2deab06630261cd05c4cb1e9a60e980 (kernel.org) rsp. c422a10917f75fd19fa7fe070aaaa23e384dae6f (lmo) [MIPS: Clean up linker script using new linker script macros.] so dates back to 2.6.32.] Signed-off-by: David Daney <[email protected]> Cc: [email protected] Cc: <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/3881/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: Malta: Change start address to avoid conflicts.Steven J. Hill1-2/+3
There are ACPI and SMB devices in the 0x1000..0x1fff address range. Signed-off-by: Steven J. Hill <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/3581/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: Fix race condition with FPU thread task flag during context switch.Leonid Yegoshin4-24/+11
[[email protected]: Cosmetic changes; also fixed up r2300_switch.S and octeon_switch.S which needed similar modifications.] Signed-off-by: Leonid Yegoshin <[email protected]> Signed-off-by: Steven J. Hill <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/3784/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: Fix decoding of c0_config1 for MIPSxx caches with 32 ways per set.Douglas Leung1-2/+2
This affects certain 4Kc cores. Signed-off-by: Douglas Leung <[email protected]> Signed-off-by: Steven J. Hill <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/3855/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: Refactor 'clear_page' and 'copy_page' functions.Steven J. Hill4-52/+77
Remove usage of the '__attribute__((alias("...")))' hack that aliased to integer arrays containing micro-assembled instructions. This hack breaks when building a microMIPS kernel. It also makes the code much easier to understand. [[email protected]: Added back export of the clear_page and copy_page symbols so certain modules will work again. Also fixed build with CONFIG_SIBYTE_DMA_PAGEOPS enabled.] Signed-off-by: Steven J. Hill <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/3866/ Acked-by: David Daney <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19MIPS: Don't panic on 5KEc.Leonid Yegoshin3-1/+6
It's a bloody bog standard MIPS64R2 core with just a new PrId ID. Iow that essentially means Linux just panics because it doesn't know how to name the core. [[email protected]: Split original patch into several smaller patches.] Signed-off-by: Leonid Yegoshin <[email protected]> Signed-off-by: Steven J. Hill <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/3792/ Signed-off-by: Ralf Baechle <[email protected]>
2012-07-19Merge branch 'pm-sleep'Rafael J. Wysocki1-1/+9
* pm-sleep: PM / Sleep: call early resume handlers when suspend_noirq fails
2012-07-19PM / Sleep: call early resume handlers when suspend_noirq failsColin Cross1-1/+9
Commit cf579dfb82550e34de7ccf3ef090d8b834ccd3a9 (PM / Sleep: Introduce "late suspend" and "early resume" of devices) introduced a bug where suspend_late handlers would be called, but if dpm_suspend_noirq returned an error the early_resume handlers would never be called. All devices would end up on the dpm_late_early_list, and would never be resumed again. Fix it by calling dpm_resume_early when dpm_suspend_noirq returns an error. Signed-off-by: Colin Cross <[email protected]> Cc: [email protected] Signed-off-by: Rafael J. Wysocki <[email protected]>
2012-07-19md/raid1: close some possible races on write errors during resyncNeilBrown1-2/+8
commit 4367af556133723d0f443e14ca8170d9447317cb md/raid1: clear bad-block record when write succeeds. Added a 'reschedule_retry' call possibility at the end of end_sync_write, but didn't add matching code at the end of sync_request_write. So if the writes complete very quickly, or scheduling makes it seem that way, then we can miss rescheduling the request and the resync could hang. Also commit 73d5c38a9536142e062c35997b044e89166e063b md: avoid races when stopping resync. Fix a race condition in this same code in end_sync_write but didn't make the change in sync_request_write. This patch updates sync_request_write to fix both of those. Patch is suitable for 3.1 and later kernels. Reported-by: Alexander Lyakas <[email protected]> Original-version-by: Alexander Lyakas <[email protected]> Cc: [email protected] Signed-off-by: NeilBrown <[email protected]>
2012-07-19md: avoid crash when stopping md array races with closing other open fds.NeilBrown1-13/+23
md will refuse to stop an array if any other fd (or mounted fs) is using it. When any fs is unmounted of when the last open fd is closed all pending IO will be flushed (e.g. sync_blockdev call in __blkdev_put) so there will be no pending IO to worry about when the array is stopped. However in order to send the STOP_ARRAY ioctl to stop the array one must first get and open fd on the block device. If some fd is being used to write to the block device and it is closed after mdadm open the block device, but before mdadm issues the STOP_ARRAY ioctl, then there will be no last-close on the md device so __blkdev_put will not call sync_blockdev. If this happens, then IO can still be in-flight while md tears down the array and bad things can happen (use-after-free and subsequent havoc). So in the case where do_md_stop is being called from an open file descriptor, call sync_block after taking the mutex to ensure there will be no new openers. This is needed when setting a read-write device to read-only too. Cc: [email protected] Reported-by: majianpeng <[email protected]> Signed-off-by: NeilBrown <[email protected]>
2012-07-19md: fix bug in handling of new_data_offsetNeilBrown1-0/+1
commit c6563a8c38fde3c1c7fc925a10bde3ca20799301 md: add possibility to change data-offset for devices. introduced a 'new_data_offset' attribute which should normally be the same as 'data_offset', but can be explicitly set to a different value to allow a reshape operation to move the data. Unfortunately when the 'data_offset' is explicitly set through sysfs, the new_data_offset is not also set, so the two would become out-of-sync incorrectly. One result of this is that trying to set the 'size' after the 'data_offset' would fail because it is not permitted to set the size when the 'data_offset' and 'new_data_offset' are different - as that can be confusing. Consequently when mdadm tried to do this while assembling an IMSM array it would fail. This bug was introduced in 3.5-rc1. Reported-by: Brian Downing <[email protected]> Bisected-by: Brian Downing <[email protected]> Tested-by: Brian Downing <[email protected]> Signed-off-by: NeilBrown <[email protected]>
2012-07-18Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pendingLinus Torvalds3-4/+7
Pull target fixes from Nicholas Bellinger: "This includes a bugfix from MDR to address a NULL pointer OOPs with FCoE aborts, along with a WRITE_SAME emulation bugfix for NOLB=0 cases, and persistent reservation return cleanups from Roland. All three patches are CC'ed to stable." * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: target: Fix range calculation in WRITE SAME emulation when num blocks == 0 target: Clean up returning errors in PR handling code tcm_fc: Fix crash seen with aborts and large reads
2012-07-18kexec: update URL of kexec homepageOlaf Hering1-1/+1
The referenced html file does not exist anymore. Replace the URL with the current project homepage. Signed-off-by: Olaf Hering <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-07-18mips: fix bug.h build regressionYoichi Yuasa2-1/+1
Commit 377780887 ("bug.h: need linux/kernel.h for TAINT_WARN.") broke all MIPS builds: CC arch/mips/kernel/machine_kexec.o include/linux/log2.h: In function '__ilog2_u32': include/linux/log2.h:34:2: error: implicit declaration of function 'fls' [-Werror=implicit-function-declaration] include/linux/log2.h: In function '__ilog2_u64': include/linux/log2.h:42:2: error: implicit declaration of function 'fls64' [-Werror=implicit-function-declaration] ... Signed-off-by: Yoichi Yuasa <[email protected]> Tested-by: John Crispin <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: David Daney <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-07-18Make wait_for_device_probe() also do scsi_complete_async_scans()Linus Torvalds5-17/+2
Commit a7a20d103994 ("sd: limit the scope of the async probe domain") make the SCSI device probing run device discovery in it's own async domain. However, as a result, the partition detection was no longer synchronized by async_synchronize_full() (which, despite the name, only synchronizes the global async space, not all of them). Which in turn meant that "wait_for_device_probe()" would not wait for the SCSI partitions to be parsed. And "wait_for_device_probe()" was what the boot time init code relied on for mounting the root filesystem. Now, most people never noticed this, because not only is it timing-dependent, but modern distributions all use initrd. So the root filesystem isn't actually on a disk at all. And then before they actually mount the final disk filesystem, they will have loaded the scsi-wait-scan module, which not only does the expected wait_for_device_probe(), but also does scsi_complete_async_scans(). [ Side note: scsi_complete_async_scans() had also been partially broken, but that was fixed in commit 43a8d39d0137 ("fix async probe regression"), so that same commit a7a20d103994 had actually broken setups even if you used scsi-wait-scan explicitly ] Solve this problem by just moving the scsi_complete_async_scans() call into wait_for_device_probe(). Everybody who wants to wait for device probing to finish really wants the SCSI probing to complete, so there's no reason not to do this. So now "wait_for_device_probe()" really does what the name implies, and properly waits for device probing to finish. This also removes the now unnecessary extra calls to scsi_complete_async_scans(). Reported-and-tested-by: Artem S. Tashkinov <[email protected]> Cc: Dan Williams <[email protected]> Cc: Alan Stern <[email protected]> Cc: James Bottomley <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: linux-scsi <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-07-19Merge branch 'pm-qos'Rafael J. Wysocki2-2/+2
* pm-qos: PM / QoS: Use NULL pointer instead of plain integer in qos.c PM / QoS: Use NULL pointer instead of plain integer in pm_qos.h