Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1301938 > unrolled thread
| Started by | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| First post | 2016-01-05 20:50 +0100 |
| Last post | 2016-01-05 22:00 +0100 |
| Articles | 20 on this page of 196 — 1 participant |
Back to article view | Back to linux.kernel
[4.2.y-ckt stable] Linux 4.2.8-ckt1 stable review Kamal Mostafa <kamal@canonical.com> - 2016-01-05 20:50 +0100
[PATCH 4.2.y-ckt 185/211] sctp: use the same clock as if sock source timestamps were on Kamal Mostafa <kamal@canonical.com> - 2016-01-05 20:50 +0100
[PATCH 4.2.y-ckt 067/211] dm: initialize non-blk-mq queue data before queue is used Kamal Mostafa <kamal@canonical.com> - 2016-01-05 20:50 +0100
[PATCH 4.2.y-ckt 153/211] of/fdt: fix error checking for earlycon address Kamal Mostafa <kamal@canonical.com> - 2016-01-05 20:50 +0100
[PATCH 4.2.y-ckt 167/211] selftests: kprobe: Choose an always-defined function to probe Kamal Mostafa <kamal@canonical.com> - 2016-01-05 20:50 +0100
[PATCH 4.2.y-ckt 077/211] megaraid_sas : SMAP restriction--do not access user memory from IOCTL code Kamal Mostafa <kamal@canonical.com> - 2016-01-05 20:50 +0100
[PATCH 4.2.y-ckt 103/211] scsi_sysfs: Fix queue_ramp_up_period return code Kamal Mostafa <kamal@canonical.com> - 2016-01-05 20:50 +0100
[PATCH 4.2.y-ckt 114/211] iio:magnetometer:bmc150_magn: sort entry alphabetically Kamal Mostafa <kamal@canonical.com> - 2016-01-05 20:50 +0100
[PATCH 4.2.y-ckt 093/211] memcg: fix thresholds for 32b architectures. Kamal Mostafa <kamal@canonical.com> - 2016-01-05 20:50 +0100
[PATCH 4.2.y-ckt 087/211] ALSA: hda - Add Intel Lewisburg device IDs Audio Kamal Mostafa <kamal@canonical.com> - 2016-01-05 20:50 +0100
[PATCH 4.2.y-ckt 168/211] selftests: Make scripts executable Kamal Mostafa <kamal@canonical.com> - 2016-01-05 20:50 +0100
[PATCH 4.2.y-ckt 116/211] net-sysfs: get_netdev_queue_index() cleanup Kamal Mostafa <kamal@canonical.com> - 2016-01-05 20:50 +0100
[PATCH 4.2.y-ckt 209/211] rhashtable: Fix walker list corruption Kamal Mostafa <kamal@canonical.com> - 2016-01-05 20:50 +0100
[PATCH 4.2.y-ckt 046/211] vTPM: fix memory allocation flag for rtce buffer at kernel boot Kamal Mostafa <kamal@canonical.com> - 2016-01-05 20:50 +0100
[PATCH 4.2.y-ckt 098/211] printk: prevent userland from spoofing kernel messages Kamal Mostafa <kamal@canonical.com> - 2016-01-05 20:50 +0100
[PATCH 4.2.y-ckt 207/211] af_unix: Revert 'lock_interruptible' in stream receive code Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 192/211] phy: micrel: Fix finding PHY properties in MAC node. Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 194/211] sh_eth: fix kernel oops in skb_put() Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 195/211] net: fix IP early demux races Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 211/211] KVM: x86: Reload pit counters for all channels when restoring state Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 191/211] ipv6: sctp: clone options to avoid use after free Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 201/211] bluetooth: Validate socket address length in sco_sock_bind(). Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 184/211] vxlan: fix incorrect RCO bit in VXLAN header Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 204/211] rhashtable: Enforce minimum size on initial hash table Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 208/211] tcp: restore fastopen with no data in SYN packet Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 181/211] gre6: allow to update all parameters via rtnl Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 199/211] net: check both type and procotol for tcp sockets Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 180/211] pppoe: fix memory corruption in padt work structure Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 190/211] r8152: fix lockup when runtime PM is enabled Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 210/211] KEYS: Fix race between read and revoke Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 189/211] net: qca_spi: fix transmit queue timeout handling Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 178/211] megaraid_sas: Make tape drives visible on PERC5 controllers Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 186/211] sctp: update the netstamp_needed counter when copying sockets Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 187/211] sctp: also copy sk_tsflags when copying the socket Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 183/211] ipv6: keep existing flags when setting IFA_F_OPTIMISTIC Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 196/211] pptp: verify sockaddr_len in pptp_bind() and pptp_connect() Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 202/211] net: fix uninitialized variable issue Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 203/211] ipv6: automatically enable stable privacy mode if stable_secret set Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 200/211] net_sched: make qdisc_tree_decrease_qlen() work for non mq Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 188/211] net: cdc_mbim: add "NDP to end" quirk for Huawei E3372 Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 206/211] fou: clean up socket with kfree_rcu Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 182/211] atl1c: Improve driver not to do order 4 GFP_ATOMIC allocation Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 193/211] net: add validation for the socket syscall protocol argument Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:00 +0100
[PATCH 4.2.y-ckt 166/211] vfio/platform: store mapped memory in region, instead of an on-stack copy Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 151/211] DT: mmc: sh_mmcif: fix "compatible" property text Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 169/211] thermal: exynos: Fix first temperature read after registering sensor Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 163/211] tracepoints: Fix documentation of RCU lockdep checks Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 165/211] ipv6: fix tunnel error handling Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 155/211] PCI: Set SR-IOV NumVFs to zero after enumeration Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 152/211] netfilter: nf_nat_redirect: add missing NULL pointer check Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 179/211] ARC: Fix silly typo in MAINTAINERS file Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 159/211] cpufreq: arm_big_little: fix frequency check when bL switcher is active Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 172/211] rtc: ds1307: Fix alarm programming for mcp794xx Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 173/211] NTB: fix 32-bit compiler warning Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 161/211] xprtrdma: Prevent loss of completion signals Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 177/211] TPM: Avoid reference to potentially freed memory Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 156/211] sparc/PCI: Add mem64 resource parsing for root bus Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 176/211] mvneta: add FIXED_PHY dependency Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 157/211] IB/core, cma: Make __attribute_const__ declarations sparse-friendly Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 171/211] perf trace: Fix documentation for -i Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 148/211] perf annotate: Fix 'annotate.use_offset' config variable usage Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 160/211] xprtrdma: Re-arm after missed events Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 158/211] ipv6: no CHECKSUM_PARTIAL on MSG_MORE corked sockets Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 162/211] qmi_wwan: fix entry for HP lt4112 LTE/HSPA+ Gobi 4G Module Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 164/211] net: fix percpu memory leaks Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 174/211] tpm_tis: free irq after probing Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 170/211] ipv4: fix a potential deadlock in mcast getsockopt() path Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 175/211] TPM: revert the list handling logic fixed in 398a1e7 Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 149/211] sunrpc: avoid warning in gss_key_timeout Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 150/211] MIPS: atomic: Fix comment describing atomic64_add_unless's return value. Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:10 +0100
[PATCH 4.2.y-ckt 124/211] netfilter: remove dead code Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 127/211] i2c: img-scb: enable fencing for all versions of the ip Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 128/211] i2c: img-scb: do dummy writes before fifo access Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 147/211] spi: omap2-mcspi: disable other channels CHCONF_FORCE in prepare_message Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 139/211] ALSA: dice: correct variable types for __be32 data Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 130/211] i2c: img-scb: fix LOW and HIGH period values for the SCL clock Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 122/211] [media] vivid: Fix iteration in driver removal path Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 143/211] kconfig: Fix copy&paste error Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 133/211] packet: fix match_fanout_group() Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 141/211] ALSA: fireworks: use u32 type for be32_to_cpup() macro Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 146/211] IB/core: avoid 32-bit warning Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 134/211] hsi: fix double kfree Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 145/211] RDMA/cxgb4: re-fix 32-bit build warning Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 137/211] ALSA: fireworks/bebob/oxfw/dice: enable to make as built-in Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 125/211] ipv4: Fix ip_local_out_sk by passing the sk into __ip_local_out_sk Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 123/211] devres: fix a for loop bounds check Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 132/211] i2c: img-scb: verify support for requested bit rate Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 138/211] drm: Fix return value of drm_framebuffer_init() Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 100/211] fs, seqfile: always allow oom killer Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 129/211] i2c: img-scb: use DIV_ROUND_UP to round divisor values Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 126/211] ipv4: Fix ip_queue_xmit to pass sk into ip_local_out_sk Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 113/211] dax_io(): don't let non-error value escape via retval instead of EFAULT Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 136/211] regulator: arizona-ldo1: Fix handling of GPIO 0 Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 118/211] tools build: Fixup feature detection display function name Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 142/211] ALSA: bebob: use correct type for __be32 data Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 140/211] ALSA: dice: assign converted data to the same type of variable Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 092/211] mm/oom_kill.c: reverse the order of setting TIF_MEMDIE and sending SIGKILL Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 131/211] i2c: img-scb: Clear line and interrupt status before starting a transfer Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 135/211] hsi: omap_ssi_port: Prevent warning if cawake_gpio is not defined. Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 144/211] tcp: apply Kern's check on RTTs used for congestion control Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:20 +0100
[PATCH 4.2.y-ckt 106/211] drivers: of: of_reserved_mem: fixup the alignment with CMA setup Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 086/211] tracefs: Fix refcount imbalance in start_creating() Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 108/211] FS-Cache: Increase reference of parent after registering, netfs success Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 120/211] dmaengine: dw: convert to __ffs() Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 119/211] wm831x_power: Use IRQF_ONESHOT to request threaded IRQs Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 097/211] proc: actually make proc_fd_permission() thread-friendly Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 111/211] binfmt_elf: Don't clobber passed executable's file header Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 110/211] FS-Cache: Handle a write to the page immediately beyond the EOF marker Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 109/211] FS-Cache: Don't override netfs's primary_index if registering failed Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 091/211] mm: slab: only move management objects off-slab for sizes larger than KMALLOC_MIN_SIZE Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 105/211] storvsc: Don't set the SRB_FLAGS_QUEUE_ACTION_ENABLE flag Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 095/211] arm64: bpf: fix mod-by-zero case Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 057/211] ACPI: Using correct irq when waiting for events Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 088/211] drm: Use userspace compatible type in fourcc_mod_code macro Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 112/211] fs/pipe.c: return error code rather than 0 in pipe_write() Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 101/211] parisc: Fixes and cleanups in kernel uapi header files Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 090/211] toshiba_acpi: Initialize hotkey_event_type variable Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 063/211] drm/amdgpu: add some additional CZ revisions Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 094/211] arm64: bpf: fix div-by-zero case Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 099/211] lib/hexdump.c: truncate output in case of overflow Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 059/211] i2c: at91: manage unexpected RXRDY flag when starting a transfer Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 085/211] ALSA: hda - Apply pin fixup for HP ProBook 6550b Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 121/211] tcp: call sk_mark_napi_id() on the child, not the listener Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 107/211] drm/ast: Initialized data needed to map fbdev memory Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 115/211] ALSA: pcm: remove structure member of 'struct snd_pcm_hwptr_log *' type because this structure had been removed Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 089/211] scsi: restart list search after unlock in scsi_remove_target Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 084/211] timers: Use proper base migration in add_timer_on() Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 078/211] xtensa: fix secondary core boot in SMP Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 102/211] perf: Fix inherited events vs. tracepoint filters Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 117/211] crypto: crc32c-pclmul - use .rodata instead of .rotata Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:30 +0100
[PATCH 4.2.y-ckt 079/211] recordmcount: Fix endianness handling bug for nop_mcount Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 052/211] [media] media: vb2 dma-sg: Fully cache synchronise buffers in prepare and finish Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 073/211] drm/amdgpu: Make amdgpu_mn functions inline Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 027/211] staging/dgnc: fix info leak in ioctl Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 066/211] megaraid_sas: Do not use PAGE_SIZE for max_sectors Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 080/211] recordmcount: arm64: Replace the ignored mcount call into nop Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 064/211] spi/spi-xilinx: Fix race condition on last word read Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 049/211] drm/amdgpu/gfx8: set TC_WB_ACTION_EN in RELEASE_MEM packet Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 081/211] KVM: VMX: fix SMEP and SMAP without EPT Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 013/211] bridge: fix netlink max attr size Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 051/211] [media] media: vb2 dma-contig: Fully cache synchronise buffers in prepare and finish Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 061/211] ALSA: hda - Disable 64bit address for Creative HDA controllers Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 065/211] megaraid_sas: Expose TAPE drives unconditionally Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 015/211] task_work: remove fifo ordering guarantee Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 072/211] xtensa: fixes for configs without loop option Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 076/211] PCI: spear: Fix dw_pcie_cfg_read/write() usage Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 021/211] KEYS: Don't permit request_key() to construct a new keyring Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 083/211] thermal: exynos: Fix unbalanced regulator disable on probe failure Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 062/211] MAINTAINERS: Add public mailing list for ARC Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 074/211] ALSA: hda - Fix lost 4k BDL boundary workaround Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 058/211] ACPI / PM: Fix incorrect wakeup IRQ setting during suspend-to-idle Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 012/211] net: bcmgenet: Delay PHY initialization to bcmgenet_open() Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 069/211] Revert "dm mpath: fix stalls when handling invalid ioctls" Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 060/211] ALSA: hda/realtek - Dell XPS one ALC3260 speaker no sound after resume back Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 070/211] drm/i915: add quirk to enable backlight on Dell Chromebook 11 (2015) Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 016/211] ebpf: fix fd refcount leaks related to maps in bpf syscall Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 068/211] mtd: blkdevs: fix potential deadlock + lockdep warnings Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 050/211] spi: dw: explicitly free IRQ handler in dw_spi_remove_host() Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 071/211] crypto: algif_hash - Only export and import on sockets with data Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 053/211] [media] media/v4l2-ctrls: fix setting autocluster to manual with VIDIOC_S_CTRL Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 054/211] i2c: at91: fix write transfers by clearing pending interrupt first Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 048/211] tpm, tpm_tis: fix tpm_tis ACPI detection issue with TPM 2.0 Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 075/211] tracing: Update instance_rmdir() to use tracefs_remove_recursive Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:40 +0100
[PATCH 4.2.y-ckt 043/211] iommu/arm-smmu: Fix error checking for ASID and VMID allocation Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 022/211] ARM: OMAP2+: board-generic: Remove stale of_irq macros Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 030/211] HID: core: Avoid uninitialized buffer access Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 039/211] f2fs crypto: allocate buffer for decrypting filename Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 031/211] [media] v4l2-compat-ioctl32: fix alignment for ARM64 Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 004/211] x86/xen: Do not clip xen_e820_map to xen_e820_map_entries when sanitizing map Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 035/211] ubi: fastmap: Implement produce_free_peb() Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 005/211] drm/radeon: add quirk for MSI R7 370 Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 037/211] drm/i915: Fix userptr deadlock with aliased GTT mmappings Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 047/211] tpm, tpm_crb: fix unaligned read of the command buffer address Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 044/211] jbd2: fix checkpoint list cleanup Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 032/211] mtd: mtdpart: fix add_mtd_partitions error path Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 028/211] ipv6: Fix IPsec pre-encap fragmentation check Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 023/211] vxlan: set needed headroom correctly Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 002/211] drivers: usb :fsl: Implement Workaround for USB Erratum A007792 Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 045/211] [PATCH] fix calculation of meta_bg descriptor backups Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 042/211] iommu/vt-d: Fix ATSR handling for Root-Complex integrated endpoints Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 003/211] drivers: usb: fsl: Workaround for USB erratum-A005275 Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 033/211] [media] v4l2-ctrls: arrays are also considered compound controls Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 034/211] [media] media: v4l2-ctrls: Fix 64bit support in get_ctrl() Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 006/211] drm/radeon: add quirk for ASUS R7 370 Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 029/211] KVM: svm: unconditionally intercept #DB Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 038/211] integrity: prevent loading untrusted certificates on the IMA trusted keyring Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 036/211] drm/i915: Only update the current userptr worker Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 041/211] lockd: create NSM handles per net namespace Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 040/211] spi: ti-qspi: Fix data corruption seen on r/w stress test Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 024/211] isdn_ppp: Add checks for allocation failure in isdn_ppp_open() Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 025/211] ppp, slip: Validate VJ compression slot parameters completely Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 026/211] [media] media/vivid-osd: fix info leak in ioctl Kamal Mostafa <kamal@canonical.com> - 2016-01-05 21:50 +0100
[PATCH 4.2.y-ckt 019/211] KEYS: Fix race between key destruction and finding a keyring by name Kamal Mostafa <kamal@canonical.com> - 2016-01-05 22:00 +0100
[PATCH 4.2.y-ckt 020/211] KEYS: Fix crash when attempt to garbage collect an uninstantiated keyring Kamal Mostafa <kamal@canonical.com> - 2016-01-05 22:00 +0100
[PATCH 4.2.y-ckt 018/211] scsi_dh: fix randconfig build error Kamal Mostafa <kamal@canonical.com> - 2016-01-05 22:00 +0100
[PATCH 4.2.y-ckt 017/211] netlink, mmap: fix edge-case leakages in nf queue zero-copy Kamal Mostafa <kamal@canonical.com> - 2016-01-05 22:00 +0100
Page 9 of 10 — ← Prev page 1 … 7 8 [9] 10 Next page →
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-05 21:40 +0100 |
| Subject | [PATCH 4.2.y-ckt 054/211] i2c: at91: fix write transfers by clearing pending interrupt first |
| Message-ID | <qNGyF-7WD-69@gated-at.bofh.it> |
| In reply to | #1301938 |
4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Cyrille Pitchen <cyrille.pitchen@atmel.com>
commit 6f6ddbb09d2a5baded0e23add3ad2d9e9417ab30 upstream.
In some cases a NACK interrupt may be pending in the Status Register (SR)
as a result of a previous transfer. However at91_do_twi_transfer() did not
read the SR to clear pending interruptions before starting a new transfer.
Hence a NACK interrupt rose as soon as it was enabled again at the I2C
controller level, resulting in a wrong sequence of operations and strange
patterns of behaviour on the I2C bus, such as a clock stretch followed by
a restart of the transfer.
This first issue occurred with both DMA and PIO write transfers.
Also when a NACK error was detected during a PIO write transfer, the
interrupt handler used to wrongly start a new transfer by writing into the
Transmit Holding Register (THR). Then the I2C slave was likely to reply
with a second NACK.
This second issue is fixed in atmel_twi_interrupt() by handling the TXRDY
status bit only if both the TXCOMP and NACK status bits are cleared.
Tested with a at24 eeprom on sama5d36ek board running a linux-4.1-at91
kernel image. Adapted to linux-next.
Reported-by: Peter Rosin <peda@lysator.liu.se>
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Tested-by: Peter Rosin <peda@lysator.liu.se>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Fixes: 93563a6a71bb ("i2c: at91: fix a race condition when using the DMA controller")
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
drivers/i2c/busses/i2c-at91.c | 58 +++++++++++++++++++++++++++++++++++++------
1 file changed, 50 insertions(+), 8 deletions(-)
diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c
index 1c758cd..94c087b 100644
--- a/drivers/i2c/busses/i2c-at91.c
+++ b/drivers/i2c/busses/i2c-at91.c
@@ -465,19 +465,57 @@ static irqreturn_t atmel_twi_interrupt(int irq, void *dev_id)
if (!irqstatus)
return IRQ_NONE;
- else if (irqstatus & AT91_TWI_RXRDY)
- at91_twi_read_next_byte(dev);
- else if (irqstatus & AT91_TWI_TXRDY)
- at91_twi_write_next_byte(dev);
-
- /* catch error flags */
- dev->transfer_status |= status;
+ /*
+ * When a NACK condition is detected, the I2C controller sets the NACK,
+ * TXCOMP and TXRDY bits all together in the Status Register (SR).
+ *
+ * 1 - Handling NACK errors with CPU write transfer.
+ *
+ * In such case, we should not write the next byte into the Transmit
+ * Holding Register (THR) otherwise the I2C controller would start a new
+ * transfer and the I2C slave is likely to reply by another NACK.
+ *
+ * 2 - Handling NACK errors with DMA write transfer.
+ *
+ * By setting the TXRDY bit in the SR, the I2C controller also triggers
+ * the DMA controller to write the next data into the THR. Then the
+ * result depends on the hardware version of the I2C controller.
+ *
+ * 2a - Without support of the Alternative Command mode.
+ *
+ * This is the worst case: the DMA controller is triggered to write the
+ * next data into the THR, hence starting a new transfer: the I2C slave
+ * is likely to reply by another NACK.
+ * Concurrently, this interrupt handler is likely to be called to manage
+ * the first NACK before the I2C controller detects the second NACK and
+ * sets once again the NACK bit into the SR.
+ * When handling the first NACK, this interrupt handler disables the I2C
+ * controller interruptions, especially the NACK interrupt.
+ * Hence, the NACK bit is pending into the SR. This is why we should
+ * read the SR to clear all pending interrupts at the beginning of
+ * at91_do_twi_transfer() before actually starting a new transfer.
+ *
+ * 2b - With support of the Alternative Command mode.
+ *
+ * When a NACK condition is detected, the I2C controller also locks the
+ * THR (and sets the LOCK bit in the SR): even though the DMA controller
+ * is triggered by the TXRDY bit to write the next data into the THR,
+ * this data actually won't go on the I2C bus hence a second NACK is not
+ * generated.
+ */
if (irqstatus & (AT91_TWI_TXCOMP | AT91_TWI_NACK)) {
at91_disable_twi_interrupts(dev);
complete(&dev->cmd_complete);
+ } else if (irqstatus & AT91_TWI_RXRDY) {
+ at91_twi_read_next_byte(dev);
+ } else if (irqstatus & AT91_TWI_TXRDY) {
+ at91_twi_write_next_byte(dev);
}
+ /* catch error flags */
+ dev->transfer_status |= status;
+
return IRQ_HANDLED;
}
@@ -487,6 +525,7 @@ static int at91_do_twi_transfer(struct at91_twi_dev *dev)
unsigned long time_left;
bool has_unre_flag = dev->pdata->has_unre_flag;
bool has_alt_cmd = dev->pdata->has_alt_cmd;
+ unsigned sr;
/*
* WARNING: the TXCOMP bit in the Status Register is NOT a clear on
@@ -537,6 +576,9 @@ static int at91_do_twi_transfer(struct at91_twi_dev *dev)
reinit_completion(&dev->cmd_complete);
dev->transfer_status = 0;
+ /* Clear pending interrupts, such as NACK. */
+ sr = at91_twi_read(dev, AT91_TWI_SR);
+
if (dev->fifo_size) {
unsigned fifo_mr = at91_twi_read(dev, AT91_TWI_FMR);
@@ -558,7 +600,7 @@ static int at91_do_twi_transfer(struct at91_twi_dev *dev)
} else if (dev->msg->flags & I2C_M_RD) {
unsigned start_flags = AT91_TWI_START;
- if (at91_twi_read(dev, AT91_TWI_SR) & AT91_TWI_RXRDY) {
+ if (sr & AT91_TWI_RXRDY) {
dev_err(dev->dev, "RXRDY still set!");
at91_twi_read(dev, AT91_TWI_RHR);
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-05 21:40 +0100 |
| Subject | [PATCH 4.2.y-ckt 048/211] tpm, tpm_tis: fix tpm_tis ACPI detection issue with TPM 2.0 |
| Message-ID | <qNGyF-7WD-73@gated-at.bofh.it> |
| In reply to | #1301938 |
4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
commit 399235dc6e95400a1322a9999e92073bc572f0c8 upstream.
Both for FIFO and CRB interface TCG has decided to use the same HID
MSFT0101. They can be differentiated by looking at the start method from
TPM2 ACPI table. This patches makes necessary fixes to tpm_tis and
tpm_crb modules in order to correctly detect, which module should be
used.
For MSFT0101 we must use struct acpi_driver because struct pnp_driver
has a 7 character limitation.
It turned out that the root cause in b371616b8 was not correct for
https://bugzilla.kernel.org/show_bug.cgi?id=98181.
v2:
* One fixup was missing from v1: is_tpm2_fifo -> is_fifo
v3:
* Use pnp_driver for existing HIDs and acpi_driver only for MSFT0101 in
order ensure backwards compatibility.
v4:
* Check for FIFO before doing *anything* in crb_acpi_add().
* There was return immediately after acpi_bus_unregister_driver() in
cleanup_tis(). This caused pnp_unregister_driver() not to be called.
Reported-by: Michael Saunders <mick.saunders@gmail.com>
Reported-by: Michael Marley <michael@michaelmarley.com>
Reported-by: Jethro Beekman <kernel@jbeekman.nl>
Reported-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Michael Marley <michael@michaelmarley.com>
Tested-by: Mimi Zohar <zohar@linux.vnet.ibm.com> (on TPM 1.2)
Reviewed-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
drivers/char/tpm/tpm.h | 7 ++
drivers/char/tpm/tpm_crb.c | 32 +++-----
drivers/char/tpm/tpm_tis.c | 192 ++++++++++++++++++++++++++++++++++++++-------
3 files changed, 181 insertions(+), 50 deletions(-)
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index f8319a0..39be5ac 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -115,6 +115,13 @@ enum tpm2_startup_types {
TPM2_SU_STATE = 0x0001,
};
+enum tpm2_start_method {
+ TPM2_START_ACPI = 2,
+ TPM2_START_FIFO = 6,
+ TPM2_START_CRB = 7,
+ TPM2_START_CRB_WITH_ACPI = 8,
+};
+
struct tpm_chip;
struct tpm_vendor_specific {
diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
index 83068fa..4bb9727 100644
--- a/drivers/char/tpm/tpm_crb.c
+++ b/drivers/char/tpm/tpm_crb.c
@@ -34,12 +34,6 @@ enum crb_defaults {
CRB_ACPI_START_INDEX = 1,
};
-enum crb_start_method {
- CRB_SM_ACPI_START = 2,
- CRB_SM_CRB = 7,
- CRB_SM_CRB_WITH_ACPI_START = 8,
-};
-
struct acpi_tpm2 {
struct acpi_table_header hdr;
u16 platform_class;
@@ -221,12 +215,6 @@ static int crb_acpi_add(struct acpi_device *device)
u64 pa;
int rc;
- chip = tpmm_chip_alloc(dev, &tpm_crb);
- if (IS_ERR(chip))
- return PTR_ERR(chip);
-
- chip->flags = TPM_CHIP_FLAG_TPM2;
-
status = acpi_get_table(ACPI_SIG_TPM2, 1,
(struct acpi_table_header **) &buf);
if (ACPI_FAILURE(status)) {
@@ -234,13 +222,15 @@ static int crb_acpi_add(struct acpi_device *device)
return -ENODEV;
}
- /* At least some versions of AMI BIOS have a bug that TPM2 table has
- * zero address for the control area and therefore we must fail.
- */
- if (!buf->control_area_pa) {
- dev_err(dev, "TPM2 ACPI table has a zero address for the control area\n");
- return -EINVAL;
- }
+ /* Should the FIFO driver handle this? */
+ if (buf->start_method == TPM2_START_FIFO)
+ return -ENODEV;
+
+ chip = tpmm_chip_alloc(dev, &tpm_crb);
+ if (IS_ERR(chip))
+ return PTR_ERR(chip);
+
+ chip->flags = TPM_CHIP_FLAG_TPM2;
if (buf->hdr.length < sizeof(struct acpi_tpm2)) {
dev_err(dev, "TPM2 ACPI table has wrong size");
@@ -260,11 +250,11 @@ static int crb_acpi_add(struct acpi_device *device)
* report only ACPI start but in practice seems to require both
* ACPI start and CRB start.
*/
- if (sm == CRB_SM_CRB || sm == CRB_SM_CRB_WITH_ACPI_START ||
+ if (sm == TPM2_START_CRB || sm == TPM2_START_FIFO ||
!strcmp(acpi_device_hid(device), "MSFT0101"))
priv->flags |= CRB_FL_CRB_START;
- if (sm == CRB_SM_ACPI_START || sm == CRB_SM_CRB_WITH_ACPI_START)
+ if (sm == TPM2_START_ACPI || sm == TPM2_START_CRB_WITH_ACPI)
priv->flags |= CRB_FL_ACPI_START;
priv->cca = (struct crb_control_area __iomem *)
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index f2dffa7..696ef1d 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005, 2006 IBM Corporation
- * Copyright (C) 2014 Intel Corporation
+ * Copyright (C) 2014, 2015 Intel Corporation
*
* Authors:
* Leendert van Doorn <leendert@watson.ibm.com>
@@ -28,6 +28,7 @@
#include <linux/wait.h>
#include <linux/acpi.h>
#include <linux/freezer.h>
+#include <acpi/actbl2.h>
#include "tpm.h"
enum tis_access {
@@ -65,6 +66,17 @@ enum tis_defaults {
TIS_LONG_TIMEOUT = 2000, /* 2 sec */
};
+struct tpm_info {
+ unsigned long start;
+ unsigned long len;
+ unsigned int irq;
+};
+
+static struct tpm_info tis_default_info = {
+ .start = TIS_MEM_BASE,
+ .len = TIS_MEM_LEN,
+ .irq = 0,
+};
/* Some timeout values are needed before it is known whether the chip is
* TPM 1.0 or TPM 2.0.
@@ -91,26 +103,54 @@ struct priv_data {
};
#if defined(CONFIG_PNP) && defined(CONFIG_ACPI)
-static int is_itpm(struct pnp_dev *dev)
+static int has_hid(struct acpi_device *dev, const char *hid)
{
- struct acpi_device *acpi = pnp_acpi_device(dev);
struct acpi_hardware_id *id;
- if (!acpi)
- return 0;
-
- list_for_each_entry(id, &acpi->pnp.ids, list) {
- if (!strcmp("INTC0102", id->id))
+ list_for_each_entry(id, &dev->pnp.ids, list)
+ if (!strcmp(hid, id->id))
return 1;
- }
return 0;
}
+
+static inline int is_itpm(struct acpi_device *dev)
+{
+ return has_hid(dev, "INTC0102");
+}
+
+static inline int is_fifo(struct acpi_device *dev)
+{
+ struct acpi_table_tpm2 *tbl;
+ acpi_status st;
+
+ /* TPM 1.2 FIFO */
+ if (!has_hid(dev, "MSFT0101"))
+ return 1;
+
+ st = acpi_get_table(ACPI_SIG_TPM2, 1,
+ (struct acpi_table_header **) &tbl);
+ if (ACPI_FAILURE(st)) {
+ dev_err(&dev->dev, "failed to get TPM2 ACPI table\n");
+ return 0;
+ }
+
+ if (le32_to_cpu(tbl->start_method) != TPM2_START_FIFO)
+ return 0;
+
+ /* TPM 2.0 FIFO */
+ return 1;
+}
#else
-static inline int is_itpm(struct pnp_dev *dev)
+static inline int is_itpm(struct acpi_device *dev)
{
return 0;
}
+
+static inline int is_fifo(struct acpi_device *dev)
+{
+ return 1;
+}
#endif
/* Before we attempt to access the TPM we must see that the valid bit is set.
@@ -600,9 +640,8 @@ static void tpm_tis_remove(struct tpm_chip *chip)
release_locality(chip, chip->vendor.locality, 1);
}
-static int tpm_tis_init(struct device *dev, acpi_handle acpi_dev_handle,
- resource_size_t start, resource_size_t len,
- unsigned int irq)
+static int tpm_tis_init(struct device *dev, struct tpm_info *tpm_info,
+ acpi_handle acpi_dev_handle)
{
u32 vendor, intfcaps, intmask;
int rc, i, irq_s, irq_e, probe;
@@ -622,7 +661,7 @@ static int tpm_tis_init(struct device *dev, acpi_handle acpi_dev_handle,
chip->acpi_dev_handle = acpi_dev_handle;
#endif
- chip->vendor.iobase = devm_ioremap(dev, start, len);
+ chip->vendor.iobase = devm_ioremap(dev, tpm_info->start, tpm_info->len);
if (!chip->vendor.iobase)
return -EIO;
@@ -707,7 +746,7 @@ static int tpm_tis_init(struct device *dev, acpi_handle acpi_dev_handle,
chip->vendor.iobase +
TPM_INT_ENABLE(chip->vendor.locality));
if (interrupts)
- chip->vendor.irq = irq;
+ chip->vendor.irq = tpm_info->irq;
if (interrupts && !chip->vendor.irq) {
irq_s =
ioread8(chip->vendor.iobase +
@@ -890,27 +929,27 @@ static SIMPLE_DEV_PM_OPS(tpm_tis_pm, tpm_pm_suspend, tpm_tis_resume);
static int tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
const struct pnp_device_id *pnp_id)
{
- resource_size_t start, len;
- unsigned int irq = 0;
+ struct tpm_info tpm_info = tis_default_info;
acpi_handle acpi_dev_handle = NULL;
- start = pnp_mem_start(pnp_dev, 0);
- len = pnp_mem_len(pnp_dev, 0);
+ tpm_info.start = pnp_mem_start(pnp_dev, 0);
+ tpm_info.len = pnp_mem_len(pnp_dev, 0);
if (pnp_irq_valid(pnp_dev, 0))
- irq = pnp_irq(pnp_dev, 0);
+ tpm_info.irq = pnp_irq(pnp_dev, 0);
else
interrupts = false;
- if (is_itpm(pnp_dev))
- itpm = true;
-
#ifdef CONFIG_ACPI
- if (pnp_acpi_device(pnp_dev))
+ if (pnp_acpi_device(pnp_dev)) {
+ if (is_itpm(pnp_acpi_device(pnp_dev)))
+ itpm = true;
+
acpi_dev_handle = pnp_acpi_device(pnp_dev)->handle;
+ }
#endif
- return tpm_tis_init(&pnp_dev->dev, acpi_dev_handle, start, len, irq);
+ return tpm_tis_init(&pnp_dev->dev, &tpm_info, acpi_dev_handle);
}
static struct pnp_device_id tpm_pnp_tbl[] = {
@@ -930,6 +969,7 @@ MODULE_DEVICE_TABLE(pnp, tpm_pnp_tbl);
static void tpm_tis_pnp_remove(struct pnp_dev *dev)
{
struct tpm_chip *chip = pnp_get_drvdata(dev);
+
tpm_chip_unregister(chip);
tpm_tis_remove(chip);
}
@@ -950,6 +990,79 @@ module_param_string(hid, tpm_pnp_tbl[TIS_HID_USR_IDX].id,
MODULE_PARM_DESC(hid, "Set additional specific HID for this driver to probe");
#endif
+#ifdef CONFIG_ACPI
+static int tpm_check_resource(struct acpi_resource *ares, void *data)
+{
+ struct tpm_info *tpm_info = (struct tpm_info *) data;
+ struct resource res;
+
+ if (acpi_dev_resource_interrupt(ares, 0, &res)) {
+ tpm_info->irq = res.start;
+ } else if (acpi_dev_resource_memory(ares, &res)) {
+ tpm_info->start = res.start;
+ tpm_info->len = resource_size(&res);
+ }
+
+ return 1;
+}
+
+static int tpm_tis_acpi_init(struct acpi_device *acpi_dev)
+{
+ struct list_head resources;
+ struct tpm_info tpm_info = tis_default_info;
+ int ret;
+
+ if (!is_fifo(acpi_dev))
+ return -ENODEV;
+
+ INIT_LIST_HEAD(&resources);
+ ret = acpi_dev_get_resources(acpi_dev, &resources, tpm_check_resource,
+ &tpm_info);
+ if (ret < 0)
+ return ret;
+
+ acpi_dev_free_resource_list(&resources);
+
+ if (!tpm_info.irq)
+ interrupts = false;
+
+ if (is_itpm(acpi_dev))
+ itpm = true;
+
+ return tpm_tis_init(&acpi_dev->dev, &tpm_info, acpi_dev->handle);
+}
+
+static int tpm_tis_acpi_remove(struct acpi_device *dev)
+{
+ struct tpm_chip *chip = dev_get_drvdata(&dev->dev);
+
+ tpm_chip_unregister(chip);
+ tpm_tis_remove(chip);
+
+ return 0;
+}
+
+static struct acpi_device_id tpm_acpi_tbl[] = {
+ {"MSFT0101", 0}, /* TPM 2.0 */
+ /* Add new here */
+ {"", 0}, /* User Specified */
+ {"", 0} /* Terminator */
+};
+MODULE_DEVICE_TABLE(acpi, tpm_acpi_tbl);
+
+static struct acpi_driver tis_acpi_driver = {
+ .name = "tpm_tis",
+ .ids = tpm_acpi_tbl,
+ .ops = {
+ .add = tpm_tis_acpi_init,
+ .remove = tpm_tis_acpi_remove,
+ },
+ .drv = {
+ .pm = &tpm_tis_pm,
+ },
+};
+#endif
+
static struct platform_driver tis_drv = {
.driver = {
.name = "tpm_tis",
@@ -966,9 +1079,25 @@ static int __init init_tis(void)
{
int rc;
#ifdef CONFIG_PNP
- if (!force)
- return pnp_register_driver(&tis_pnp_driver);
+ if (!force) {
+ rc = pnp_register_driver(&tis_pnp_driver);
+ if (rc)
+ return rc;
+ }
+#endif
+#ifdef CONFIG_ACPI
+ if (!force) {
+ rc = acpi_bus_register_driver(&tis_acpi_driver);
+ if (rc) {
+#ifdef CONFIG_PNP
+ pnp_unregister_driver(&tis_pnp_driver);
#endif
+ return rc;
+ }
+ }
+#endif
+ if (!force)
+ return 0;
rc = platform_driver_register(&tis_drv);
if (rc < 0)
@@ -978,7 +1107,7 @@ static int __init init_tis(void)
rc = PTR_ERR(pdev);
goto err_dev;
}
- rc = tpm_tis_init(&pdev->dev, NULL, TIS_MEM_BASE, TIS_MEM_LEN, 0);
+ rc = tpm_tis_init(&pdev->dev, &tis_default_info, NULL);
if (rc)
goto err_init;
return 0;
@@ -992,9 +1121,14 @@ err_dev:
static void __exit cleanup_tis(void)
{
struct tpm_chip *chip;
-#ifdef CONFIG_PNP
+#if defined(CONFIG_PNP) || defined(CONFIG_ACPI)
if (!force) {
+#ifdef CONFIG_ACPI
+ acpi_bus_unregister_driver(&tis_acpi_driver);
+#endif
+#ifdef CONFIG_PNP
pnp_unregister_driver(&tis_pnp_driver);
+#endif
return;
}
#endif
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-05 21:40 +0100 |
| Subject | [PATCH 4.2.y-ckt 075/211] tracing: Update instance_rmdir() to use tracefs_remove_recursive |
| Message-ID | <qNGyF-7WD-71@gated-at.bofh.it> |
| In reply to | #1301938 |
4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiaxing Wang <hello.wjx@gmail.com>
commit 681a4a2f4529517422835b7395df07404dfe2278 upstream.
Update instancd_rmdir to use tracefs_remove_recursive instead of
debugfs_remove_recursive.This was left in the transition from debugfs
to tracefs.
Link: http://lkml.kernel.org/r/1445169490-18315-2-git-send-email-hello.wjx@gmail.com
Fixes: 8434dc9340cd2 ("tracing: Convert the tracing facility over to use tracefs")
Signed-off-by: Jiaxing Wang <hello.wjx@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
kernel/trace/trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index abcbf7f..126f8f6 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -6602,7 +6602,7 @@ static int instance_rmdir(const char *name)
tracing_set_nop(tr);
event_trace_del_tracer(tr);
ftrace_destroy_function_files(tr);
- debugfs_remove_recursive(tr->dir);
+ tracefs_remove_recursive(tr->dir);
free_trace_buffers(tr);
kfree(tr->name);
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-05 21:50 +0100 |
| Subject | [PATCH 4.2.y-ckt 043/211] iommu/arm-smmu: Fix error checking for ASID and VMID allocation |
| Message-ID | <qNGIh-81C-1@gated-at.bofh.it> |
| In reply to | #1301938 |
4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Will Deacon <will.deacon@arm.com>
commit c0733a2cf30c1e7923b6ad4f8df67941502923de upstream.
The bitmap allocator returns an int, which is one of the standard
negative values on failure. Rather than assigning this straight to a
u16 (like we do for the ASID and VMID callers), which means that we
won't detect failure correctly, use an int for the purposes of error
checking.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
drivers/iommu/arm-smmu-v3.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
index da902ba..97d376a 100644
--- a/drivers/iommu/arm-smmu-v3.c
+++ b/drivers/iommu/arm-smmu-v3.c
@@ -1445,7 +1445,7 @@ static int arm_smmu_domain_finalise_s1(struct arm_smmu_domain *smmu_domain,
struct io_pgtable_cfg *pgtbl_cfg)
{
int ret;
- u16 asid;
+ int asid;
struct arm_smmu_device *smmu = smmu_domain->smmu;
struct arm_smmu_s1_cfg *cfg = &smmu_domain->s1_cfg;
@@ -1457,10 +1457,11 @@ static int arm_smmu_domain_finalise_s1(struct arm_smmu_domain *smmu_domain,
&cfg->cdptr_dma, GFP_KERNEL);
if (!cfg->cdptr) {
dev_warn(smmu->dev, "failed to allocate context descriptor\n");
+ ret = -ENOMEM;
goto out_free_asid;
}
- cfg->cd.asid = asid;
+ cfg->cd.asid = (u16)asid;
cfg->cd.ttbr = pgtbl_cfg->arm_lpae_s1_cfg.ttbr[0];
cfg->cd.tcr = pgtbl_cfg->arm_lpae_s1_cfg.tcr;
cfg->cd.mair = pgtbl_cfg->arm_lpae_s1_cfg.mair[0];
@@ -1474,7 +1475,7 @@ out_free_asid:
static int arm_smmu_domain_finalise_s2(struct arm_smmu_domain *smmu_domain,
struct io_pgtable_cfg *pgtbl_cfg)
{
- u16 vmid;
+ int vmid;
struct arm_smmu_device *smmu = smmu_domain->smmu;
struct arm_smmu_s2_cfg *cfg = &smmu_domain->s2_cfg;
@@ -1482,7 +1483,7 @@ static int arm_smmu_domain_finalise_s2(struct arm_smmu_domain *smmu_domain,
if (IS_ERR_VALUE(vmid))
return vmid;
- cfg->vmid = vmid;
+ cfg->vmid = (u16)vmid;
cfg->vttbr = pgtbl_cfg->arm_lpae_s2_cfg.vttbr;
cfg->vtcr = pgtbl_cfg->arm_lpae_s2_cfg.vtcr;
return 0;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-05 21:50 +0100 |
| Subject | [PATCH 4.2.y-ckt 022/211] ARM: OMAP2+: board-generic: Remove stale of_irq macros |
| Message-ID | <qNGIh-81C-5@gated-at.bofh.it> |
| In reply to | #1301938 |
4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Nishanth Menon <nm@ti.com>
commit a3b7470951ab49e5592d20c2bcfe5ee675221591 upstream.
When commit c4082d499fa2 ("ARM: omap2+: board-generic: clean up the
irq data from board file") cleaned up the direct usage of gic_of_init
and omap_intc_of_init, it failed to clean up the macros properly.
Since these macros are no longer used, lets just remove them.
Fixes: c4082d499fa2 ("ARM: omap2+: board-generic: clean up the irq data from board file")
Reported-by: Carlos Hernandez <ceh@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
arch/arm/mach-omap2/board-generic.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 34ff14b..22a8e01 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -20,13 +20,6 @@
#include "common.h"
-#if !(defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3))
-#define intc_of_init NULL
-#endif
-#ifndef CONFIG_ARCH_OMAP4
-#define gic_of_init NULL
-#endif
-
static const struct of_device_id omap_dt_match_table[] __initconst = {
{ .compatible = "simple-bus", },
{ .compatible = "ti,omap-infra", },
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-05 21:50 +0100 |
| Subject | [PATCH 4.2.y-ckt 030/211] HID: core: Avoid uninitialized buffer access |
| Message-ID | <qNGIi-81C-7@gated-at.bofh.it> |
| In reply to | #1301938 |
4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Richard Purdie <richard.purdie@linuxfoundation.org> commit 79b568b9d0c7c5d81932f4486d50b38efdd6da6d upstream. hid_connect adds various strings to the buffer but they're all conditional. You can find circumstances where nothing would be written to it but the kernel will still print the supposedly empty buffer with printk. This leads to corruption on the console/in the logs. Ensure buf is initialized to an empty string. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> [dvhart: Initialize string to "" rather than assign buf[0] = NULL;] Cc: Jiri Kosina <jikos@kernel.org> Cc: linux-input@vger.kernel.org Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Kamal Mostafa <kamal@canonical.com> --- drivers/hid/hid-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index e6fce23..e3edddd 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1591,7 +1591,7 @@ int hid_connect(struct hid_device *hdev, unsigned int connect_mask) "Multi-Axis Controller" }; const char *type, *bus; - char buf[64]; + char buf[64] = ""; unsigned int i; int len; int ret; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-05 21:50 +0100 |
| Subject | [PATCH 4.2.y-ckt 039/211] f2fs crypto: allocate buffer for decrypting filename |
| Message-ID | <qNGIi-81C-11@gated-at.bofh.it> |
| In reply to | #1301938 |
4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Jaegeuk Kim <jaegeuk@kernel.org>
commit 569cf1876a32e574ba8a7fb825cd91bafd003882 upstream.
We got dentry pages from high_mem, and its address space directly goes into the
decryption path via f2fs_fname_disk_to_usr.
But, sg_init_one assumes the address is not from high_mem, so we can get this
panic since it doesn't call kmap_high but kunmap_high is triggered at the end.
kernel BUG at ../../../../../../kernel/mm/highmem.c:290!
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
...
(kunmap_high+0xb0/0xb8) from [<c0114534>] (__kunmap_atomic+0xa0/0xa4)
(__kunmap_atomic+0xa0/0xa4) from [<c035f028>] (blkcipher_walk_done+0x128/0x1ec)
(blkcipher_walk_done+0x128/0x1ec) from [<c0366c24>] (crypto_cbc_decrypt+0xc0/0x170)
(crypto_cbc_decrypt+0xc0/0x170) from [<c0367148>] (crypto_cts_decrypt+0xc0/0x114)
(crypto_cts_decrypt+0xc0/0x114) from [<c035ea98>] (async_decrypt+0x40/0x48)
(async_decrypt+0x40/0x48) from [<c032ca34>] (f2fs_fname_disk_to_usr+0x124/0x304)
(f2fs_fname_disk_to_usr+0x124/0x304) from [<c03056fc>] (f2fs_fill_dentries+0xac/0x188)
(f2fs_fill_dentries+0xac/0x188) from [<c03059c8>] (f2fs_readdir+0x1f0/0x300)
(f2fs_readdir+0x1f0/0x300) from [<c0218054>] (vfs_readdir+0x90/0xb4)
(vfs_readdir+0x90/0xb4) from [<c0218418>] (SyS_getdents64+0x64/0xcc)
(SyS_getdents64+0x64/0xcc) from [<c0105ba0>] (ret_fast_syscall+0x0/0x30)
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
fs/f2fs/dir.c | 13 ++++++++++---
fs/f2fs/namei.c | 10 +++++++++-
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index a34ebd8..710c703 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -787,7 +787,6 @@ bool f2fs_fill_dentries(struct dir_context *ctx, struct f2fs_dentry_ptr *d,
else
d_type = DT_UNKNOWN;
- /* encrypted case */
de_name.name = d->filename[bit_pos];
de_name.len = le16_to_cpu(de->name_len);
@@ -795,12 +794,20 @@ bool f2fs_fill_dentries(struct dir_context *ctx, struct f2fs_dentry_ptr *d,
int save_len = fstr->len;
int ret;
+ de_name.name = kmalloc(de_name.len, GFP_NOFS);
+ if (!de_name.name)
+ return false;
+
+ memcpy(de_name.name, d->filename[bit_pos], de_name.len);
+
ret = f2fs_fname_disk_to_usr(d->inode, &de->hash_code,
&de_name, fstr);
- de_name = *fstr;
- fstr->len = save_len;
+ kfree(de_name.name);
if (ret < 0)
return true;
+
+ de_name = *fstr;
+ fstr->len = save_len;
}
if (!dir_emit(ctx, de_name.name, de_name.len,
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index fdbae21..ce4cbe8 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -940,8 +940,13 @@ static const char *f2fs_encrypted_follow_link(struct dentry *dentry, void **cook
/* Symlink is encrypted */
sd = (struct f2fs_encrypted_symlink_data *)caddr;
- cstr.name = sd->encrypted_path;
cstr.len = le16_to_cpu(sd->len);
+ cstr.name = kmalloc(cstr.len, GFP_NOFS);
+ if (!cstr.name) {
+ res = -ENOMEM;
+ goto errout;
+ }
+ memcpy(cstr.name, sd->encrypted_path, cstr.len);
/* this is broken symlink case */
if (cstr.name[0] == 0 && cstr.len == 0) {
@@ -963,6 +968,8 @@ static const char *f2fs_encrypted_follow_link(struct dentry *dentry, void **cook
if (res < 0)
goto errout;
+ kfree(cstr.name);
+
paddr = pstr.name;
/* Null-terminate the name */
@@ -972,6 +979,7 @@ static const char *f2fs_encrypted_follow_link(struct dentry *dentry, void **cook
page_cache_release(cpage);
return *cookie = paddr;
errout:
+ kfree(cstr.name);
f2fs_fname_crypto_free_buffer(&pstr);
kunmap(cpage);
page_cache_release(cpage);
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-05 21:50 +0100 |
| Subject | [PATCH 4.2.y-ckt 031/211] [media] v4l2-compat-ioctl32: fix alignment for ARM64 |
| Message-ID | <qNGIi-81C-9@gated-at.bofh.it> |
| In reply to | #1301938 |
4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrzej Hajda <a.hajda@samsung.com>
commit 655e9780ab913a3a06d4a164d55e3b755524186d upstream.
Alignment/padding rules on AMD64 and ARM64 differs. To allow properly match
compatible ioctls on ARM64 kernels without breaking AMD64 some fields
should be aligned using compat_s64 type and in one case struct should be
unpacked.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
[hans.verkuil@cisco.com: use compat_u64 instead of compat_s64 in v4l2_input32]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
index af63543..788b31c 100644
--- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
+++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
@@ -266,7 +266,7 @@ static int put_v4l2_create32(struct v4l2_create_buffers *kp, struct v4l2_create_
struct v4l2_standard32 {
__u32 index;
- __u32 id[2]; /* __u64 would get the alignment wrong */
+ compat_u64 id;
__u8 name[24];
struct v4l2_fract frameperiod; /* Frames, not fields */
__u32 framelines;
@@ -286,7 +286,7 @@ static int put_v4l2_standard32(struct v4l2_standard *kp, struct v4l2_standard32
{
if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_standard32)) ||
put_user(kp->index, &up->index) ||
- copy_to_user(up->id, &kp->id, sizeof(__u64)) ||
+ put_user(kp->id, &up->id) ||
copy_to_user(up->name, kp->name, 24) ||
copy_to_user(&up->frameperiod, &kp->frameperiod, sizeof(kp->frameperiod)) ||
put_user(kp->framelines, &up->framelines) ||
@@ -587,10 +587,10 @@ struct v4l2_input32 {
__u32 type; /* Type of input */
__u32 audioset; /* Associated audios (bitfield) */
__u32 tuner; /* Associated tuner */
- v4l2_std_id std;
+ compat_u64 std;
__u32 status;
__u32 reserved[4];
-} __attribute__ ((packed));
+};
/* The 64-bit v4l2_input struct has extra padding at the end of the struct.
Otherwise it is identical to the 32-bit version. */
@@ -738,6 +738,7 @@ static int put_v4l2_ext_controls32(struct v4l2_ext_controls *kp, struct v4l2_ext
struct v4l2_event32 {
__u32 type;
union {
+ compat_s64 value64;
__u8 data[64];
} u;
__u32 pending;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-05 21:50 +0100 |
| Subject | [PATCH 4.2.y-ckt 004/211] x86/xen: Do not clip xen_e820_map to xen_e820_map_entries when sanitizing map |
| Message-ID | <qNGIi-81C-19@gated-at.bofh.it> |
| In reply to | #1301938 |
4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Malcolm Crossley <malcolm.crossley@citrix.com> commit 64c98e7f49100b637cd20a6c63508caed6bbba7a upstream. Sanitizing the e820 map may produce extra E820 entries which would result in the topmost E820 entries being removed. The removed entries would typically include the top E820 usable RAM region and thus result in the domain having signicantly less RAM available to it. Fix by allowing sanitize_e820_map to use the full size of the allocated E820 array. Signed-off-by: Malcolm Crossley <malcolm.crossley@citrix.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com> [ kamal: backport to 3.19-stable: context ] Signed-off-by: Kamal Mostafa <kamal@canonical.com> --- arch/x86/xen/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index 55f388e..de7a8d7 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c @@ -612,7 +612,7 @@ char * __init xen_memory_setup(void) xen_ignore_unusable(map, memmap.nr_entries); /* Make sure the Xen-supplied memory map is well-ordered. */ - sanitize_e820_map(map, memmap.nr_entries, &memmap.nr_entries); + sanitize_e820_map(map, ARRAY_SIZE(map), &memmap.nr_entries); max_pages = xen_get_max_pages(); if (max_pages > max_pfn) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-05 21:50 +0100 |
| Subject | [PATCH 4.2.y-ckt 035/211] ubi: fastmap: Implement produce_free_peb() |
| Message-ID | <qNGIi-81C-23@gated-at.bofh.it> |
| In reply to | #1301938 |
4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Richard Weinberger <richard@nod.at>
commit 1cb8f9776c7dcadc57885c6653943511d282633b upstream.
If fastmap requests a free PEB for a pool and UBI is busy
with erasing PEBs we need to offer a function to wait for one.
We can reuse produce_free_peb() from the non-fastmap WL code
but with different locking semantics.
Reported-and-tested-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
drivers/mtd/ubi/fastmap-wl.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/drivers/mtd/ubi/fastmap-wl.c b/drivers/mtd/ubi/fastmap-wl.c
index b2a6653..30d3999 100644
--- a/drivers/mtd/ubi/fastmap-wl.c
+++ b/drivers/mtd/ubi/fastmap-wl.c
@@ -172,6 +172,30 @@ void ubi_refill_pools(struct ubi_device *ubi)
}
/**
+ * produce_free_peb - produce a free physical eraseblock.
+ * @ubi: UBI device description object
+ *
+ * This function tries to make a free PEB by means of synchronous execution of
+ * pending works. This may be needed if, for example the background thread is
+ * disabled. Returns zero in case of success and a negative error code in case
+ * of failure.
+ */
+static int produce_free_peb(struct ubi_device *ubi)
+{
+ int err;
+
+ while (!ubi->free.rb_node && ubi->works_count) {
+ dbg_wl("do one work synchronously");
+ err = do_work(ubi);
+
+ if (err)
+ return err;
+ }
+
+ return 0;
+}
+
+/**
* ubi_wl_get_peb - get a physical eraseblock.
* @ubi: UBI device description object
*
@@ -213,6 +237,11 @@ again:
}
retried = 1;
up_read(&ubi->fm_eba_sem);
+ ret = produce_free_peb(ubi);
+ if (ret < 0) {
+ down_read(&ubi->fm_eba_sem);
+ goto out;
+ }
goto again;
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-05 21:50 +0100 |
| Subject | [PATCH 4.2.y-ckt 005/211] drm/radeon: add quirk for MSI R7 370 |
| Message-ID | <qNGIi-81C-13@gated-at.bofh.it> |
| In reply to | #1301938 |
4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Maxim Sheviakov <mrader3940@yandex.ru>
commit e78654799135a788a941bacad3452fbd7083e518 upstream.
Just adds the quirk for MSI R7 370 Armor 2X
Bug:
https://bugs.freedesktop.org/show_bug.cgi?id=91294
Signed-off-by: Maxim Sheviakov <mrader3940@yandex.ru>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
drivers/gpu/drm/radeon/si_dpm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
index 787cd8f..e9115d3 100644
--- a/drivers/gpu/drm/radeon/si_dpm.c
+++ b/drivers/gpu/drm/radeon/si_dpm.c
@@ -2927,6 +2927,7 @@ static struct si_dpm_quirk si_dpm_quirk_list[] = {
{ PCI_VENDOR_ID_ATI, 0x6810, 0x1462, 0x3036, 0, 120000 },
{ PCI_VENDOR_ID_ATI, 0x6811, 0x174b, 0xe271, 0, 120000 },
{ PCI_VENDOR_ID_ATI, 0x6810, 0x174b, 0xe271, 85000, 90000 },
+ { PCI_VENDOR_ID_ATI, 0x6811, 0x1762, 0x2015, 0, 120000 },
{ 0, 0, 0, 0 },
};
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-05 21:50 +0100 |
| Subject | [PATCH 4.2.y-ckt 037/211] drm/i915: Fix userptr deadlock with aliased GTT mmappings |
| Message-ID | <qNGIi-81C-15@gated-at.bofh.it> |
| In reply to | #1301938 |
4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Chris Wilson <chris@chris-wilson.co.uk>
commit e4b946bfe1e36680e27a5f39163980979fa61a5d upstream.
Michał Winiarski found a really evil way to trigger a struct_mutex
deadlock with userptr. He found that if he allocated a userptr bo and
then GTT mmaped another bo, or even itself, at the same address as the
userptr using MAP_FIXED, he could then cause a deadlock any time we then
had to invalidate the GTT mmappings (so at will). Tvrtko then found by
repeatedly allocating GTT mmappings he could alias with an old userptr
mmap and also trigger the deadlock.
To counter act the deadlock, we make the observation that we only need
to take the struct_mutex if the object has any pages to revoke, and that
before userspace can alias with the userptr address space, it must have
invalidated the userptr->pages. Thus if we can check for those pages
outside of the struct_mutex, we can avoid the deadlock. To do so we
introduce a separate flag for userptr objects that we can inspect from
the mmu-notifier underneath its spinlock.
The patch makes one eye-catching change. That is the removal serial=0
after detecting a to-be-freed object inside the invalidate walker. I
felt setting serial=0 was a questionable pessimisation: it denies us the
chance to reuse the current iterator for the next loop (before it is
freed) and being explicit makes the reader question the validity of the
locking (since the object-free race could occur elsewhere). The
serialisation of the iterator is through the spinlock, if the object is
freed before the next loop then the notifier.serial will be incremented
and we start the walk from the beginning as we detect the invalid cache.
To try and tame the error paths and interactions with the userptr->active
flag, we have to do a fair amount of rearranging of get_pages_userptr().
v2: Grammar fixes
v3: Reorder set-active so that it is only set when obj->pages is set
(and so needs cancellation). Only the order of setting obj->pages and
the active-flag is crucial. Calling gup after invalidate-range begin
means the userptr sees the new set of backing storage (and so will not
need to invalidate its new pages), but we have to be careful not to set
the active-flag prior to successfully establishing obj->pages.
v4: Take the active->flag early so we know in the mmu-notifier when we
have to cancel a pending gup-worker.
v5: Rearrange the error path so that is not so convoluted
v6: Set pinned to 0 when negative before calling release_pages()
Reported-by: Michał Winiarski <michal.winiarski@intel.com>
Testcase: igt/gem_userptr_blits/map-fixed*
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
drivers/gpu/drm/i915/i915_gem_userptr.c | 175 ++++++++++++++++++++------------
1 file changed, 109 insertions(+), 66 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_userptr.c b/drivers/gpu/drm/i915/i915_gem_userptr.c
index 203a569..4037f89 100644
--- a/drivers/gpu/drm/i915/i915_gem_userptr.c
+++ b/drivers/gpu/drm/i915/i915_gem_userptr.c
@@ -59,6 +59,7 @@ struct i915_mmu_object {
struct interval_tree_node it;
struct list_head link;
struct drm_i915_gem_object *obj;
+ bool active;
bool is_linear;
};
@@ -114,7 +115,8 @@ restart:
obj = mo->obj;
- if (!kref_get_unless_zero(&obj->base.refcount))
+ if (!mo->active ||
+ !kref_get_unless_zero(&obj->base.refcount))
continue;
spin_unlock(&mn->lock);
@@ -151,7 +153,8 @@ static void i915_gem_userptr_mn_invalidate_range_start(struct mmu_notifier *_mn,
else
it = interval_tree_iter_first(&mn->objects, start, end);
if (it != NULL) {
- obj = container_of(it, struct i915_mmu_object, it)->obj;
+ struct i915_mmu_object *mo =
+ container_of(it, struct i915_mmu_object, it);
/* The mmu_object is released late when destroying the
* GEM object so it is entirely possible to gain a
@@ -160,11 +163,9 @@ static void i915_gem_userptr_mn_invalidate_range_start(struct mmu_notifier *_mn,
* the struct_mutex - and consequently use it after it
* is freed and then double free it.
*/
- if (!kref_get_unless_zero(&obj->base.refcount)) {
- spin_unlock(&mn->lock);
- serial = 0;
- continue;
- }
+ if (mo->active &&
+ kref_get_unless_zero(&mo->obj->base.refcount))
+ obj = mo->obj;
serial = mn->serial;
}
@@ -566,6 +567,30 @@ __i915_gem_userptr_set_pages(struct drm_i915_gem_object *obj,
}
static void
+__i915_gem_userptr_set_active(struct drm_i915_gem_object *obj,
+ bool value)
+{
+ /* During mm_invalidate_range we need to cancel any userptr that
+ * overlaps the range being invalidated. Doing so requires the
+ * struct_mutex, and that risks recursion. In order to cause
+ * recursion, the user must alias the userptr address space with
+ * a GTT mmapping (possible with a MAP_FIXED) - then when we have
+ * to invalidate that mmaping, mm_invalidate_range is called with
+ * the userptr address *and* the struct_mutex held. To prevent that
+ * we set a flag under the i915_mmu_notifier spinlock to indicate
+ * whether this object is valid.
+ */
+#if defined(CONFIG_MMU_NOTIFIER)
+ if (obj->userptr.mmu_object == NULL)
+ return;
+
+ spin_lock(&obj->userptr.mmu_object->mn->lock);
+ obj->userptr.mmu_object->active = value;
+ spin_unlock(&obj->userptr.mmu_object->mn->lock);
+#endif
+}
+
+static void
__i915_gem_userptr_get_pages_worker(struct work_struct *_work)
{
struct get_pages_work *work = container_of(_work, typeof(*work), work);
@@ -613,6 +638,8 @@ __i915_gem_userptr_get_pages_worker(struct work_struct *_work)
}
}
obj->userptr.work = ERR_PTR(ret);
+ if (ret)
+ __i915_gem_userptr_set_active(obj, false);
}
obj->userptr.workers--;
@@ -627,11 +654,60 @@ __i915_gem_userptr_get_pages_worker(struct work_struct *_work)
}
static int
+__i915_gem_userptr_get_pages_schedule(struct drm_i915_gem_object *obj,
+ bool *active)
+{
+ struct get_pages_work *work;
+
+ /* Spawn a worker so that we can acquire the
+ * user pages without holding our mutex. Access
+ * to the user pages requires mmap_sem, and we have
+ * a strict lock ordering of mmap_sem, struct_mutex -
+ * we already hold struct_mutex here and so cannot
+ * call gup without encountering a lock inversion.
+ *
+ * Userspace will keep on repeating the operation
+ * (thanks to EAGAIN) until either we hit the fast
+ * path or the worker completes. If the worker is
+ * cancelled or superseded, the task is still run
+ * but the results ignored. (This leads to
+ * complications that we may have a stray object
+ * refcount that we need to be wary of when
+ * checking for existing objects during creation.)
+ * If the worker encounters an error, it reports
+ * that error back to this function through
+ * obj->userptr.work = ERR_PTR.
+ */
+ if (obj->userptr.workers >= I915_GEM_USERPTR_MAX_WORKERS)
+ return -EAGAIN;
+
+ work = kmalloc(sizeof(*work), GFP_KERNEL);
+ if (work == NULL)
+ return -ENOMEM;
+
+ obj->userptr.work = &work->work;
+ obj->userptr.workers++;
+
+ work->obj = obj;
+ drm_gem_object_reference(&obj->base);
+
+ work->task = current;
+ get_task_struct(work->task);
+
+ INIT_WORK(&work->work, __i915_gem_userptr_get_pages_worker);
+ schedule_work(&work->work);
+
+ *active = true;
+ return -EAGAIN;
+}
+
+static int
i915_gem_userptr_get_pages(struct drm_i915_gem_object *obj)
{
const int num_pages = obj->base.size >> PAGE_SHIFT;
struct page **pvec;
int pinned, ret;
+ bool active;
/* If userspace should engineer that these pages are replaced in
* the vma between us binding this page into the GTT and completion
@@ -649,6 +725,18 @@ i915_gem_userptr_get_pages(struct drm_i915_gem_object *obj)
* to the vma (discard or cloning) which should prevent the more
* egregious cases from causing harm.
*/
+ if (IS_ERR(obj->userptr.work)) {
+ /* active flag will have been dropped already by the worker */
+ ret = PTR_ERR(obj->userptr.work);
+ obj->userptr.work = NULL;
+ return ret;
+ }
+ if (obj->userptr.work)
+ /* active flag should still be held for the pending work */
+ return -EAGAIN;
+
+ /* Let the mmu-notifier know that we have begun and need cancellation */
+ __i915_gem_userptr_set_active(obj, true);
pvec = NULL;
pinned = 0;
@@ -657,73 +745,27 @@ i915_gem_userptr_get_pages(struct drm_i915_gem_object *obj)
GFP_TEMPORARY | __GFP_NOWARN | __GFP_NORETRY);
if (pvec == NULL) {
pvec = drm_malloc_ab(num_pages, sizeof(struct page *));
- if (pvec == NULL)
+ if (pvec == NULL) {
+ __i915_gem_userptr_set_active(obj, false);
return -ENOMEM;
+ }
}
pinned = __get_user_pages_fast(obj->userptr.ptr, num_pages,
!obj->userptr.read_only, pvec);
}
- if (pinned < num_pages) {
- if (pinned < 0) {
- ret = pinned;
- pinned = 0;
- } else {
- /* Spawn a worker so that we can acquire the
- * user pages without holding our mutex. Access
- * to the user pages requires mmap_sem, and we have
- * a strict lock ordering of mmap_sem, struct_mutex -
- * we already hold struct_mutex here and so cannot
- * call gup without encountering a lock inversion.
- *
- * Userspace will keep on repeating the operation
- * (thanks to EAGAIN) until either we hit the fast
- * path or the worker completes. If the worker is
- * cancelled or superseded, the task is still run
- * but the results ignored. (This leads to
- * complications that we may have a stray object
- * refcount that we need to be wary of when
- * checking for existing objects during creation.)
- * If the worker encounters an error, it reports
- * that error back to this function through
- * obj->userptr.work = ERR_PTR.
- */
- ret = -EAGAIN;
- if (obj->userptr.work == NULL &&
- obj->userptr.workers < I915_GEM_USERPTR_MAX_WORKERS) {
- struct get_pages_work *work;
-
- work = kmalloc(sizeof(*work), GFP_KERNEL);
- if (work != NULL) {
- obj->userptr.work = &work->work;
- obj->userptr.workers++;
-
- work->obj = obj;
- drm_gem_object_reference(&obj->base);
-
- work->task = current;
- get_task_struct(work->task);
-
- INIT_WORK(&work->work, __i915_gem_userptr_get_pages_worker);
- schedule_work(&work->work);
- } else
- ret = -ENOMEM;
- } else {
- if (IS_ERR(obj->userptr.work)) {
- ret = PTR_ERR(obj->userptr.work);
- obj->userptr.work = NULL;
- }
- }
- }
- } else {
+
+ active = false;
+ if (pinned < 0)
+ ret = pinned, pinned = 0;
+ else if (pinned < num_pages)
+ ret = __i915_gem_userptr_get_pages_schedule(obj, &active);
+ else
ret = __i915_gem_userptr_set_pages(obj, pvec, num_pages);
- if (ret == 0) {
- obj->userptr.work = NULL;
- pinned = 0;
- }
+ if (ret) {
+ __i915_gem_userptr_set_active(obj, active);
+ release_pages(pvec, pinned, 0);
}
-
- release_pages(pvec, pinned, 0);
drm_free_large(pvec);
return ret;
}
@@ -734,6 +776,7 @@ i915_gem_userptr_put_pages(struct drm_i915_gem_object *obj)
struct sg_page_iter sg_iter;
BUG_ON(obj->userptr.work != NULL);
+ __i915_gem_userptr_set_active(obj, false);
if (obj->madv != I915_MADV_WILLNEED)
obj->dirty = 0;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-05 21:50 +0100 |
| Subject | [PATCH 4.2.y-ckt 047/211] tpm, tpm_crb: fix unaligned read of the command buffer address |
| Message-ID | <qNGIi-81C-25@gated-at.bofh.it> |
| In reply to | #1301938 |
4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
commit 149789ce9d472e6b4fd99336e779ab843754a96c upstream.
The command buffer address must be read with exactly two 32-bit reads.
Otherwise, on some HW platforms, it seems that HW will abort the read
operation, which causes CPU to fill the read bytes with 1's. Therefore,
we cannot rely on memcpy_fromio() but must call ioread32() two times
instead.
Also, this matches the PC Client Platform TPM Profile specification,
which defines command buffer address with two 32-bit fields.
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reviewed-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
drivers/char/tpm/tpm_crb.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
index 1267322..83068fa 100644
--- a/drivers/char/tpm/tpm_crb.c
+++ b/drivers/char/tpm/tpm_crb.c
@@ -74,7 +74,8 @@ struct crb_control_area {
u32 int_enable;
u32 int_sts;
u32 cmd_size;
- u64 cmd_pa;
+ u32 cmd_pa_low;
+ u32 cmd_pa_high;
u32 rsp_size;
u64 rsp_pa;
} __packed;
@@ -273,8 +274,8 @@ static int crb_acpi_add(struct acpi_device *device)
return -ENOMEM;
}
- memcpy_fromio(&pa, &priv->cca->cmd_pa, 8);
- pa = le64_to_cpu(pa);
+ pa = ((u64) le32_to_cpu(ioread32(&priv->cca->cmd_pa_high)) << 32) |
+ (u64) le32_to_cpu(ioread32(&priv->cca->cmd_pa_low));
priv->cmd = devm_ioremap_nocache(dev, pa,
ioread32(&priv->cca->cmd_size));
if (!priv->cmd) {
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-05 21:50 +0100 |
| Subject | [PATCH 4.2.y-ckt 044/211] jbd2: fix checkpoint list cleanup |
| Message-ID | <qNGIi-81C-27@gated-at.bofh.it> |
| In reply to | #1301938 |
4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Jan Kara <jack@suse.com> commit 33d14975e5ac469963d5d63856b61698ad0bff07 upstream. Unlike comments and expectation of callers journal_clean_one_cp_list() returned 1 not only if it freed the transaction but also if it freed some buffers in the transaction. That could make __jbd2_journal_clean_checkpoint_list() skip processing t_checkpoint_io_list and continue with processing the next transaction. This is mostly a cosmetic issue since the only result is we can sometimes free less memory than we could. But it's still worth fixing. Fix journal_clean_one_cp_list() to return 1 only if the transaction was really freed. Fixes: 50849db32a9f529235a84bcc84a6b8e631b1d0ec Signed-off-by: Jan Kara <jack@suse.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Kamal Mostafa <kamal@canonical.com> --- fs/jbd2/checkpoint.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/jbd2/checkpoint.c b/fs/jbd2/checkpoint.c index 8c44654..684996c 100644 --- a/fs/jbd2/checkpoint.c +++ b/fs/jbd2/checkpoint.c @@ -427,7 +427,6 @@ static int journal_clean_one_cp_list(struct journal_head *jh, bool destroy) struct journal_head *last_jh; struct journal_head *next_jh = jh; int ret; - int freed = 0; if (!jh) return 0; @@ -441,10 +440,9 @@ static int journal_clean_one_cp_list(struct journal_head *jh, bool destroy) else ret = __jbd2_journal_remove_checkpoint(jh) + 1; if (!ret) - return freed; + return 0; if (ret == 2) return 1; - freed = 1; /* * This function only frees up some memory * if possible so we dont have an obligation @@ -452,10 +450,10 @@ static int journal_clean_one_cp_list(struct journal_head *jh, bool destroy) * requested: */ if (need_resched()) - return freed; + return 0; } while (jh != last_jh); - return freed; + return 0; } /* -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-05 21:50 +0100 |
| Subject | [PATCH 4.2.y-ckt 032/211] mtd: mtdpart: fix add_mtd_partitions error path |
| Message-ID | <qNGIi-81C-21@gated-at.bofh.it> |
| In reply to | #1301938 |
4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Boris BREZILLON <boris.brezillon@free-electrons.com>
commit e5bae86797141e4a95e42d825f737cb36d7b8c37 upstream.
If we fail to allocate a partition structure in the middle of the partition
creation process, the already allocated partitions are never removed, which
means they are still present in the partition list and their resources are
never freed.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
drivers/mtd/mtdpart.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index cafdb88..919a936 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -664,8 +664,10 @@ int add_mtd_partitions(struct mtd_info *master,
for (i = 0; i < nbparts; i++) {
slave = allocate_partition(master, parts + i, i, cur_offset);
- if (IS_ERR(slave))
+ if (IS_ERR(slave)) {
+ del_mtd_partitions(master);
return PTR_ERR(slave);
+ }
mutex_lock(&mtd_partitions_mutex);
list_add(&slave->list, &mtd_partitions);
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-05 21:50 +0100 |
| Subject | [PATCH 4.2.y-ckt 028/211] ipv6: Fix IPsec pre-encap fragmentation check |
| Message-ID | <qNGIj-81C-31@gated-at.bofh.it> |
| In reply to | #1301938 |
4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Herbert Xu <herbert@gondor.apana.org.au>
commit 93efac3f2e03321129de67a3c0ba53048bb53e31 upstream.
The IPv6 IPsec pre-encap path performs fragmentation for tunnel-mode
packets. That is, we perform fragmentation pre-encap rather than
post-encap.
A check was added later to ensure that proper MTU information is
passed back for locally generated traffic. Unfortunately this
check was performed on all IPsec packets, including transport-mode
packets.
What's more, the check failed to take GSO into account.
The end result is that transport-mode GSO packets get dropped at
the check.
This patch fixes it by moving the tunnel mode check forward as well
as adding the GSO check.
Fixes: dd767856a36e ("xfrm6: Don't call icmpv6_send on local error")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
net/ipv6/xfrm6_output.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/net/ipv6/xfrm6_output.c b/net/ipv6/xfrm6_output.c
index 09c76a7..be033f2 100644
--- a/net/ipv6/xfrm6_output.c
+++ b/net/ipv6/xfrm6_output.c
@@ -136,6 +136,7 @@ static int __xfrm6_output(struct sock *sk, struct sk_buff *skb)
struct dst_entry *dst = skb_dst(skb);
struct xfrm_state *x = dst->xfrm;
int mtu;
+ bool toobig;
#ifdef CONFIG_NETFILTER
if (!x) {
@@ -144,25 +145,29 @@ static int __xfrm6_output(struct sock *sk, struct sk_buff *skb)
}
#endif
+ if (x->props.mode != XFRM_MODE_TUNNEL)
+ goto skip_frag;
+
if (skb->protocol == htons(ETH_P_IPV6))
mtu = ip6_skb_dst_mtu(skb);
else
mtu = dst_mtu(skb_dst(skb));
- if (skb->len > mtu && xfrm6_local_dontfrag(skb)) {
+ toobig = skb->len > mtu && !skb_is_gso(skb);
+
+ if (toobig && xfrm6_local_dontfrag(skb)) {
xfrm6_local_rxpmtu(skb, mtu);
return -EMSGSIZE;
- } else if (!skb->ignore_df && skb->len > mtu && skb->sk) {
+ } else if (!skb->ignore_df && toobig && skb->sk) {
xfrm_local_error(skb, mtu);
return -EMSGSIZE;
}
- if (x->props.mode == XFRM_MODE_TUNNEL &&
- ((skb->len > mtu && !skb_is_gso(skb)) ||
- dst_allfrag(skb_dst(skb)))) {
+ if (toobig || dst_allfrag(skb_dst(skb)))
return ip6_fragment(sk, skb,
x->outer_mode->afinfo->output_finish);
- }
+
+skip_frag:
return x->outer_mode->afinfo->output_finish(sk, skb);
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-05 21:50 +0100 |
| Subject | [PATCH 4.2.y-ckt 023/211] vxlan: set needed headroom correctly |
| Message-ID | <qNGIi-81C-29@gated-at.bofh.it> |
| In reply to | #1301938 |
4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiri Benc <jbenc@redhat.com>
commit 9dc2ad1008c9f91f55ec6c89ec0f8639dfc91596 upstream.
vxlan_setup is called when allocating the net_device, i.e. way before
vxlan_newlink (or vxlan_dev_configure) is called. This means
vxlan->default_dst is actually unset in vxlan_setup and the condition that
sets needed_headroom always takes the else branch.
Set the needed_headrom at the point when we have the information about
the address family available.
Fixes: e4c7ed415387c ("vxlan: add ipv6 support")
Fixes: 2853af6a2ea1a ("vxlan: use dev->needed_headroom instead of dev->hard_header_len")
CC: Cong Wang <cwang@twopensource.com>
Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
drivers/net/vxlan.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 5bc4b1e..025250b 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -2352,10 +2352,6 @@ static void vxlan_setup(struct net_device *dev)
eth_hw_addr_random(dev);
ether_setup(dev);
- if (vxlan->default_dst.remote_ip.sa.sa_family == AF_INET6)
- dev->needed_headroom = ETH_HLEN + VXLAN6_HEADROOM;
- else
- dev->needed_headroom = ETH_HLEN + VXLAN_HEADROOM;
dev->netdev_ops = &vxlan_netdev_ops;
dev->destructor = free_netdev;
@@ -2651,8 +2647,12 @@ static int vxlan_newlink(struct net *src_net, struct net_device *dev,
dev->needed_headroom = lowerdev->hard_header_len +
(use_ipv6 ? VXLAN6_HEADROOM : VXLAN_HEADROOM);
- } else if (use_ipv6)
+ } else if (use_ipv6) {
vxlan->flags |= VXLAN_F_IPV6;
+ dev->needed_headroom = ETH_HLEN + VXLAN6_HEADROOM;
+ } else {
+ dev->needed_headroom = ETH_HLEN + VXLAN_HEADROOM;
+ }
if (data[IFLA_VXLAN_TOS])
vxlan->tos = nla_get_u8(data[IFLA_VXLAN_TOS]);
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-05 21:50 +0100 |
| Subject | [PATCH 4.2.y-ckt 002/211] drivers: usb :fsl: Implement Workaround for USB Erratum A007792 |
| Message-ID | <qNGIj-81C-43@gated-at.bofh.it> |
| In reply to | #1301938 |
4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Nikhil Badola <nikhil.badola@freescale.com>
commit 523f1dec58408b36e7683a3d61a0286eed1fc1c8 upstream.
USB controller version-2.5 requires to enable internal UTMI
phy and program PTS field in PORTSC register before asserting
controller reset. This is must for successful resetting of the
controller and subsequent enumeration of usb devices
Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
Signed-off-by: Suresh Gupta <suresh.gupta@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
drivers/usb/host/ehci-fsl.c | 9 +++++++++
drivers/usb/host/fsl-mph-dr-of.c | 6 ++++++
include/linux/fsl_devices.h | 1 +
3 files changed, 16 insertions(+)
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 5352e74..716aa8b 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -129,6 +129,15 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev)
if (pdata->have_sysif_regs && pdata->controller_ver < FSL_USB_VER_1_6)
setbits32(hcd->regs + FSL_SOC_USB_CTRL, 0x4);
+ /*
+ * Enable UTMI phy and program PTS field in UTMI mode before asserting
+ * controller reset for USB Controller version 2.5
+ */
+ if (pdata->has_fsl_erratum_a007792) {
+ writel_be(CTRL_UTMI_PHY_EN, hcd->regs + FSL_SOC_USB_CTRL);
+ writel(PORT_PTS_UTMI, hcd->regs + FSL_SOC_USB_PORTSC1);
+ }
+
/* Don't need to set host mode here. It will be done by tdi_reset() */
retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c
index 5e0d600..2ade376 100644
--- a/drivers/usb/host/fsl-mph-dr-of.c
+++ b/drivers/usb/host/fsl-mph-dr-of.c
@@ -214,6 +214,12 @@ static int fsl_usb2_mph_dr_of_probe(struct platform_device *ofdev)
pdata->phy_mode = determine_usb_phy(prop);
pdata->controller_ver = usb_get_ver_info(np);
+ /* Activate Erratum by reading property in device tree */
+ if (of_get_property(np, "fsl,usb-erratum-a007792", NULL))
+ pdata->has_fsl_erratum_a007792 = 1;
+ else
+ pdata->has_fsl_erratum_a007792 = 0;
+
if (pdata->have_sysif_regs) {
if (pdata->controller_ver < 0) {
dev_warn(&ofdev->dev, "Could not get controller version\n");
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
index 2a2f56b..dfcf101397a 100644
--- a/include/linux/fsl_devices.h
+++ b/include/linux/fsl_devices.h
@@ -93,6 +93,7 @@ struct fsl_usb2_platform_data {
unsigned suspended:1;
unsigned already_suspended:1;
+ unsigned has_fsl_erratum_a007792:1;
/* register save area for suspend/resume */
u32 pm_command;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-05 21:50 +0100 |
| Subject | [PATCH 4.2.y-ckt 045/211] [PATCH] fix calculation of meta_bg descriptor backups |
| Message-ID | <qNGIj-81C-35@gated-at.bofh.it> |
| In reply to | #1301938 |
4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Leiserson <andy@leiserson.org>
commit 904dad4742d211b7a8910e92695c0fa957483836 upstream.
"group" is the group where the backup will be placed, and is
initialized to zero in the declaration. This meant that backups for
meta_bg descriptors were erroneously written to the backup block group
descriptors in groups 1 and (desc_per_block-1).
Reproduction information:
mke2fs -Fq -t ext4 -b 1024 -O ^resize_inode /tmp/foo.img 16G
truncate -s 24G /tmp/foo.img
losetup /dev/loop0 /tmp/foo.img
mount /dev/loop0 /mnt
resize2fs /dev/loop0
umount /dev/loop0
dd if=/dev/zero of=/dev/loop0 bs=1024 count=2
e2fsck -fy /dev/loop0
losetup -d /dev/loop0
Signed-off-by: Andy Leiserson <andy@leiserson.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
fs/ext4/resize.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index cf0c472..c7c53fd 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -1040,7 +1040,7 @@ exit_free:
* do not copy the full number of backups at this time. The resize
* which changed s_groups_count will backup again.
*/
-static void update_backups(struct super_block *sb, int blk_off, char *data,
+static void update_backups(struct super_block *sb, sector_t blk_off, char *data,
int size, int meta_bg)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
@@ -1065,7 +1065,7 @@ static void update_backups(struct super_block *sb, int blk_off, char *data,
group = ext4_list_backups(sb, &three, &five, &seven);
last = sbi->s_groups_count;
} else {
- group = ext4_meta_bg_first_group(sb, group) + 1;
+ group = ext4_get_group_number(sb, blk_off) + 1;
last = (ext4_group_t)(group + EXT4_DESC_PER_BLOCK(sb) - 2);
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-05 21:50 +0100 |
| Subject | [PATCH 4.2.y-ckt 042/211] iommu/vt-d: Fix ATSR handling for Root-Complex integrated endpoints |
| Message-ID | <qNGIj-81C-45@gated-at.bofh.it> |
| In reply to | #1301938 |
4.2.8-ckt1 -stable review patch. If anyone has any objections, please let me know.
------------------
From: David Woodhouse <David.Woodhouse@intel.com>
commit d14053b3c714178525f22660e6aaf41263d00056 upstream.
The VT-d specification says that "Software must enable ATS on endpoint
devices behind a Root Port only if the Root Port is reported as
supporting ATS transactions."
We walk up the tree to find a Root Port, but for integrated devices we
don't find one — we get to the host bridge. In that case we *should*
allow ATS. Currently we don't, which means that we are incorrectly
failing to use ATS for the integrated graphics. Fix that.
We should never break out of this loop "naturally" with bus==NULL,
since we'll always find bridge==NULL in that case (and now return 1).
So remove the check for (!bridge) after the loop, since it can never
happen. If it did, it would be worthy of a BUG_ON(!bridge). But since
it'll oops anyway in that case, that'll do just as well.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
drivers/iommu/intel-iommu.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index bd1b8ad..66e94b8 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -4231,14 +4231,17 @@ int dmar_find_matched_atsr_unit(struct pci_dev *dev)
dev = pci_physfn(dev);
for (bus = dev->bus; bus; bus = bus->parent) {
bridge = bus->self;
- if (!bridge || !pci_is_pcie(bridge) ||
+ /* If it's an integrated device, allow ATS */
+ if (!bridge)
+ return 1;
+ /* Connected via non-PCIe: no ATS */
+ if (!pci_is_pcie(bridge) ||
pci_pcie_type(bridge) == PCI_EXP_TYPE_PCI_BRIDGE)
return 0;
+ /* If we found the root port, look it up in the ATSR */
if (pci_pcie_type(bridge) == PCI_EXP_TYPE_ROOT_PORT)
break;
}
- if (!bridge)
- return 0;
rcu_read_lock();
list_for_each_entry_rcu(atsru, &dmar_atsr_units, list) {
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
Page 9 of 10 — ← Prev page 1 … 7 8 [9] 10 Next page →
Back to top | Article view | linux.kernel
csiph-web