Commit graph

567604 commits

Author SHA1 Message Date
Daniel Rosenberg
d0b44039aa ANDROID: sdcardfs: Fix gid issue
We were already calculating most of these values,
and erroring out because the check was confused by this.
Instead of recalculating, adjust it as needed.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 36160015
Change-Id: I9caf3e2fd32ca2e37ff8ed71b1d392f1761bc9a9
2017-03-14 14:53:51 -07:00
Daniel Rosenberg
003515b560 ANDROID: sdcardfs: Use tabs instead of spaces in multiuser.h
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 35331000
Change-Id: Ic7801914a7dd377e270647f81070020e1f0bab9b
2017-03-14 14:53:50 -07:00
Daniel Rosenberg
f1e5d00868 ANDROID: sdcardfs: Remove uninformative prints
At best these prints do not provide useful information, and
at worst, some allow userspace to abuse the kernel log.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 36138424
Change-Id: I812c57cc6a22b37262935ab77f48f3af4c36827e
2017-03-14 14:53:49 -07:00
Daniel Rosenberg
1a736af098 ANDROID: sdcardfs: move path_put outside of spinlock
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 35643557
Change-Id: Ib279ebd7dd4e5884d184d67696a93e34993bc1ef
2017-03-14 14:53:49 -07:00
Daniel Rosenberg
8dbb44c8aa ANDROID: sdcardfs: Use case insensitive hash function
Case insensitive comparisons don't help us much if
we hash to different buckets...

Signed-off-by: Daniel Rosenberg <drosen@google.com>
bug: 36004503
Change-Id: I91e00dbcd860a709cbd4f7fd7fc6d855779f3285
2017-03-14 14:53:48 -07:00
Daniel Rosenberg
1e2f5dbfa3 ANDROID: sdcardfs: declare MODULE_ALIAS_FS
From commit ee616b78aa87 ("Wrapfs: declare MODULE_ALIAS_FS")

Signed-off-by: Daniel Rosenberg <drosen@google.com>
bug: 35766959
Change-Id: Ia4728ab49d065b1d2eb27825046f14b97c328cba
2017-03-14 14:53:47 -07:00
Daniel Rosenberg
f84495e490 ANDROID: sdcardfs: Get the blocksize from the lower fs
This changes sdcardfs to be more in line with the
getattr in wrapfs, which calls the lower fs's getattr
to get the block size

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 34723223
Change-Id: I1c9e16604ba580a8cdefa17f02dcc489d7351aed
2017-03-14 14:53:46 -07:00
Daniel Rosenberg
a5504f851a ANDROID: sdcardfs: Use d_invalidate instead of drop_recurisve
drop_recursive did not properly remove stale dentries.
Instead, we use the vfs's d_invalidate, which does the proper cleanup.

Additionally, remove the no longer used drop_recursive, and
fixup_top_recursive that that are no longer used.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Change-Id: Ibff61b0c34b725b024a050169047a415bc90f0d8
2017-03-14 14:53:46 -07:00
Daniel Rosenberg
2c917ce671 ANDROID: sdcardfs: Switch to internal case insensitive compare
There were still a few places where we called into a case
insensitive lookup that was not defined by sdcardfs.
Moving them all to the same place will allow us to switch
the implementation in the future.

