android_kernel_google_msm/drivers
Rob Clark cf828d9fed drm/ttm: don't oops if no invalidate_caches()
commit 9ef7506f7e upstream.

A few of the simpler TTM drivers (cirrus, ast, mgag200) do not implement
this function.  Yet can end up somehow with an evicted bo:

  BUG: unable to handle kernel NULL pointer dereference at           (null)
  IP: [<          (null)>]           (null)
  PGD 16e761067 PUD 16e6cf067 PMD 0
  Oops: 0010 [#1] SMP
  Modules linked in: bnep bluetooth rfkill fuse ip6t_rpfilter ip6t_REJECT ipt_REJECT xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw iptable_filter ip_tables sg btrfs zlib_deflate raid6_pq xor dm_queue_length iTCO_wdt iTCO_vendor_support coretemp kvm dcdbas dm_service_time microcode serio_raw pcspkr lpc_ich mfd_core i7core_edac edac_core ses enclosure ipmi_si ipmi_msghandler shpchp acpi_power_meter mperf nfsd auth_rpcgss nfs_acl lockd uinput sunrpc dm_multipath xfs libcrc32c ata_generic pata_acpi sr_mod cdrom
   sd_mod usb_storage mgag200 syscopyarea sysfillrect sysimgblt i2c_algo_bit lpfc drm_kms_helper ttm crc32c_intel ata_piix bfa drm ixgbe libata i2c_core mdio crc_t10dif ptp crct10dif_common pps_core scsi_transport_fc dca scsi_tgt megaraid_sas bnx2 dm_mirror dm_region_hash dm_log dm_mod
  CPU: 16 PID: 2572 Comm: X Not tainted 3.10.0-86.el7.x86_64 #1
  Hardware name: Dell Inc. PowerEdge R810/0H235N, BIOS 0.3.0 11/14/2009
  task: ffff8801799dabc0 ti: ffff88016c884000 task.ti: ffff88016c884000
  RIP: 0010:[<0000000000000000>]  [<          (null)>]           (null)
  RSP: 0018:ffff88016c885ad8  EFLAGS: 00010202
  RAX: ffffffffa04e94c0 RBX: ffff880178937a20 RCX: 0000000000000000
  RDX: 0000000000000000 RSI: 0000000000240004 RDI: ffff880178937a00
  RBP: ffff88016c885b60 R08: 00000000000171a0 R09: ffff88007cf171a0
  R10: ffffea0005842540 R11: ffffffff810487b9 R12: ffff880178937b30
  R13: ffff880178937a00 R14: ffff88016c885b78 R15: ffff880179929400
  FS:  00007f81ba2ef980(0000) GS:ffff88007cf00000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: 0000000000000000 CR3: 000000016e763000 CR4: 00000000000007e0
  DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
  DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
  Stack:
   ffffffffa0306fae ffff8801799295c0 0000000000260004 0000000000000001
   ffff88016c885b60 ffffffffa0307669 00ff88007cf17738 ffff88017cf17700
   ffff880178937a00 ffff880100000000 ffff880100000000 0000000079929400
  Call Trace:
   [<ffffffffa0306fae>] ? ttm_bo_handle_move_mem+0x54e/0x5b0 [ttm]
   [<ffffffffa0307669>] ? ttm_bo_mem_space+0x169/0x340 [ttm]
   [<ffffffffa0307bd7>] ttm_bo_move_buffer+0x117/0x130 [ttm]
   [<ffffffff81130001>] ? perf_event_init_context+0x141/0x220
   [<ffffffffa0307cb1>] ttm_bo_validate+0xc1/0x130 [ttm]
   [<ffffffffa04e7377>] mgag200_bo_pin+0x87/0xc0 [mgag200]
   [<ffffffffa04e56c4>] mga_crtc_cursor_set+0x474/0xbb0 [mgag200]
   [<ffffffff811971d2>] ? __mem_cgroup_commit_charge+0x152/0x3b0
   [<ffffffff815c4182>] ? mutex_lock+0x12/0x2f
   [<ffffffffa0201433>] drm_mode_cursor_common+0x123/0x170 [drm]
   [<ffffffffa0205231>] drm_mode_cursor_ioctl+0x41/0x50 [drm]
   [<ffffffffa01f5ca2>] drm_ioctl+0x502/0x630 [drm]
   [<ffffffff815cbab4>] ? __do_page_fault+0x1f4/0x510
   [<ffffffff8101cb68>] ? __restore_xstate_sig+0x218/0x4f0
   [<ffffffff811b4445>] do_vfs_ioctl+0x2e5/0x4d0
   [<ffffffff8124488e>] ? file_has_perm+0x8e/0xa0
   [<ffffffff811b46b1>] SyS_ioctl+0x81/0xa0
   [<ffffffff815d05d9>] system_call_fastpath+0x16/0x1b
  Code:  Bad RIP value.
  RIP  [<          (null)>]           (null)
   RSP <ffff88016c885ad8>
  CR2: 0000000000000000

Signed-off-by: Rob Clark <rclark@redhat.com>
Reviewed-by: Jérôme Glisse <jglisse@redhat.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-23 21:37:04 -07:00
..
accessibility
acpi ACPI / processor: Rework processor throttling with work_on_cpu() 2014-03-11 16:10:01 -07:00
amba
ata sata_sil: apply MOD15WRITE quirk to TOSHIBA MK2561GSYN 2014-03-11 16:10:00 -07:00
atm atm: idt77252: fix dev refcnt leak 2013-12-08 07:29:42 -08:00
auxdisplay
base drivers/base/memory.c: fix show_mem_removable() to handle missing sections 2013-09-07 21:58:14 -07:00
bcma bcma: mips: fix clearing device IRQ 2013-01-17 08:50:41 -08:00
block xen/blkback: Check for insane amounts of request on the ring (v6). 2014-03-11 16:10:07 -07:00
bluetooth Bluetooth: Add support for Dell[QCA 0cf3:817a] 2013-04-05 10:04:15 -07:00
cdrom drivers/cdrom/cdrom.c: use kzalloc() for failing hardware 2013-07-13 11:03:40 -07:00
char raw: test against runtime value of max_raw_minors 2014-02-22 10:32:45 -08:00
clk clk: remove notifier from list before freeing it 2013-06-27 11:27:30 -07:00
clocksource
connector proc connector: reject unprivileged listener bumps 2014-03-11 16:10:03 -07:00
cpufreq cpufreq / Longhaul: Disable driver by default 2013-05-11 13:48:10 -07:00
cpuidle
crypto
dca dca: check against empty dca_domains list before unregister provider 2013-02-28 06:59:06 -08:00
devfreq
dio
dma dma: ste_dma40: don't dereference free:d descriptor 2014-03-11 16:10:02 -07:00
edac i7core_edac: Fix PCI device reference count 2014-03-11 16:10:01 -07:00
eisa EISA/PCI: Fix bus res reference 2013-04-12 09:38:44 -07:00
firewire firewire: fix libdc1394/FlyCap2 iso event regression 2013-08-04 16:26:02 +08:00
firmware efivars: Handle duplicate names from get_next_variable() 2013-04-05 10:04:36 -07:00
gpio gpio: msm: Fix irq mask/unmask by writing bits instead of numbers 2014-01-08 09:42:12 -08:00
gpu drm/ttm: don't oops if no invalidate_caches() 2014-03-23 21:37:04 -07:00
hid HID: picolcd_core: validate output report details 2013-12-08 07:29:42 -08:00
hsi
hv
hwmon hwmon: (max1668) Fix writing the minimum temperature 2014-03-11 16:10:01 -07:00
hwspinlock hwspinlock: fix __hwspin_lock_request error path 2013-04-12 09:38:46 -07:00
i2c i2c: i801: SMBus patch for Intel Avoton DeviceIDs 2013-12-11 22:34:11 -08:00
ide
idle intel_idle: enable IVB Xeon support 2014-01-08 09:42:11 -08:00
ieee802154
infiniband IB/qib: Add missing serdes init sequence 2014-02-22 10:32:46 -08:00
input Input: synaptics - handle out of bounds values from the hardware 2014-02-20 10:45:33 -08:00
iommu intel-iommu: fix off-by-one in pagetable freeing 2014-02-13 11:51:08 -08:00
isdn net: rework recvmsg handler msg_name and msg_namelen logic 2013-12-08 07:29:41 -08:00
leds drivers/leds/leds-ot200.c: fix error caused by shifted mask 2013-06-07 12:49:13 -07:00
lguest
macintosh
mca
md dm mpath: fix stalls when handling invalid ioctls 2014-03-11 16:10:02 -07:00
media saa7134: Fix unlocked snd_pcm_stop() call 2014-03-11 16:10:06 -07:00
memstick
message
mfd mfd: adp5520: Restore mode bits on resume 2013-05-07 19:51:57 -07:00
misc SCSI: enclosure: fix WARN_ON in dual path device removing 2013-12-11 22:34:10 -08:00
mmc mmc: atmel-mci: fix timeout errors in SDIO mode when using DMA 2014-02-13 11:51:08 -08:00
mtd mtd: mxc_nand: remove duplicated ecc_stats counting 2014-02-13 11:51:10 -08:00
net mwifiex: copy AP's HT capability info correctly 2014-03-23 21:37:04 -07:00
nfc
nubus
of of: Fix missing memory initialization on FDT unflattening 2013-09-26 17:15:51 -07:00
oprofile
parisc
parport parport: parport_pc: remove double PCI ID for NetMos 2014-02-06 11:05:47 -08:00
pci PCI: Enable ARI if dev and upstream bridge support it; disable otherwise 2014-02-13 11:51:17 -08:00
pcmcia pcmcia: at91_cf: fix gpio_get_value in at91_cf_get_status 2013-07-21 18:19:01 -07:00
pinctrl
platform hp_accel: Add a new PnP ID HPQ6007 for new HP laptops 2014-02-06 11:05:47 -08:00
pnp pnpacpi: fix incorrect TEST_ALPHA() test 2013-01-11 09:06:29 -08:00
power power: max17040: Fix NULL pointer dereference when there is no platform_data 2014-02-22 10:32:46 -08:00
pps
ps3
ptp
rapidio
regulator regulator: wm831x: Set the new rather than old value for DVS VSEL 2013-01-17 08:50:41 -08:00
remoteproc
rpmsg
rtc rtc-cmos: Add an alarm disable quirk 2014-02-13 11:51:20 -08:00
s390 qeth: avoid buffer overflow in snmp ioctl 2013-12-04 10:50:30 -08:00
sbus
scsi SCSI: bfa: Chinook quad port 16G FC HBA claim issue 2014-02-06 11:05:48 -08:00
sfi
sh
sn
spi spi: Fix crash with double message finalisation on error handling 2014-02-22 10:32:45 -08:00
ssb ssb: implement spurious tone avoidance 2013-04-25 21:19:55 -07:00
staging staging: line6: Fix unlocked snd_pcm_stop() call 2014-03-11 16:10:09 -07:00
target target/file: Re-enable optional fd_buffered_io=1 operation 2014-02-20 10:45:33 -08:00
tc
thermal thermal: return an error on failure to register thermal class 2013-04-12 09:38:47 -07:00
tty tty: n_gsm: Fix for modems with brk in modem status control 2014-02-22 10:32:45 -08:00
uio Fix a few incorrectly checked [io_]remap_pfn_range() calls 2013-11-29 10:50:32 -08:00
usb USB: ftdi_sio: add Cressi Leonardo PID 2014-03-11 16:10:01 -07:00
uwb
vhost vhost: zerocopy: poll vq in zerocopy callback 2013-09-14 06:02:10 -07:00
video video: kyro: fix incorrect sizes when copying to userspace 2013-12-08 07:29:43 -08:00
virt
virtio virtio: support unlocked queue poll 2013-08-04 16:26:03 +08:00
vlynq
w1 w1: fix oops when w1_search is called from netlink connector 2013-03-20 13:04:59 -07:00
watchdog sc1200_wdt: Fix oops 2013-12-20 07:34:21 -08:00
xen xen/events: mask events when changing their VCPU binding 2014-03-11 16:10:07 -07:00
zorro
Kconfig
Makefile