aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-02-14s390/module: Add missing R_390_NONE relocation typeHendrik Brueckner1-0/+3
Allow loading of kernel modules that have relocations of type R_390_NONE. Signed-off-by: Hendrik Brueckner <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14drivers/gpio: add missing GENERIC_HARDIRQ dependencyHeiko Carstens1-2/+2
The VIA VX855/VX875 GPIO and RDC R-321x GPIO support drivers select MFD_CORE which itself depends on GENERIC_HARDIRQ support. So add this dependency to these two drivers as well to prevent selection of MFD_CORE. Cc: Grant Likely <[email protected]> Cc: Samuel Ortiz <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14drivers/input: add couple of missing GENERIC_HARDIRQS dependenciesHeiko Carstens4-4/+5
When removing the !S390 dependency from drivers/input/Kconfig a couple of drivers don't compile because they have a dependency on GENERIC_HARDIRQS. So add the missing dependencies. Fixes e.g. this one: drivers/input/keyboard/lm8323.c: In function ‘lm8323_suspend’: drivers/input/keyboard/lm8323.c:801:2: error: implicit declaration of function ‘irq_set_irq_wake’ [-Werror=implicit-function-declaration] Cc: Dmitry Torokhov <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/cleanup: rename SPP to LPPHendrik Brueckner5-12/+11
The set-program-parameter (SPP) instruction has been renamed to load-program-parameter (LPP) (see SA23-2260). Reflect this change and rename all macro/instruction references. Also remove the duplicate SPP/LPP entry in the kernel disassembler instruction list. Signed-off-by: Hendrik Brueckner <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/mm: implement software dirty bitsMartin Schwidefsky12-140/+112
The s390 architecture is unique in respect to dirty page detection, it uses the change bit in the per-page storage key to track page modifications. All other architectures track dirty bits by means of page table entries. This property of s390 has caused numerous problems in the past, e.g. see git commit ef5d437f71afdf4a "mm: fix XFS oops due to dirty pages without buffers on s390". To avoid future issues in regard to per-page dirty bits convert s390 to a fault based software dirty bit detection mechanism. All user page table entries which are marked as clean will be hardware read-only, even if the pte is supposed to be writable. A write by the user process will trigger a protection fault which will cause the user pte to be marked as dirty and the hardware read-only bit is removed. With this change the dirty bit in the storage key is irrelevant for Linux as a host, but the storage key is still required for KVM guests. The effect is that page_test_and_clear_dirty and the related code can be removed. The referenced bit in the storage key is still used by the page_test_and_clear_young primitive to provide page age information. For page cache pages of mappings with mapping_cap_account_dirty there will not be any change in behavior as the dirty bit tracking already uses read-only ptes to control the amount of dirty pages. Only for swap cache pages and pages of mappings without mapping_cap_account_dirty there can be additional protection faults. To avoid an excessive number of additional faults the mk_pte primitive checks for PageDirty if the pgprot value allows for writes and pre-dirties the pte. That avoids all additional faults for tmpfs and shmem pages until these pages are added to the swap cache. Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/mm: Fix crst upgrade of mmap with MAP_FIXEDHendrik Brueckner2-5/+8
Right now the page table upgrade does not happen if the end address of a fixed mapping is greater than TASK_SIZE. Enhance s390_mmap_check() to handle MAP_FIXED mappings correctly. Signed-off-by: Hendrik Brueckner <[email protected]> Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/linker skript: discard exit.data at runtimeHeiko Carstens1-0/+4
Discard exit.data section at run time, not link time, since exit.text references exit.data and causes this build error: `.exit.data' referenced in section `.exit.text' of drivers/built-in.o: defined in discarded section `.exit.data' of drivers/built-in.o Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14drivers/media: add missing GENERIC_HARDIRQS dependencyHeiko Carstens1-1/+1
Texas Instruments WL1273 I2C FM Radio (RADIO_WL1273) selects MFD_CORE, which itself depends on GENERIC_HARDIRQS. So add the dependency to the TI driver as well. Signed-off-by: Heiko Carstens <[email protected]> Acked-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/bpf,jit: add vlan tag supportHeiko Carstens1-0/+21
s390 version of 855ddb56 "x86: bpf_jit_comp: add vlan tag support". Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14drivers/net,AT91RM9200: add missing GENERIC_HARDIRQS dependencyHeiko Carstens1-0/+1
The AT91RM9200 driver call devm_request_irq() and therefore should depend on GENERIC_HARDIRQS to prevent link/compile errors on plaforms without GENERIC_HARDIRQS. Signed-off-by: Heiko Carstens <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14iucv: fix kernel panic at rebootHendrik Brueckner1-1/+4
The iucv base layer is initialized during the registration of the first iucv handler. If no handler is registered and the iucv_reboot_event() notifier is called, a missing check can cause a kernel panic in iucv_block_cpu(). To solve this issue, check the IRQ masks invoke iucv_block_cpu() for enabled CPUs only. Signed-off-by: Hendrik Brueckner <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/Kconfig: sort list of arch selected config optionsHeiko Carstens1-57/+58
Just like on other architectures. The intention is that this will reduce merge conflicts if new config options get added in sorted order as well. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14phylib: remove !S390 dependeny from KconfigHeiko Carstens1-1/+0
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14uio: remove !S390 dependency from KconfigHeiko Carstens1-1/+0
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14dasd: fix sysfs cleanup in dasd_generic_removeStefan Weinhuber1-1/+4
When the DASD devices are detached from the driver, then the dasd_generic_remove function is called. One of the things this function should do is to remove the DASD specific sysfs attributes, but this is not done in all cases. This is likely to cause an oops when at a later point sysfs stumbles over the stale pointers. In particular this happens when when the modules are unloaded and loaded again. Signed-off-by: Stefan Weinhuber <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/pci: fix hotplug module initSebastian Ott3-40/+49
Loading the pci hotplug module when no devices are present will fail but unfortunately some hotplug callbacks stay registered to the pci bus level. Fix this by not letting module loading fail when no pci devices are present and provide proper {de}registration functions for these callbacks. Reviewed-by: Gerald Schaefer <[email protected]> Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/pci: cleanup clp page allocationSebastian Ott2-3/+2
Use the __get_free_pages wrapper in clp_alloc_block. Also change the allocation to use one page only. This page is used as CLP response block e.g. to list available pci functions. Using one page we can list > 250 pci functions at once and we have code to loop around this CLP command (if not all functions fit into to the CLP block) already in place. Acked-by: Gerald Schaefer <[email protected]> Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/pci: cleanup clp inline assemblySebastian Ott1-5/+6
Tell gcc that the memory region pointed to by req will be used (and changed). Also remove the (now) superfluous memory constraint. Acked-by: Gerald Schaefer <[email protected]> Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/perf: cpum_cf: fallback to software sampling eventsHendrik Brueckner1-7/+6
The CPU-measurement counter facility does not support sampling events and returns -EINVAL in that case. This return code lets the perf tool fail. To fall back to software sampling events, return -ENOENT instead. Signed-off-by: Hendrik Brueckner <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/mm: provide PAGE_SHARED defineHeiko Carstens1-0/+1
Only needed to make some drivers compile... Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14parport: disable PC-style parallel port support for s390Heiko Carstens1-1/+1
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14ata: disable ATA for s390Heiko Carstens1-1/+1
Add s390 to the list of architectures that don' want ATA. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/pci: rename pci_probe to s390_pci_probeHeiko Carstens3-6/+6
pci_probe is too generic and has a name clash with other common code parts. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/dma: remove dma_is_consistent() declarationHeiko Carstens1-1/+0
There is no such function nor any caller in the whole kernel. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/dma: provide dma_cache_sync() functionHeiko Carstens1-2/+5
Provide empty dma_cache_sync() function. Acked-by: Sebastian Ott <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/barrier: convert mb() to define againHeiko Carstens1-6/+3
Some of the now available common code drivers only compile if mb() is a define. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/time: rename tod clock access functionsHeiko Carstens31-106/+106
Fix name clash with some common code device drivers and add "tod" to all tod clock access function names. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/scm: use inline dummy functionsSebastian Ott2-14/+29
Convert the defines for the !CONFIG_SCM* stuff to static inline functions. Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/cio: handle unknown pgroup stateSebastian Ott1-3/+61
When an attempt to query or modify the grouping state of a channel path fails due to a timeout, we cannot be sure about its state. To get back to a defined state, disband the whole path group and try again while excluding the offending path. Reviewed-by: Peter Oberparleiter <[email protected]> Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/cio: export vpm via sysfsSebastian Ott1-0/+10
Add new attribute "vpm" to the subchannel sysfs directory of I/O subchannels. This attribute contains a path mask indicating which channel paths were successfully verified to be usable for I/O. Reviewed-by: Peter Oberparleiter <[email protected]> Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/cio: skip broken pathsSebastian Ott1-5/+6
Omit known to be broken paths (those set in path_noirq_mask) for the sense/set PGID and nop IO commands. Note: path_noirq_mask will be reset in ccw_device_verify_start (the paths could be healthy again). However if we restart a path verification via verify_start this mask will not be reset (there is no need to let the wait for an interrupt time out again - plus we do not want to loop once we deal with the paths in unknown path group state). Reviewed-by: Peter Oberparleiter <[email protected]> Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/cio: dont abort verification after missing irqSebastian Ott2-10/+43
Do not abort path verification when waiting for an interrupt timed out. Use path_noirq_mask to keep track of the paths used for this (also maintain a path_notoper_mask for debugging purposes). If the timeout happend to be during an operation where we query or alter the state of path groups set the pgid_unknown flag. With this change we allow usage of devices which have such ill-behaved paths (if at least one path is operational). Reviewed-by: Peter Oberparleiter <[email protected]> Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/zcore: Add hsa fileMichael Holzheu1-3/+59
Under LPAR the zfcpdump HSA is a shared resource. Up to now the HSA memory is released when the zcore file is closed. Dump programs that know that they do not need the HSA memory any more (e.g. because they already dumped it) could release it earlier. This would allow other LPARs to use it again. To achieve this a new debugfs file "hsa" is added that can be used to read the HSA size and to release the HSA by writing "0" into the file. Signed-off-by: Michael Holzheu <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/ipl: Implement diag308 loop for zfcpdumpMichael Holzheu1-4/+12
When a zfcpdump is triggered and a second dump on the same CEC is already in progress for another LPAR, diagnose 308 returns with an error code until the first dump is finished. Currently the second Linux stops with a disabled wait PSW in that case. This is improved now by by triggering diag 308 in a loop until it works. Signed-off-by: Michael Holzheu <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/chsc: cleanup SEI helper functionsSebastian Ott2-36/+37
Cleanup the functions used to call SEI. Also provide !CONFIG_PCI dummys for pci error handling. Reviewed-by: Peter Oberparleiter <[email protected]> Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14maintainer for s390 zcrypt component changedIngo Tuchscherer1-1/+1
Signed-off-by: Ingo Tuchscherer <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/modules: add relocation overflow checkingMartin Schwidefsky1-51/+89
Given enough debug options some modules can grow large enough that the GOT table gets bigger than 4K. On s390 the modules are compiled with -fpic which limits the GOT to 4K. The end result is a module that is loaded but won't work. Add a sanity check to apply_rela and return with an error if a relocation error is detected for a module. Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/3270: asynchronous size sensingMartin Schwidefsky4-314/+332
Convert the synchronous size sense code to an interrupt driven approach. This allows to set the device online even if the terminal is not connected. With the new code views can be registered without a connected terminal, the tty can be opened as soon as the device is online. After the terminal has been connected and the size has been determined the tty is resized to match the device characteristics.. Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/3270: introduce device notifierMartin Schwidefsky4-82/+83
Add a notifier to create / destroy the device nodes for the tty view and the fullscreen view. Only device nodes for online devices are created and the device names will follow the convention as outlined in Documentation/devices.txt: 3270/tty<x> for the tty nodes, 3270/tub<x> for hte fullscreen nodes and 3270/tub for the fullscreen control node. Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/3270: fix initialization order in tty3270_alloc_viewMartin Schwidefsky1-6/+8
Corrects the order of tasklet_init vs. the allocation of the read request which has been broken by git commit 9d2ae233 "TTY: tty3270, move initialization to allocation". Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/3270: readd tty3270_openMartin Schwidefsky1-0/+15
Reintroduce the tty3270_open function which has been removed by git commit 20cda6f2 "TTY: tty3270, add tty install". Without the open function in the tty_operations tty_open will return -ENODEV and the 3270 tty will not work. Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14asm-generic/io.h: convert readX defines to functionsHeiko Carstens1-3/+17
E.g. readl is defined like this #define readl(addr) __le32_to_cpu(__raw_readl(addr)) If a there is a readl() call that doesn't check the return value this will cause a compile warning on big endian machines due to the __le32_to_cpu macro magic. E.g. code like this: readl(addr); will generate the following compile warning: warning: value computed is not used [-Wunused-value] With this patch we get rid of dozens of compile warnings on s390. Signed-off-by: Heiko Carstens <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-13Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds22-149/+191
Pull networking fixes from David Miller: "This is primarily to get those r8169 reverts sorted, but other fixes have accumulated meanwhile. 1) Revert two r8169 changes to fix suspend/resume for some users, from Francois Romieu. 2) PCI dma mapping errors in atl1c are not checked for and this cause hard crashes for some users, from Xiong Huang. 3) In 3.8.x we merged the removal of the EXPERIMENTAL dependency for 'dlm' but the same patch for 'sctp' got lost somewhere, resulting in the potential for build errors since there are cross dependencies. From Kees Cook. 4) SCTP's ipv6 socket route validation makes boolean tests incorrectly, fix from Daniel Borkmann. 5) mac80211 does sizeof(ptr) instead of (sizeof(ptr) * nelem), from Cong Ding. 6) arp_rcv() can crash on shared non-linear packets, from Eric Dumazet. 7) Avoid crashes in macvtap by setting ->gso_type consistently in ixgbe, qlcnic, and bnx2x drivers. From Michael S Tsirkin and Alexander Duyck. 8) Trinity fuzzer spots infinite loop in __skb_recv_datagram(), fix from Eric Dumazet. 9) STP protocol frames should use high packet priority, otherwise an overloaded bridge can get stuck. From Stephen Hemminger. 10) The HTB packet scheduler was converted some time ago to store internal timestamps in nanoseconds, but we don't convert back into psched ticks for the user during dumps. Fix from Jiri Pirko. 11) mwl8k channel table doesn't set the .band field properly, resulting in NULL pointer derefs. Fix from Jonas Gorski. 12) mac80211 doesn't accumulate channels properly during a scan so we can downgrade heavily to a much less desirable connection speed. Fix from Johannes Berg. 13) PHY probe failure in stmmac can result in resource leaks and double MDIO registery later, from Giuseppe CAVALLARO. 14) Correct ipv6 checksumming in ip6t_NPT netfilter module, also fix address prefix mangling, from YOSHIFUJI Hideaki." * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits) net, sctp: remove CONFIG_EXPERIMENTAL net: sctp: sctp_v6_get_dst: fix boolean test in dst cache batman-adv: Fix NULL pointer dereference in DAT hash collision avoidance net/macb: fix race with RX interrupt while doing NAPI atl1c: add error checking for pci_map_single functions htb: fix values in opt dump ixgbe: Only set gso_type to SKB_GSO_TCPV4 as RSC does not support IPv6 net: fix infinite loop in __skb_recv_datagram() net: qmi_wwan: add Yota / Megafon M100-1 4g modem mwl8k: fix band for supported channels bridge: set priority of STP packets mac80211: fix channel selection bug arp: fix possible crash in arp_rcv() bnx2x: set gso_type qlcnic: set gso_type ixgbe: fix gso type stmmac: mdio register has to fail if the phy is not found stmmac: fix macro used for debugging the xmit Revert "r8169: enable internal ASPM and clock request settings". Revert "r8169: enable ALDPS for power saving". ...
2013-02-13Merge branch 'x86-urgent-for-linus' of ↵Linus Torvalds7-100/+109
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Peter Anvin: "One (hopefully) last batch of x86 fixes. You asked for the patch by patch justifications, so here they are: x86, MCE: Retract most UAPI exports This one unexports from userspace a bunch of definitions which should never have been exported. We really don't want to create an accidental legacy here. x86, doc: Add a bootloader ID for OVMF This is a documentation-only patch, just recording the official assignment of a boot loader ID. x86: Do not leak kernel page mapping locations Security: avoid making it needlessly easy for user space to probe the kernel memory layout. x86/mm: Check if PUD is large when validating a kernel address Prevent failures using /proc/kcore when using 1G pages. x86/apic: Work around boot failure on HP ProLiant DL980 G7 Server systems Works around a BIOS problem causing boot failures on affected hardware." * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Check if PUD is large when validating a kernel address x86/apic: Work around boot failure on HP ProLiant DL980 G7 Server systems x86, doc: Add a bootloader ID for OVMF x86: Do not leak kernel page mapping locations x86, MCE: Retract most UAPI exports
2013-02-13net, sctp: remove CONFIG_EXPERIMENTALKees Cook1-2/+2
This config item has not carried much meaning for a while now and is almost always enabled by default. As agreed during the Linux kernel summit, remove it. Acked-by: Vlad Yasevich <[email protected]> Acked-by: Steven Whitehouse <[email protected]> Signed-off-by: Kees Cook <[email protected]> Signed-off-by: David Rientjes <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-02-13net: sctp: sctp_v6_get_dst: fix boolean test in dst cacheDaniel Borkmann1-2/+3
We walk through the bind address list and try to get the best source address for a given destination. However, currently, we take the 'continue' path of the loop when an entry is invalid (!laddr->valid) *and* the entry state does not equal SCTP_ADDR_SRC (laddr->state != SCTP_ADDR_SRC). Thus, still, invalid entries with SCTP_ADDR_SRC might not 'continue' as well as valid entries with SCTP_ADDR_{NEW, SRC, DEL}, with a possible false baddr and matchlen as a result, causing in worst case dst route to be false or possibly NULL. This test should actually be a '||' instead of '&&'. But lets fix it and make this a bit easier to read by having the condition the same way as similarly done in sctp_v4_get_dst. Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Vlad Yasevich <[email protected]> Acked-by: Neil Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-02-13batman-adv: Fix NULL pointer dereference in DAT hash collision avoidancePau Koning1-1/+1
An entry in DAT with the hashed position of 0 can cause a NULL pointer dereference when the first entry is checked by batadv_choose_next_candidate. This first candidate automatically has the max value of 0 and the max_orig_node of NULL. Not checking max_orig_node for NULL in batadv_is_orig_node_eligible will lead to a NULL pointer dereference when checking for the lowest address. This problem was added in 785ea1144182c341b8b85b0f8180291839d176a8 ("batman-adv: Distributed ARP Table - create DHT helper functions"). Signed-off-by: Pau Koning <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-02-13net/macb: fix race with RX interrupt while doing NAPINicolas Ferre1-0/+5
When interrupts are disabled, an RX condition can occur but it is not reported when enabling interrupts again. We need to check RSR and use napi_reschedule() if condition is met. Signed-off-by: Nicolas Ferre <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-02-13atl1c: add error checking for pci_map_single functionsHuang, Xiong1-7/+64
it is reported that code hit DMA-API errors on 3.8-rc6+, (see https://bugzilla.redhat.com/show_bug.cgi?id=908436, and https://bugzilla.redhat.com/show_bug.cgi?id=908550) this patch just adds error handler for pci_map_single and skb_frag_dma_map. Signed-off-by: xiong <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-02-13x86/mm: Check if PUD is large when validating a kernel addressMel Gorman2-0/+8
A user reported the following oops when a backup process reads /proc/kcore: BUG: unable to handle kernel paging request at ffffbb00ff33b000 IP: [<ffffffff8103157e>] kern_addr_valid+0xbe/0x110 [...] Call Trace: [<ffffffff811b8aaa>] read_kcore+0x17a/0x370 [<ffffffff811ad847>] proc_reg_read+0x77/0xc0 [<ffffffff81151687>] vfs_read+0xc7/0x130 [<ffffffff811517f3>] sys_read+0x53/0xa0 [<ffffffff81449692>] system_call_fastpath+0x16/0x1b Investigation determined that the bug triggered when reading system RAM at the 4G mark. On this system, that was the first address using 1G pages for the virt->phys direct mapping so the PUD is pointing to a physical address, not a PMD page. The problem is that the page table walker in kern_addr_valid() is not checking pud_large() and treats the physical address as if it was a PMD. If it happens to look like pmd_none then it'll silently fail, probably returning zeros instead of real data. If the data happens to look like a present PMD though, it will be walked resulting in the oops above. This patch adds the necessary pud_large() check. Unfortunately the problem was not readily reproducible and now they are running the backup program without accessing /proc/kcore so the patch has not been validated but I think it makes sense. Signed-off-by: Mel Gorman <[email protected]> Reviewed-by: Rik van Riel <[email protected]> Reviewed-by: Michal Hocko <[email protected]> Acked-by: Johannes Weiner <[email protected]> Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>