Additionally, the check in fixup_perms_recursive did not
take into account the length of both strings, causing
extraneous matches when the name we were looking for was
a prefix of the child name.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Change-Id: I45ce768cd782cb4ea1ae183772781387c590ecc2
2017-03-14 14:53:45 -07:00
Daniel Rosenberg
371536f070 ANDROID: sdcardfs: Use spin_lock_nested
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 36007653
Change-Id: I805d5afec797669679853fb2bb993ee38e6276e4
2017-03-14 14:53:44 -07:00
Daniel Rosenberg
650cf58edf ANDROID: sdcardfs: Replace get/put with d_lock
dput cannot be called with a spin_lock. Instead,
we protect our accesses by holding the d_lock.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 35643557
Change-Id: I22cf30856d75b5616cbb0c223724f5ab866b5114
2017-03-14 14:53:44 -07:00
Daniel Rosenberg
6693b94500 ANDROID: sdcardfs: rate limit warning print
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 35848445
Change-Id: Ida72ea0ece191b2ae4a8babae096b2451eb563f6
2017-03-14 14:53:43 -07:00
Daniel Rosenberg
3009d53256 ANDROID: sdcardfs: Fix case insensitive lookup
The previous case insensitive lookup relied on the
entry being present in the dcache. This instead uses
iterate_dir to find the correct case.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
bug: 35633782
Change-Id: I556f7090773468c1943c89a5e2aa07f746ba49c5
2017-03-14 14:53:43 -07:00
Jin Qian
3f7fac35ec ANDROID: uid_sys_stats: account for fsync syscalls
Change-Id: Ie888d8a0f4ec7a27dea86dc4afba8e6fd4203488
Signed-off-by: Jin Qian <jinqian@google.com>
2017-03-14 13:07:19 -07:00
Jin Qian
a4f5f251e9 ANDROID: sched: add a counter to track fsync
Change-Id: I6c138de5b2332eea70f57e098134d1d141247b3f
Signed-off-by: Jin Qian <jinqian@google.com>
2017-03-14 13:07:19 -07:00
Jin Qian
5c866b0f8a ANDROID: uid_sys_stats: fix negative write bytes.
A task can cancel writes made by other tasks. In rare cases,
cancelled_write_bytes is larger than write_bytes if the task
itself didn't make any write. This doesn't affect total size
but may cause confusion when looking at IO usage on individual
tasks.

Bug: 35851986
Change-Id: If6cb549aeef9e248e18d804293401bb2b91918ca
Signed-off-by: Jin Qian <jinqian@google.com>
2017-03-14 13:07:19 -07:00
Jin Qian
5a420edf10 ANDROID: uid_sys_stats: allow writing same state
Signed-off-by: Jin Qian <jinqian@google.com>
Bug: 34360629
Change-Id: Ia748351e07910b1febe54f0484ca1be58c4eb9c7
2017-03-14 13:07:19 -07:00
Jin Qian
6a61b529b4 ANDROID: uid_sys_stats: rename uid_cputime.c to uid_sys_stats.c
This module tracks cputime and io stats.

Signed-off-by: Jin Qian <jinqian@google.com>
Bug: 34198239
Change-Id: I9ee7d9e915431e0bb714b36b5a2282e1fdcc7342
2017-03-14 13:07:19 -07:00
Jin Qian
bce3e4dd9d ANDROID: uid_cputime: add per-uid IO usage accounting
IO usages are accounted in foreground and background buckets.
For each uid, io usage is calculated in two steps.

delta = current total of all uid tasks - previus total
current bucket += delta

Bucket is determined by current uid stat. Userspace writes to
/proc/uid_procstat/set <uid> <stat> when uid stat is updated.

/proc/uid_io/stats shows IO usage in this format.
<uid> <foreground IO> <background IO>

Signed-off-by: Jin Qian <jinqian@google.com>
Bug: 34198239
Change-Id: Ib8bebda53e7a56f45ea3eb0ec9a3153d44188102
2017-03-14 13:07:19 -07:00
Chris Redpath
a2849d4502 DTB: Add EAS compatible Juno Energy model to 'juno.dts'
EAS expects the energy model for the CPUs and cluster states to be
available in the DTB. The energy model data comes from previous versions.

Change-Id: I87535c8d802797361333929d809b43383bc8954b
(cherry picked from commit bf137f205f312a1814ae38f908ec7bdbdddeaa3e (LSK 4.4))
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2017-03-14 16:38:54 +00:00
Jon Medhurst (Tixy)
174a03a0bd arm64: dts: juno: Add idle-states to device tree
This patch adds idle-states bindings data collected through a set of
benchmarking experiments (latency and energy consumption) on Juno
boards. Latencies data represents the worst case scenarios as required
by the DT idle-states bindings.

Change-Id: I7b2d81fa66f8ce8b229457cfefff06e9edd545c7
(cherry picked from commit 286896f43b0248960f69660159b507b23751b38a)
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2017-03-14 14:48:31 +00:00
Mohan Srinivasan
6f4a2453a1 ANDROID: Replace spaces by '_' for some android filesystem tracepoints.
Andoid files frequently have spaces in them, as do cmdline strings.
Replace these spaces with '_', so tools that parse these tracepoints
don't get terribly confused.

Change-Id: I1cbbedf5c803aa6a58d9b8b7836e9125683c49d1
Signed-off-by: Mohan Srinivasan <srmohan@google.com>
(cherry picked from commit 5035d5f0933758dd515327d038e5bef7e40dbaa7)
2017-03-13 21:05:29 +00:00
Anson Jacob
f52e71a12e usb: gadget: f_accessory: Fix for UsbAccessory clean unbind.
Reapplying fix by Darren Whobrey (Change 69674)

Fixes issues: 20545, 59667 and 61390.
With prior version of f_accessory.c, UsbAccessories would not
unbind cleanly when application is closed or i/o stopped
while the usb cable is still connected. The accessory gadget
driver would be left in an invalid state which was not reset
on subsequent binding or opening. A reboot was necessary to clear.

In some phones this issues causes the phone to reboot upon
unplugging the USB cable.

Main problem was that acc_disconnect was being called on I/O error
which reset disconnected and online.

Minor fix required to properly track setting and unsetting of
disconnected and online flags. Also added urb Q wakeup's on unbind
to help unblock waiting threads.

Tested on Nexus 7 grouper. Expected behaviour now observed:
closing accessory causes blocked i/o to interrupt with IOException.
Accessory can be restarted following closing of file handle
and re-opening.

This is a generic fix that applies to all devices.

Change-Id: I4e08b326730dd3a2820c863124cee10f7cb5501e
Signed-off-by: Darren Whobrey <d.whobrey@mildai.org>
Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com>
2017-03-13 18:02:03 +00:00
Greg Kroah-Hartman
210bb28de0 Linux 4.4.53
am: 49616e7150

Change-Id: I8adb4630ce5ba2914bdf855fa8d3e18f164568a6
2017-03-12 08:25:46 +00:00
James Smart
7a261de18b scsi: lpfc: Correct WQ creation for pagesize
am: 9cee694650

Change-Id: I7b132ed755a070e95d41c0878238c829c91bc72d
2017-03-12 08:25:36 +00:00
Ralf Baechle
982f933a98 MIPS: IP22: Fix build error due to binutils 2.25 uselessnes.
am: 1d316060ca

Change-Id: Ic33bab057aa50274c447fcf81b62f0364432a095
2017-03-12 08:25:25 +00:00
Ralf Baechle
70d964e55e MIPS: IP22: Reformat inline assembler code to modern standards.
am: 4dd29050e4

Change-Id: I816af3e46a084f1980b18a80bae8b722af738d24
2017-03-12 08:25:15 +00:00
Ravi Bangoria
d32b060094 powerpc/xmon: Fix data-breakpoint
am: 15959b728d

Change-Id: I279706aa282690643745bc98005c2a3958701be9
2017-03-12 08:25:05 +00:00
Magnus Lilja
8ac43efa58 dmaengine: ipu: Make sure the interrupt routine checks all interrupts.
am: afee78f03e

Change-Id: I7b67e6fe82f33fe1a7cc32ac0e28f6c99bea87b0
2017-03-12 08:24:54 +00:00
Rafa Miecki
36f519a6bd bcma: use (get|put)_device when probing/removing device driver
am: 79a7ff1443

Change-Id: I3356c2eb32abf2e6d9cfb2152642349caba5941b
2017-03-12 08:24:45 +00:00
colyli@suse.de
3ff14c70fe md linear: fix a race between linear_add() and linear_congested()
am: 5a1f03f1ee

Change-Id: I3fd7c0c0cbf911b61d8aca203a75e13e698d7840
2017-03-12 08:24:35 +00:00
Maxime Ripard
25c567c768 rtc: sun6i: Switch to the external oscillator
am: 037cd23726

Change-Id: If84426848aa7178fc564d0bdaac39babd56e04ba
2017-03-12 08:24:25 +00:00
Maxime Ripard
c3482409de rtc: sun6i: Add some locking
am: ee360e99da

Change-Id: I0aaebc20574db0f6c3ebde4e0db355b4c6f12a1c
2017-03-12 08:24:16 +00:00
Weston Andros Adamson
ec8e7f39b4 NFSv4: fix getacl ERANGE for some ACL buffer sizes
am: a0378b5bfc

Change-Id: I4e78d196a895302acaac4ce91b1c72613ca3563a
2017-03-12 08:24:07 +00:00
J. Bruce Fields
27a9c6c0f3 NFSv4: fix getacl head length estimation
am: 5d23e89065

Change-Id: I6fe895f8a7cbd023c380ec78803e0ed5a4abaa35
2017-03-12 08:23:58 +00:00
Trond Myklebust
58c1c0b371 NFSv4: Fix memory and state leak in _nfs4_open_and_get_state
am: 52fb4bdcea

Change-Id: Ib5b96d8d3c2f97ae498aaecf58a5b2db01552478
2017-03-12 08:23:48 +00:00
Christoph Hellwig
a17ad00bf6 nfsd: special case truncates some more
am: 3ee4f442e5

Change-Id: I1d0858825f170caedb52ad76d321ac5249ebfe65
2017-03-12 08:23:38 +00:00
Christoph Hellwig
b833c4dc2f nfsd: minor nfsd_setattr cleanup
am: 6030493a34

Change-Id: I14e3bf413e9594a771468a9fc6388822c8a67693
2017-03-12 08:23:28 +00:00
Larry Finger
fe1c5bc55a rtlwifi: rtl8192c-common: Fix "BUG: KASAN:
am: 781e6a0838

Change-Id: Iacb0435f45bfd2a508e4a0fc352df9bf3234f6b3
2017-03-12 08:23:19 +00:00
Ping-Ke Shih
5e706a9321 rtlwifi: Fix alignment issues
am: 6e10c33cb8

Change-Id: I404361f27bcb75884fbfe272696f59c67916154f
2017-03-12 08:23:09 +00:00
Andrew Price
057f4303d1 gfs2: Add missing rcu locking for glock lookup
am: 70a09029b7

Change-Id: I936502d0217b7206108e4ff5eb087ff22044da40
2017-03-12 08:23:00 +00:00
Steve Wise
dbfdd61d3a rdma_cm: fail iwarp accepts w/o connection params
am: 44dd30e04c

Change-Id: I74cd1d6f0c218f84c037f088b4b39569c97c38dd
2017-03-12 08:22:49 +00:00
Jason Gunthorpe
ce400d3858 RDMA/core: Fix incorrect structure packing for booleans
am: 88326fe95f

Change-Id: I324f6a5c39fde9a0b603c3a4576375124d4e68d1
2017-03-12 08:22:39 +00:00
K. Y. Srinivasan
787b979877 Drivers: hv: util: Backup: Fix a rescind processing issue
am: f414af249f

Change-Id: I80ae316d5d7c94bfc9c8610a42fcee7138688b75
2017-03-12 08:22:30 +00:00
K. Y. Srinivasan
ead260ec7f Drivers: hv: util: Fcopy: Fix a rescind processing issue
am: 9b45ab2853

Change-Id: Ie39ca59a15db54a99d05b83db89d25550b030521
2017-03-12 08:22:18 +00:00
K. Y. Srinivasan
28ab7fa041 Drivers: hv: util: kvp: Fix a rescind processing issue
am: abaeda7f70

Change-Id: I62b201fc485b6d7729bcfd5384513b1dffe6ebb1
2017-03-12 08:22:07 +00:00
Vitaly Kuznetsov
01a674e930 hv: init percpu_list in hv_synic_alloc()
am: 862d2b7d21

Change-Id: I927eb14d83669dd186fc5401d127d2e34f39d7bb
2017-03-12 08:21:58 +00:00
Vitaly Kuznetsov
ce15984d91 hv: allocate synic pages for all present CPUs
am: 374907e8d1

Change-Id: I02cedccd5cf715fd4b48f75daa30d1316f8048bc
2017-03-12 08:21:43 +00:00
Magnus Lilja
c4bac4300f usb: gadget: udc: fsl: Add missing complete function.
am: 80190fcc48

Change-Id: Ib4f93f39b176b203c78a63bcdd8ab6b215db5b31
2017-03-12 08:21:32 +00:00
William wu
f8f2f4c516 usb: host: xhci: plat: check hcc_params after add hcd
am: 61e9e9bcfd

Change-Id: I34fa79dc6db2afab25940511c4993bf616a194bc
2017-03-12 08:21:22 +00:00