* page allocation stall in kernel 4.9 when copying files from one btrfs hdd to another
From: David Arendt @ 2016-12-13 17:11 UTC (permalink / raw)
To: linux-btrfs, linux-kernel
Hi,
I receive the following page allocation stall while copying lots of
large files from one btrfs hdd to another.
Dec 13 13:04:29 server kernel: kworker/u16:8: page allocation stalls for
12260ms, order:0, mode:0x2400840(GFP_NOFS|__GFP_NOFAIL)
Dec 13 13:04:29 server kernel: CPU: 0 PID: 24959 Comm: kworker/u16:8
Tainted: P O 4.9.0 #1
Dec 13 13:04:29 server kernel: Hardware name: ASUS All Series/H87M-PRO,
BIOS 2102 10/28/2014
Dec 13 13:04:29 server kernel: Workqueue: btrfs-extent-refs
btrfs_extent_refs_helper
Dec 13 13:04:29 server kernel: 0000000000000000 ffffffff813f3a59
ffffffff81976b28 ffffc90011093750
Dec 13 13:04:29 server kernel: ffffffff81114fc1 02400840f39b6bc0
ffffffff81976b28 ffffc900110936f8
Dec 13 13:04:29 server kernel: ffff880700000010 ffffc90011093760
ffffc90011093710 0000000002400840
Dec 13 13:04:29 server kernel: Call Trace:
Dec 13 13:04:29 server kernel: [<ffffffff813f3a59>] ? dump_stack+0x46/0x5d
Dec 13 13:04:29 server kernel: [<ffffffff81114fc1>] ?
warn_alloc+0x111/0x130
Dec 13 13:04:33 server kernel: [<ffffffff81115c38>] ?
__alloc_pages_nodemask+0xbe8/0xd30
Dec 13 13:04:33 server kernel: [<ffffffff8110de74>] ?
pagecache_get_page+0xe4/0x230
Dec 13 13:04:33 server kernel: [<ffffffff81323a8b>] ?
alloc_extent_buffer+0x10b/0x400
Dec 13 13:04:33 server kernel: [<ffffffff812ef8c5>] ?
btrfs_alloc_tree_block+0x125/0x560
Dec 13 13:04:33 server kernel: [<ffffffff8132442f>] ?
read_extent_buffer_pages+0x21f/0x280
Dec 13 13:04:33 server kernel: [<ffffffff812d81f1>] ?
__btrfs_cow_block+0x141/0x580
Dec 13 13:04:33 server kernel: [<ffffffff812d87b0>] ?
btrfs_cow_block+0x100/0x150
Dec 13 13:04:33 server kernel: [<ffffffff812dc1d9>] ?
btrfs_search_slot+0x1e9/0x9c0
Dec 13 13:04:33 server kernel: [<ffffffff8131ead2>] ?
__set_extent_bit+0x512/0x550
Dec 13 13:04:33 server kernel: [<ffffffff812e1ab5>] ?
lookup_inline_extent_backref+0xf5/0x5e0
Dec 13 13:04:34 server kernel: [<ffffffff8131f0a4>] ?
set_extent_bit+0x24/0x30
Dec 13 13:04:34 server kernel: [<ffffffff812e4334>] ?
update_block_group.isra.34+0x114/0x380
Dec 13 13:04:34 server kernel: [<ffffffff812e4694>] ?
__btrfs_free_extent.isra.35+0xf4/0xd20
Dec 13 13:04:34 server kernel: [<ffffffff8134d561>] ?
btrfs_merge_delayed_refs+0x61/0x5d0
Dec 13 13:04:34 server kernel: [<ffffffff812e8bd2>] ?
__btrfs_run_delayed_refs+0x902/0x10a0
Dec 13 13:04:34 server kernel: [<ffffffff812ec0f0>] ?
btrfs_run_delayed_refs+0x90/0x2a0
Dec 13 13:04:34 server kernel: [<ffffffff812ec384>] ?
delayed_ref_async_start+0x84/0xa0
Dec 13 13:04:34 server kernel: [<ffffffff8109c16d>] ?
process_one_work+0x11d/0x3b0
Dec 13 13:04:34 server kernel: [<ffffffff8109c442>] ?
worker_thread+0x42/0x4b0
Dec 13 13:04:34 server kernel: [<ffffffff8109c400>] ?
process_one_work+0x3b0/0x3b0
Dec 13 13:04:34 server kernel: [<ffffffff8109c400>] ?
process_one_work+0x3b0/0x3b0
Dec 13 13:04:34 server kernel: [<ffffffff8108ba5e>] ?
do_group_exit+0x2e/0xa0
Dec 13 13:04:34 server kernel: [<ffffffff810a12d9>] ? kthread+0xb9/0xd0
Dec 13 13:04:34 server kernel: [<ffffffff810a1220>] ?
kthread_park+0x50/0x50
Dec 13 13:04:34 server kernel: [<ffffffff81798cd2>] ?
ret_from_fork+0x22/0x30
Dec 13 13:04:34 server kernel: Mem-Info:
Dec 13 13:04:34 server kernel: active_anon:20 inactive_anon:34
isolated_anon:0\x0a active_file:7370032 inactive_file:450105
isolated_file:320\x0a unevictable:0 dirty:522748 writeback:189
unstable:0\x0a slab_reclaimable:178255 slab_unreclaimable:124617\x0a
mapped:4236 shmem:0 pagetables:1163 bounce:0\x0a free:38224 free_pcp:241
free_cma:0
Dec 13 13:04:34 server kernel: Node 0 active_anon:80kB
inactive_anon:136kB active_file:29480128kB inactive_file:1800420kB
unevictable:0kB isolated(anon):0kB isolated(file):1280kB mapped:16944kB
dirty:2090992kB writeback:756kB shmem:0kB writeback_tmp:0kB unstable:0kB
pages_scanned:258821 all_unreclaimable? no
Dec 13 13:04:34 server kernel: DMA free:15868kB min:8kB low:20kB
high:32kB active_anon:0kB inactive_anon:0kB active_file:0kB
inactive_file:0kB unevictable:0kB writepending:0kB present:15976kB
managed:15892kB mlocked:0kB slab_reclaimable:0kB slab_unreclaimable:24kB
kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB
free_cma:0kB
Dec 13 13:04:34 server kernel: lowmem_reserve[]: 0 3428 32019 32019
Dec 13 13:04:34 server kernel: DMA32 free:116800kB min:2448kB low:5956kB
high:9464kB active_anon:0kB inactive_anon:0kB active_file:3087928kB
inactive_file:191336kB unevictable:0kB writepending:221828kB
present:3590832kB managed:3513936kB mlocked:0kB slab_reclaimable:93252kB
slab_unreclaimable:20520kB kernel_stack:48kB pagetables:212kB bounce:0kB
free_pcp:4kB local_pcp:0kB free_cma:0kB
Dec 13 13:04:34 server kernel: lowmem_reserve[]: 0 0 0 0
Dec 13 13:04:34 server kernel: DMA: 1*4kB (U) 1*8kB (U) 1*16kB (U)
1*32kB (U) 1*64kB (U) 1*128kB (U) 1*256kB (U) 0*512kB 1*1024kB (U)
1*2048kB (M) 3*4096kB (M) = 15868kB
Dec 13 13:04:34 server kernel: DMA32: 940*4kB (UME) 4006*8kB (UME)
3308*16kB (UME) 791*32kB (UME) 41*64kB (UE) 1*128kB (U) 0*256kB 0*512kB
0*1024kB 0*2048kB 0*4096kB = 116800kB
Dec 13 13:04:34 server kernel: Normal: 75*4kB (E) 192*8kB (UE) 94*16kB
(UME) 57*32kB (U) 33*64kB (UM) 16*128kB (UM) 10*256kB (UM) 4*512kB (U)
0*1024kB 1*2048kB (U) 1*4096kB (U) = 20076kB
Dec 13 13:04:34 server kernel: Node 0 hugepages_total=0 hugepages_free=0
hugepages_surp=0 hugepages_size=2048kB
Dec 13 13:04:34 server kernel: 7820441 total pagecache pages
Dec 13 13:04:34 server kernel: 69 pages in swap cache
Dec 13 13:04:34 server kernel: Swap cache stats: add 60282, delete
60213, find 249865/258319
Dec 13 13:04:34 server kernel: Free swap = 62482976kB
Dec 13 13:04:34 server kernel: Total swap = 62522692kB
Dec 13 13:04:34 server kernel: 8364614 pages RAM
Dec 13 13:04:34 server kernel: 0 pages HighMem/MovableOnly
Dec 13 13:04:34 server kernel: 162971 pages reserved
Has anyone any idea what could go wrong here ?
Thanks in advance,
David Arendt
^ permalink raw reply
* [GIT PULL] USB/PHY driver changes patches for 4.10-rc1
From: Greg KH @ 2016-12-13 17:36 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, linux-usb
The following changes since commit e5517c2a5a49ed5e99047008629f1cd60246ea0e:
Linux 4.9-rc7 (2016-11-27 13:08:04 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ tags/usb-4.10-rc1
for you to fetch changes up to d8a12b7117b42fd708f1e908498350232bdbd5ff:
USB: serial: option: add dlink dwm-158 (2016-12-09 11:44:11 +0100)
----------------------------------------------------------------
USB/PHY patches for 4.10-rc1
Here's the big set of USB/PHY patches for 4.10-rc1.
A number of new drivers are here in this set of changes. We have a new
USB controller type "mtu3", a new usb-serial driver, and the usual churn
in the gadget subsystem and the xhci host controller driver, along with
a few other new small drivers added. And lots of little other changes
all over the USB and PHY driver tree. Full details are in the shortlog
All of these have been in linux-next for a while with no reported
issues.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----------------------------------------------------------------
Aidan Thornton (4):
USB: serial: ch341: add register and USB request definitions
USB: serial: ch341: reinitialize chip on reconfiguration
USB: serial: ch341: add support for parity, frame length, stop bits
USB: serial: ch341: add debug output for chip version
Alexandre Bailon (3):
phy: da8xx-usb: Configure CFGCHIP2 to support OTG workaround
usb: musb: da8xx: Call earlier clk_prepare_enable()
usb: musb: da8xx: Set phy in OTG mode by default
Alexey Khoroshilov (2):
usb: gadget: mv_u3d: add check for dma mapping error
usb: gadget: mv_u3d: mv_u3d_start_queue() refactoring
Amitesh Singh (1):
usb: fix a typo in usb_class_driver documentation
Anson Jacob (1):
usb: gadget: Fix checkpatch error for braces
Arnd Bergmann (5):
usb: dwc3: ep0: avoid empty-body warning
usb: dwc3: use bus->sysdev for DMA configuration
usb: dwc3: Do not set dma coherent mask
phy: rockchip-inno-usb2: fix uninitialized tmout variable
phy: rockchip-inno-usb2: select USB_COMMON
Axel Haslam (7):
usb: ohci-da8xx: rename driver to ohci-da8xx
USB: ohci: da8xx: use ohci priv data instead of globals
USB: ohci: da8xx: Add wrappers for platform callbacks
USB: ohci: da8xx: Allow a regulator to handle VBUS
USB: ohci: da8xx: Add devicetree bindings
USB: ohci: da8xx: Allow probing from DT
USB: ohci: da8xx: Resume the entire host controller
Baolin Wang (2):
usb: dwc3: gadget: don't clear RUN/STOP when it's invalid to do so
usb: dwc3: gadget: wait for End Transfer to complete
Changming Huang (1):
fsl/usb: Workarourd for USB erratum-A005697
Christian Lamparter (2):
usb: dwc2: fixes host_dma logic
usb: dwc2: add amcc,dwc-otg support
Chunfeng Yun (10):
dt-bindings: mt8173-xhci: support host side of dual-role mode
dt-bindings: mt8173-mtu3: add devicetree bindings
usb: xhci-mtk: make IPPC register optional
usb: Add MediaTek USB3 DRD driver
usb: mtu3: Super-Speed Peripheral mode support
usb: mtu3: host only mode support
usb: mtu3: dual-role mode support
arm64: dts: mediatek: add USB3 DRD driver
usb: mtu3: enable auto switch from U3 to U2
usb: mtu3: fix U3 port link issue
Dan Carpenter (1):
usb: xhci-mem: use passed in GFP flags instead of GFP_KERNEL
Daniel Wagner (1):
usb: gadget: f_fs: use complete() instead complete_all()
Daniele Palmas (1):
USB: serial: option: add support for Telit LE922A PIDs 0x1040, 0x1041
Dave Penkler (1):
usbtmc: Add, clarify and fix comments
David Lechner (1):
usb: ohci-da8xx: Remove code that references mach
Fabian Frederick (1):
usb: isp1301-omap: don't opencode IS_REACHABLE()
Fabien Lahoudere (2):
usb: chipidea: imx: configure imx for ULPI phy
usb: chipidea: imx: Disable internal 60Mhz clock with ULPI PHY
Felipe Balbi (74):
usb: add helper to extract bits 12:11 of wMaxPacketSize
usb: gadget: composite: correctly initialize ep->maxpacket
usb: gadget: composite: always set ep->mult to a sensible value
usb: dwc3: gadget: set PCM1 field of isochronous-first TRBs
usb: dwc3: gadget: properly check ep cmd
usb: dwc3: gadget: make use of No Response Update Transfer
usb: dwc3: gadget: giveback request if we can't kick it
usb: dwc3: gadget: conditionally disable Link State change events
usb: dwc3: debug: decode control endpoint phase too
usb: dwc3: gadget: remove redundant trace prints
usb: dwc3: debug: move dwc3_ep0_state_string() to debug.h
usb: dwc3: trace: print out ep0state also from XferComplete
media: usbtv: core: make use of new usb_endpoint_maxp_mult()
media: usb: uvc: make use of new usb_endpoint_maxp_mult()
usb: chipidea: udc: make use of new usb_endpoint_maxp_mult()
usb: core: devices: make use of new usb_endpoint_maxp_mult()
usb: gadget: udc: atmel: make use of new usb_endpoint_maxp_mult()
usb: gadget: udc: bdc: make use of new usb_endpoint_maxp_mult()
usb: gadget: udc: dummy: make use of new usb_endpoint_maxp_mult()
usb: gadget: udc: fsl: make use of new usb_endpoint_maxp_mult()
usb: gadget: udc: fusb300: make use of new usb_endpoint_maxp_mult()
usb: gadget: udc: gr: make use of new usb_endpoint_maxp_mult()
usb: gadget: udc: mv_udc: make use of new usb_endpoint_maxp_mult()
usb: host: ehci: make use of new usb_endpoint_maxp_mult()
usb: host: xhci: make use of new usb_endpoint_maxp_mult()
usb: misc: usbtest: make use of new usb_endpoint_maxp_mult()
usb: musb: make use of new usb_endpoint_maxp_mult()
usb: ch9: make usb_endpoint_maxp() return only packet size
usb: host: xhci: purge GET_MAX_PACKET()
media: usb: uvc: remove unnecessary & operation
usb: chipidea: udc: remove unnecessary & operation
usb: core: devices: remove unnecessary & operation
usb: core: endpoint: remove unnecessary & operation
usb: host: ehci: remove unnecessary max_packet() macro
usb: gadget: composite: remove unnecessary & operation
usb: gadget: udc: atmel: remove unnecessary & operation
usb: gadget: udc: bdc: remove unnecessary & operation
usb: gadget: udc: dummy: remove unnecessary & operation
usb: gadget: udc: net2272: remove unnecessary & operation
usb: gadget: udc: net2280: remove unnecessary & operation
usb: gadget: udc: s3c2410: remove unnecessary & operation
usb: misc: usbtest: remove unnecessary & operation
usb: ip: remove unnecessary & operation
usb: gadget: udc: fsl: remove unnecessary & operation
usb: gadget: udc: mv: remove unnecessary & operation
usb: dwc3: trace: pretty print high-bandwidth transfers too
usb: dwc3: gadget: offset Start Transfer latency for bulk EPs
usb: dwc3: don't compile dwc3_trace() unless CONFIG_FTRACE=y
usb: dwc3: Kconfig: allow all glues to build if COMPILE_TEST
usb: dwc3: trace: add a proper tracepoint for reg accessors
usb: dwc3: gadget: extract dwc3_gadget_get_irq()
usb: dwc3: host: extract dwc3_host_get_irq()
usb: dwc3: ep0: simplify dwc3_ep0_handle_feature()
usb: dwc3: gadget: remove unused 'first_trb_index'
usb: dwc3: gadget: CSP is only valid for OUT endpoints
usb: dwc3: gadget: only interrupt on short if short_not_ok is set
usb: dwc3: gadget: never ever kill the machine
usb: dwc3: core: introduce dwc3_core_is_valid()
usb: dwc3: core: introduce dwc3_core_setup_global_control()
usb: dwc3: core: remove unnecessary alignment
usb: dwc3: core: add dwc3_get_properties()
usb: dwc3: gadget: purge dwc3_stop_active_transfers()
usb: dwc3: gadget: cope with XferNotReady before usb_ep_queue()
usb: dwc3: gadget: tracking per-TRB remaining bytes
usb: dwc3: gadget: always try to prepare on started_list first
usb: dwc3: gadget: stop touching HWO TRBs
usb: dwc3: gadget: always kick if num_pending_sgs > 0
usb: dwc3: pci: add a private driver structure
usb: dwc3: pci: call _DSM for suspend/resume
usb: dwc3: trace: add a tracepoint for ep enable/disable
usb: dwc3: trace: purge dwc3_trace()
usb: dwc3: core: remove dwc3_soft_reset()
usb: dwc3: gadget: use evt->length as we should
usb: dwc3: pci: avoid build warning
Felix Hädicke (1):
usb: gadget: serial: fix possible Oops caused by calling kthread_stop(NULL)
Geert Uytterhoeven (1):
USB: serial: cp210x: use tcflag_t to fix incompatible pointer type
Giuseppe Lippolis (1):
USB: serial: option: add dlink dwm-158
Greg Kroah-Hartman (10):
USB: core: add missing license information to some files
Merge 4.9-rc3 into usb-next
usb: storage: drop freezer.h usage
Merge 4.9-rc5 into usb-next
Merge tag 'usb-for-v4.10' of git://git.kernel.org/.../balbi/usb into usb-next
Merge 4.9-rc7 into usb-next
Merge tag 'phy-for-4.10' of git://git.kernel.org/.../kishon/linux-phy into usb-next
Merge tag 'extcon-next-for-4.10' of git://git.kernel.org/.../chanwoo/extcon into usb-nextx
Merge tag 'usb-ci-v4.10-rc1' of git://git.kernel.org/.../peter.chen/usb into usb-next
Merge tag 'usb-serial-4.10-rc1' of git://git.kernel.org/.../johan/usb-serial into usb-next
Guenter Roeck (1):
usb: hub: Wait for connection to be reestablished after port reset
Hans de Goede (3):
phy_sun4i_usb: set_mode: Allow using set_mode to force end the current session
musb: sunxi: Remove custom babble handling
musb: sunxi: Force session end on babble errors in host-mode
Jai Krishna (1):
usb: usbip:checkpatch; fix bare use of unsigned
Janusz Dziedzic (6):
usb: gadget: f_hid add super speed support
usb: dwc3: decrement queued_requests
usb: dwc3: clean TRB if STARTTRANSFER fail
usb: dwc3: fix post-increment
usb: dwc3: isoc clean DWC3_EP_PENDING_REQUEST flag
usb: dwc3: warn on once when no trbs
Ji-Ze Hong (Peter Hong) (1):
USB: serial: add Fintek F81532/534 driver
Joe Perches (2):
usb: Convert pr_warning to pr_warn
usb: Convert pr_warning to pr_warn
Johan Hovold (9):
USB: serial: cp210x: clean up CSIZE handling
USB: serial: cp210x: return -EIO on short control transfers
USB: serial: cp210x: use bool for registered flag
USB: cdc-acm: fix invalid user-pointer check
USB: cdc-acm: use get_icount tty operation
USB: serial: fix invalid user-pointer checks
USB: phy: am335x-control: fix device and of_node leaks
USB: musb: remove obsolete resume-signalling comments
USB: serial: kl5kusb105: fix open error path
John Youn (23):
usb: dwc3: Add support for device L1 exit
usb: dwc2: Remove unnecessary kfree
usb: dwc2: Remove unused hardware parameter
usb: dwc2: Add params.c file
usb: dwc2: Declare the core params struct statically
usb: dwc2: Move parameter initialization into params.c
usb: dwc2: Remove dwc2_set_all_params function
usb: dwc2: Remove unnecessary prototypes
usb: dwc2: Rename host_rx_fifo_size hardware parameter
usb: dwc2: Move gadget settings into core_params
usb: dwc2: Rename the dma_enable parameter to host_dma
usb: dwc2: Get host DMA device properties
usb: dwc3: gadget: Remove descriptor arguments to ep_enable
usb: dwc3: gadget: Fix dead code writing GCTL.RAMCLKSEL
usb: dwc2: Deprecate g-use-dma binding
usb: dwc3: Add a check for the DWC_usb3 core
usb: dwc3: Add a function to check properties
usb: dwc3: core: add a event buffer cache
usb: dwc3: gadget: use evt->cache for processing events
usb: dwc3: gadget: clear events in top-half handler
usb: dwc2: Remove reading in of invalid property
usb: dwc3: Implement interrupt moderation
usb: dwc3: Workaround for irq mask issue
Juergen Gross (1):
usb: gadget: composite: use kasprintf() instead of open coding it
Julia Lawall (2):
wusbcore: dev-sysfs: use permission-specific DEVICE_ATTR variants
wusbcore: wusbhc: use permission-specific DEVICE_ATTR variants
Julien Cristau (1):
hwrng: chaoskey - drop workaround for old hwrng core limitation
Kim Jae Joong (1):
usb: misc: rio500: fix result type for error message
Krzysztof Opasiak (2):
usbip: vudc: fix: Clear already_seen flag also for ep0
usbip: vudc: Refactor init_vudc_hw() to be more obvious
Ladislav Michl (9):
cdc-acm: reindent log messages
cdc-acm: avoid interface_to_usbdev call
cdc-acm: refactor killing urbs
cdc-acm: store in and out pipes in acm structure
cdc-acm: remove is_int_ep from acm structure
cdc-acm: handle read pipe errors
usb: musb: don't complain on -EPROBE_DEFER when initializing controller
usb: musb: omap2430: use dev_err
usb: musb: omap2430: make complain on -EPROBE_DEFER dev_dbg
Lu Baolu (5):
usb: dwc3: remove unused struct member dwc3->mem
usb: xhci: clean up error_bitmask usage
usb: xhci: cleanup cmd_completion in xhci_virt_device
usb: xhci: remove the use of xhci->addr_dev
usb: xhci: move slot_id from xhci_hcd to xhci_command structure
Lucas Stach (2):
USB: EHCI: elide I/O watchdog on AMD parts
USB: EHCI: merge all cases that disable the IO watchdog
Manjunath Goudar (9):
USB: OHCI: make ohci-da8xx a separate driver
USB: EHCI: ehci-w90x900: remove unuseful functions
USB: OHCI: ohci-s3c2410: remove useless functions
USB: OHCI: ohci-omap: remove useless functions
USB: OHCI: omap: remove useless extern declaration
USB: OHCI: ohci-pxa27x: remove useless functions
USB: OHCI: at91: remove useless extern declaration
USB: OHCI: nxp: remove useless extern declaration
USB: OHCI: nxp: fix code warnings
Marek Szyprowski (1):
phy: exynos-mipi-video: simplify check for coupled phy status
Martin Blumenstingl (4):
Documentation: dt-bindings: update the meson-usb2-phy example
Documentation: dt-bindings: rename meson-usb2-phy to meson8b-usb2-phy
phy: meson: add USB2 PHY support for Meson8b and GXBB
phy: meson8b-usb2: request a shared reset line
Martyn Welch (1):
USB: serial: cp210x: Adding GPIO support for CP2105
Masahiro Yamada (3):
usb: dwc2: cleanup with list_first_entry_or_null()
usb: dwc3: cleanup with list_first_entry_or_null()
usb: renesas_usbhs: cleanup with list_first_entry_or_null()
Mathias Nyman (16):
xhci: remove unnecessary xhci_quiesce call before xhci_halt
xhci: cleanup error message if halting the host failed.
xhci: don't try to reset the host if it is unaccessible
xhci: use trb helper functions when possible
xhci: add trb_is_noop() helper function
xhci: remove extra URB_SHORT_NOT_OK checks in xhci, core handles most cases
xhci: cleanup and refactor process_ctrl_td()
xhci: cleanup and refactor process_bulk_intr_td()
xhci: rename endpoint related trb variables
xhci: refactor and cleanup process_isoc_td()
xhci: cleanup and refactor td_to_noop()
xhci: refactor handle_tx_event() urb giveback
xhci: Giveback urb in finish_td directly
xhci: Remove duplicate xhci urb giveback functions
xhci: add helper to get the endpoint state of a endpoint context
usb: hub: Fix auto-remount of safely removed or ejected USB-3 devices
Matt Ranostay (1):
phy: phy-twl4030-usb: emit VBUS status events to userspace
Mike Krinkin (1):
usb: core: urb make use of usb_endpoint_maxp_mult
Nathaniel Quillin (1):
USB: cdc-acm: add device id for GW Instek AFG-125
Nicolae Rosia (1):
usb: twl6030-usb: make driver DT only
Nobuo Iwata (2):
usbip: deletion of incorrect socket descriptor checking
usbip: fix possibility of dereference by NULLL pointer in vhci_hcd.c
Pan Bian (4):
usb: return correct errno code when krealloc fails
usb: return correct errno on failures
usb: fix improper return value when kzalloc fails
USB: serial: kl5kusb105: abort on open exception path
Peter Chen (3):
usb: gadget: fix request length error for isoc transfer
usb: gadget: f_uac2: fix error handling at afunc_bind
usb: phy: phy-generic: add the implementation of .set_suspend
Peter Griffin (2):
phy: phy-miphy365x: Remove miphy365 driver and dt binding documentation.
phy: stih41x-usb: Remove usb phy driver and dt binding documentation.
Petr Kulhavy (3):
dt/bindings: Add binding for the DA8xx MUSB driver
usb: musb: core: added helper function for parsing DT
usb: musb: da8xx: Add DT support for the DA8xx driver
Rafał Miłecki (1):
usb: core: usbport: Use proper LED API to fix potential crash
Razmik Karapetyan (5):
usb: dwc2: Don't program DMA address for 0 length request
usb: dwc2: Fix Control Write issue in DMA mode
usb: dwc2: Remove unnecessary request length checking
usb: dwc2: Fix fifo_show() functionality
usb: dwc2: Move functions from header to source
Roger Quadros (1):
extcon: usb-gpio: Add VBUS detection support
Sergio Prado (2):
dt-bindings: usb: add DT binding for s3c2410 USB OHCI controller
usb: ohci: s3c2410: allow probing from device tree
Sevak Arakelyan (1):
usb: dwc2: Stop Complete Splits after Data PID == 0
Shuah Khan (2):
usbip: add missing compile time generated files to .gitignore
usbip: fix warning in vhci_hcd_probe/lockdep_init_map
Stephen Boyd (1):
usb: chipidea: Properly mark little endian descriptors
Sudip Mukherjee (1):
usb: mtu3: declare functions static
Tal Shorer (1):
usb: hcd.h: construct hub class request constants from simpler constants
Torsten Polle (3):
usb: gadget: NCM: link socket buffers to the device for tx packets
usb: gadget: u_ether: link socket buffers to the device for received packets
usb: gadget: NCM: differentiate consumed packets from dropped packets
Vahram Aharonyan (23):
usb: dwc2: Add PCI properties
usb: dwc2: Update DMA descriptor structure
usb: dwc2: Make the DMA descriptor structure packed
usb: dwc2: gadget: Add descriptor DMA parameter
usb: dwc2: gadget: Add DMA descriptor status quadlet fields
usb: dwc2: gadget: Add DMA descriptor chains for EP 0
usb: dwc2: host: Rename MAX_DMA_DESC_SIZE to HOST_DMA_NBYTES_LIMIT
usb: dwc2: gadget: Transfer length limit checking for DDMA
usb: dwc2: gadget: Add DDMA chain pointers to dwc2_hsotg_ep structure
usb: dwc2: gadget: EP 0 specific DDMA programming
usb: dwc2: gadget: DDMA transfer start and complete
usb: dwc2: gadget: Fixes for StsPhseRcvd interrupt
usb: dwc2: gadget: Start DDMA IN status phase in StsPhseRcvd handler
usb: dwc2: gadget: Enable descriptor DMA mode
usb: dwc2: gadget: Add DDMA isoc related fields to dwc2_hsotg_ep
usb: dwc2: gadget: In DDMA keep incompISOOUT and incompISOIN masked
usb: dwc2: gadget: Start and complete DDMA isoc transfers
usb: dwc2: gadget: Enable the BNA interrupt
usb: dwc2: gadget: Adjust ISOC OUT request's actual len for DDMA
usb: dwc2: gadget: For DDMA parse setup only after SetUp interrupt
usb: dwc2: gadget: Correct dwc2_hsotg_ep_stop_xfr() function
usb: dwc2: gadget: Disable enabled HW endpoint in dwc2_hsotg_ep_disable
usb: dwc2: Add support of dedicated full-speed PHY interface
Vardan Mikayelyan (6):
usb: dwc2: gadget: Update for new usb_endpoint_maxp()
usb: dwc2: Fix dead code in hcd.c
usb: dwc2: Fix coverity issue in hcd_queue.c
usb: dwc2: gadget: Add IOT device IDs, configure core accordingly
usb: dwc2: gadget: Program ep0_mps for LS
usb: dwc2: gadget: Add new core parameter for low speed
Vijay Kumar (2):
usb/core: Added devspec sysfs entry for devices behind the usb hub
Documentation/ABI: Added ABI information for devspec and obppath.
Vivek Gautam (3):
phy: fix semicolon.cocci warnings
phy: Fix ptr_ret.cocci warnings
phy: fix returnvar.cocci warnings
Wei Yongjun (3):
usb: ohci-da8xx: remove redundant dev_err call in usb_hcd_da8xx_probe()
xhci: fix non static symbol warning
phy: meson8b-usb2: fix missing clk_disable_unprepare() on error
Wenyou Yang (1):
usb: ohci-at91: Use descriptor-based gpio APIs
William Wu (3):
phy: rockchip-inno-usb2: support otg-port for rk3399
phy: rockchip-inno-usb2: correct clk_ops callback
phy: rockchip-inno-usb2: correct 480MHz output clock stable time
Yoshihiro Shimoda (3):
usb: host: xhci: rcar: add a new firmware version for r8a7796
usb: host: xhci: plat: add support for Renesas r8a7796 SoC
phy: rcar-gen3-usb2: add sysfs for usb role swap
shashi bhusan (1):
USB: OHCI: use dma_pool_zalloc
Documentation/ABI/stable/sysfs-devices | 14 +
.../ABI/testing/sysfs-platform-phy-rcar-gen3-usb2 | 15 +
.../devicetree/bindings/extcon/extcon-usb-gpio.txt | 3 +
.../{meson-usb2-phy.txt => meson8b-usb2-phy.txt} | 6 +-
.../devicetree/bindings/usb/da8xx-usb.txt | 43 +
Documentation/devicetree/bindings/usb/dwc2.txt | 5 +-
.../devicetree/bindings/usb/mt8173-mtu3.txt | 87 ++
.../devicetree/bindings/usb/mt8173-xhci.txt | 54 +-
.../devicetree/bindings/usb/ohci-da8xx.txt | 23 +
.../devicetree/bindings/usb/s3c2410-usb.txt | 22 +
Documentation/devicetree/bindings/usb/usb-xhci.txt | 1 +
arch/arm/boot/dts/rk3036.dtsi | 1 -
arch/arm/boot/dts/rk3288.dtsi | 1 -
arch/arm/boot/dts/rk3xxx.dtsi | 1 -
arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 1 -
arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 63 +-
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 29 +-
arch/arm64/boot/dts/rockchip/rk3368.dtsi | 1 -
drivers/extcon/extcon-usb-gpio.c | 169 ++-
drivers/media/usb/usbtv/usbtv-core.c | 7 +-
drivers/media/usb/uvc/uvc_video.c | 6 +-
drivers/phy/Kconfig | 33 +-
drivers/phy/Makefile | 3 +-
drivers/phy/phy-berlin-sata.c | 3 +-
drivers/phy/phy-brcm-sata.c | 6 +-
drivers/phy/phy-da8xx-usb.c | 5 +
drivers/phy/phy-exynos-mipi-video.c | 15 +-
drivers/phy/phy-exynos4210-usb2.c | 4 +-
drivers/phy/phy-exynos4x12-usb2.c | 4 +-
drivers/phy/phy-exynos5250-usb2.c | 2 +-
drivers/phy/phy-meson8b-usb2.c | 286 ++++
drivers/phy/phy-miphy365x.c | 625 ---------
drivers/phy/phy-rcar-gen3-usb2.c | 118 +-
drivers/phy/phy-rockchip-emmc.c | 2 +-
drivers/phy/phy-rockchip-inno-usb2.c | 607 ++++++++-
drivers/phy/phy-s5pv210-usb2.c | 4 +-
drivers/phy/phy-stih41x-usb.c | 188 ---
drivers/phy/phy-sun4i-usb.c | 14 +-
drivers/phy/phy-ti-pipe3.c | 10 +-
drivers/phy/phy-twl4030-usb.c | 3 +
drivers/phy/tegra/xusb-tegra124.c | 3 +-
drivers/phy/tegra/xusb.c | 10 +-
drivers/usb/Kconfig | 2 +
drivers/usb/Makefile | 1 +
drivers/usb/chipidea/ci_hdrc_imx.c | 4 +
drivers/usb/chipidea/ci_hdrc_imx.h | 1 +
drivers/usb/chipidea/udc.c | 12 +-
drivers/usb/chipidea/udc.h | 12 +-
drivers/usb/chipidea/usbmisc_imx.c | 86 +-
drivers/usb/class/cdc-acm.c | 216 +--
drivers/usb/class/cdc-acm.h | 5 +-
drivers/usb/class/usbtmc.c | 5 +-
drivers/usb/core/buffer.c | 3 +
drivers/usb/core/config.c | 5 +
drivers/usb/core/devices.c | 12 +-
drivers/usb/core/driver.c | 3 +
drivers/usb/core/endpoint.c | 7 +-
drivers/usb/core/file.c | 2 +
drivers/usb/core/generic.c | 2 +
drivers/usb/core/hub.c | 114 +-
drivers/usb/core/ledtrig-usbport.c | 7 +-
drivers/usb/core/message.c | 3 +
drivers/usb/core/notify.c | 2 +
drivers/usb/core/sysfs.c | 17 +
drivers/usb/core/urb.c | 12 +-
drivers/usb/core/usb.c | 3 +
drivers/usb/core/usb.h | 5 +
drivers/usb/dwc2/Makefile | 1 +
drivers/usb/dwc2/core.c | 930 +------------
drivers/usb/dwc2/core.h | 324 ++---
drivers/usb/dwc2/core_intr.c | 6 +-
drivers/usb/dwc2/debugfs.c | 2 +-
drivers/usb/dwc2/gadget.c | 1126 ++++++++++++---
drivers/usb/dwc2/hcd.c | 264 ++--
drivers/usb/dwc2/hcd.h | 7 +-
drivers/usb/dwc2/hcd_ddma.c | 56 +-
drivers/usb/dwc2/hcd_intr.c | 55 +-
drivers/usb/dwc2/hcd_queue.c | 87 +-
drivers/usb/dwc2/hw.h | 48 +-
drivers/usb/dwc2/params.c | 1435 ++++++++++++++++++++
drivers/usb/dwc2/pci.c | 18 +
drivers/usb/dwc2/platform.c | 207 +--
drivers/usb/dwc3/Kconfig | 6 +-
drivers/usb/dwc3/Makefile | 6 +-
drivers/usb/dwc3/core.c | 358 ++---
drivers/usb/dwc3/core.h | 53 +-
drivers/usb/dwc3/debug.c | 32 -
drivers/usb/dwc3/debug.h | 41 +-
drivers/usb/dwc3/dwc3-exynos.c | 10 -
drivers/usb/dwc3/dwc3-pci.c | 134 +-
drivers/usb/dwc3/dwc3-st.c | 1 -
drivers/usb/dwc3/ep0.c | 347 ++---
drivers/usb/dwc3/gadget.c | 576 ++++----
drivers/usb/dwc3/gadget.h | 5 +-
drivers/usb/dwc3/host.c | 88 +-
drivers/usb/dwc3/io.h | 6 +-
drivers/usb/dwc3/trace.h | 123 +-
drivers/usb/gadget/composite.c | 23 +-
drivers/usb/gadget/function/f_fs.c | 2 +-
drivers/usb/gadget/function/f_hid.c | 67 +-
drivers/usb/gadget/function/f_ncm.c | 11 +-
drivers/usb/gadget/function/f_uac2.c | 14 +-
drivers/usb/gadget/function/rndis.c | 12 +-
drivers/usb/gadget/function/rndis.h | 51 +-
drivers/usb/gadget/function/u_ether.c | 5 +-
drivers/usb/gadget/function/u_serial.c | 7 +-
drivers/usb/gadget/function/uvc.h | 18 +-
drivers/usb/gadget/function/uvc_v4l2.c | 3 +-
drivers/usb/gadget/function/uvc_video.c | 2 +-
drivers/usb/gadget/udc/at91_udc.h | 2 +-
drivers/usb/gadget/udc/atmel_usba_udc.c | 8 +-
drivers/usb/gadget/udc/bdc/bdc_cmd.c | 2 +-
drivers/usb/gadget/udc/bdc/bdc_ep.c | 2 +-
drivers/usb/gadget/udc/dummy_hcd.c | 5 +-
drivers/usb/gadget/udc/fsl_udc_core.c | 3 +-
drivers/usb/gadget/udc/fsl_usb2_udc.h | 2 +-
drivers/usb/gadget/udc/fusb300_udc.c | 2 +-
drivers/usb/gadget/udc/gr_udc.c | 2 +-
drivers/usb/gadget/udc/m66592-udc.c | 4 +-
drivers/usb/gadget/udc/mv_u3d_core.c | 34 +-
drivers/usb/gadget/udc/mv_udc_core.c | 3 +-
drivers/usb/gadget/udc/net2272.c | 4 +-
drivers/usb/gadget/udc/net2280.c | 6 +-
drivers/usb/gadget/udc/omap_udc.h | 2 +-
drivers/usb/gadget/udc/pxa25x_udc.h | 2 +-
drivers/usb/gadget/udc/s3c2410_udc.c | 4 +-
drivers/usb/host/Kconfig | 5 +-
drivers/usb/host/Makefile | 1 +
drivers/usb/host/ehci-fsl.c | 3 +
drivers/usb/host/ehci-hub.c | 14 +
drivers/usb/host/ehci-pci.c | 3 +-
drivers/usb/host/ehci-q.c | 30 +-
drivers/usb/host/ehci-sched.c | 3 +-
drivers/usb/host/ehci-w90x900.c | 30 +-
drivers/usb/host/ehci.h | 8 +
drivers/usb/host/fsl-mph-dr-of.c | 2 +
drivers/usb/host/isp1362-hcd.c | 27 +-
drivers/usb/host/ohci-at91.c | 123 +-
drivers/usb/host/ohci-da8xx.c | 522 ++++---
drivers/usb/host/ohci-hcd.c | 18 -
drivers/usb/host/ohci-mem.c | 6 +-
drivers/usb/host/ohci-nxp.c | 7 +-
drivers/usb/host/ohci-omap.c | 39 +-
drivers/usb/host/ohci-pxa27x.c | 36 +-
drivers/usb/host/ohci-s3c2410.c | 47 +-
drivers/usb/host/xhci-mem.c | 16 +-
drivers/usb/host/xhci-mtk-sch.c | 4 +-
drivers/usb/host/xhci-mtk.c | 38 +-
drivers/usb/host/xhci-mtk.h | 1 +
drivers/usb/host/xhci-plat.c | 9 +
drivers/usb/host/xhci-rcar.c | 4 +
drivers/usb/host/xhci-rcar.h | 1 +
drivers/usb/host/xhci-ring.c | 686 ++++------
drivers/usb/host/xhci.c | 44 +-
drivers/usb/host/xhci.h | 13 +-
drivers/usb/isp1760/isp1760-if.c | 2 +-
drivers/usb/misc/chaoskey.c | 14 +-
drivers/usb/misc/rio500.c | 2 +-
drivers/usb/misc/usbtest.c | 6 +-
drivers/usb/mtu3/Kconfig | 54 +
drivers/usb/mtu3/Makefile | 18 +
drivers/usb/mtu3/mtu3.h | 417 ++++++
drivers/usb/mtu3/mtu3_core.c | 863 ++++++++++++
drivers/usb/mtu3/mtu3_dr.c | 379 ++++++
drivers/usb/mtu3/mtu3_dr.h | 108 ++
drivers/usb/mtu3/mtu3_gadget.c | 730 ++++++++++
drivers/usb/mtu3/mtu3_gadget_ep0.c | 881 ++++++++++++
drivers/usb/mtu3/mtu3_host.c | 294 ++++
drivers/usb/mtu3/mtu3_hw_regs.h | 473 +++++++
drivers/usb/mtu3/mtu3_plat.c | 484 +++++++
drivers/usb/mtu3/mtu3_qmu.c | 573 ++++++++
drivers/usb/mtu3/mtu3_qmu.h | 43 +
drivers/usb/musb/da8xx.c | 70 +-
drivers/usb/musb/musb_core.c | 29 +-
drivers/usb/musb/musb_core.h | 6 +
drivers/usb/musb/musb_gadget.c | 8 +-
drivers/usb/musb/musb_host.c | 2 +-
drivers/usb/musb/musb_virthub.c | 1 -
drivers/usb/musb/omap2430.c | 6 +-
drivers/usb/musb/sunxi.c | 25 +-
drivers/usb/phy/Kconfig | 1 +
drivers/usb/phy/phy-am335x-control.c | 2 +
drivers/usb/phy/phy-generic.c | 9 +
drivers/usb/phy/phy-isp1301-omap.c | 2 +-
drivers/usb/phy/phy-twl6030-usb.c | 23 +-
drivers/usb/renesas_usbhs/fifo.c | 5 +-
drivers/usb/serial/Kconfig | 10 +
drivers/usb/serial/Makefile | 1 +
drivers/usb/serial/ch341.c | 113 +-
drivers/usb/serial/cp210x.c | 411 +++++-
drivers/usb/serial/f81534.c | 1409 +++++++++++++++++++
drivers/usb/serial/ftdi_sio.c | 5 -
drivers/usb/serial/io_edgeport.c | 3 -
drivers/usb/serial/io_ti.c | 3 -
drivers/usb/serial/kl5kusb105.c | 35 +-
drivers/usb/serial/mos7720.c | 3 -
drivers/usb/serial/mos7840.c | 3 -
drivers/usb/serial/opticon.c | 3 -
drivers/usb/serial/option.c | 7 +
drivers/usb/serial/quatech2.c | 3 -
drivers/usb/serial/ssu100.c | 3 -
drivers/usb/serial/ti_usb_3410_5052.c | 3 -
drivers/usb/serial/usb_wwan.c | 3 -
drivers/usb/storage/usb.c | 1 -
drivers/usb/usbip/vhci_hcd.c | 3 +-
drivers/usb/usbip/vhci_sysfs.c | 1 +
drivers/usb/usbip/vudc_dev.c | 45 +-
drivers/usb/usbip/vudc_transfer.c | 8 +-
drivers/usb/wusbcore/dev-sysfs.c | 6 +-
drivers/usb/wusbcore/security.c | 1 +
drivers/usb/wusbcore/wa-nep.c | 1 +
drivers/usb/wusbcore/wa-xfer.c | 1 +
drivers/usb/wusbcore/wusbhc.c | 13 +-
include/linux/fsl_devices.h | 1 +
include/linux/usb.h | 2 +-
include/linux/usb/gadget.h | 4 +-
include/linux/usb/hcd.h | 19 +-
include/uapi/linux/usb/ch9.h | 24 +-
tools/usb/usbip/.gitignore | 4 +
tools/usb/usbip/src/usbipd.c | 7 -
220 files changed, 14119 insertions(+), 5002 deletions(-)
create mode 100644 Documentation/ABI/testing/sysfs-platform-phy-rcar-gen3-usb2
rename Documentation/devicetree/bindings/phy/{meson-usb2-phy.txt => meson8b-usb2-phy.txt} (87%)
create mode 100644 Documentation/devicetree/bindings/usb/da8xx-usb.txt
create mode 100644 Documentation/devicetree/bindings/usb/mt8173-mtu3.txt
create mode 100644 Documentation/devicetree/bindings/usb/ohci-da8xx.txt
create mode 100644 Documentation/devicetree/bindings/usb/s3c2410-usb.txt
create mode 100644 drivers/phy/phy-meson8b-usb2.c
delete mode 100644 drivers/phy/phy-miphy365x.c
delete mode 100644 drivers/phy/phy-stih41x-usb.c
create mode 100644 drivers/usb/dwc2/params.c
delete mode 100644 drivers/usb/dwc3/debug.c
create mode 100644 drivers/usb/mtu3/Kconfig
create mode 100644 drivers/usb/mtu3/Makefile
create mode 100644 drivers/usb/mtu3/mtu3.h
create mode 100644 drivers/usb/mtu3/mtu3_core.c
create mode 100644 drivers/usb/mtu3/mtu3_dr.c
create mode 100644 drivers/usb/mtu3/mtu3_dr.h
create mode 100644 drivers/usb/mtu3/mtu3_gadget.c
create mode 100644 drivers/usb/mtu3/mtu3_gadget_ep0.c
create mode 100644 drivers/usb/mtu3/mtu3_host.c
create mode 100644 drivers/usb/mtu3/mtu3_hw_regs.h
create mode 100644 drivers/usb/mtu3/mtu3_plat.c
create mode 100644 drivers/usb/mtu3/mtu3_qmu.c
create mode 100644 drivers/usb/mtu3/mtu3_qmu.h
create mode 100644 drivers/usb/serial/f81534.c
^ permalink raw reply
* [PATCH] drivers: media: i2c: mt9m111: constify v4l2_subdev_* structures
From: Bhumika Goyal @ 2016-12-13 17:35 UTC (permalink / raw)
To: julia.lawall,
0001-drivers-media-i2c-mt9m111-constify-v4l2_subdev_-stru.patch,
linux-media, linux-kernel
Cc: Bhumika Goyal
v4l2_subdev_{core/video}_ops structures are stored in the
fields of the v4l2_subdev_ops structure which are of type const.
Also, v4l2_subdev_ops structure is passed to a function
having its argument of type const. As these structures are never
modified, so declare them as const.
Done using Coccinelle: (One of the scripts used)
@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct v4l2_subdev_video_ops i@p = {...};
@ok1@
identifier r1.i;
position p;
struct v4l2_subdev_ops obj;
@@
obj.video=&i@p;
@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p
@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct v4l2_subdev_video_ops i;
File size before:
text data bss dec hex filename
6082 1010 16 7108 1bc4 drivers/media/i2c/mt9m111.o
File size after:
text data bss dec hex filename
6466 642 16 7124 1bd4 drivers/media/i2c/mt9m111.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
drivers/media/i2c/mt9m111.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/i2c/mt9m111.c b/drivers/media/i2c/mt9m111.c
index 72e71b7..99b992e 100644
--- a/drivers/media/i2c/mt9m111.c
+++ b/drivers/media/i2c/mt9m111.c
@@ -835,7 +835,7 @@ static int mt9m111_s_power(struct v4l2_subdev *sd, int on)
.s_ctrl = mt9m111_s_ctrl,
};
-static struct v4l2_subdev_core_ops mt9m111_subdev_core_ops = {
+static const struct v4l2_subdev_core_ops mt9m111_subdev_core_ops = {
.s_power = mt9m111_s_power,
#ifdef CONFIG_VIDEO_ADV_DEBUG
.g_register = mt9m111_g_register,
@@ -865,7 +865,7 @@ static int mt9m111_g_mbus_config(struct v4l2_subdev *sd,
return 0;
}
-static struct v4l2_subdev_video_ops mt9m111_subdev_video_ops = {
+static const struct v4l2_subdev_video_ops mt9m111_subdev_video_ops = {
.g_mbus_config = mt9m111_g_mbus_config,
};
@@ -877,7 +877,7 @@ static int mt9m111_g_mbus_config(struct v4l2_subdev *sd,
.set_fmt = mt9m111_set_fmt,
};
-static struct v4l2_subdev_ops mt9m111_subdev_ops = {
+static const struct v4l2_subdev_ops mt9m111_subdev_ops = {
.core = &mt9m111_subdev_core_ops,
.video = &mt9m111_subdev_video_ops,
.pad = &mt9m111_subdev_pad_ops,
--
1.9.1
^ permalink raw reply related
* [GIT PULL] TTY/Serial driver changes for 4.10-rc1
From: Greg KH @ 2016-12-13 17:36 UTC (permalink / raw)
To: Linus Torvalds, Jiri Slaby; +Cc: Andrew Morton, linux-kernel, linux-serial
The following changes since commit a909d3e636995ba7c349e2ca5dbb528154d4ac30:
Linux 4.9-rc3 (2016-10-29 13:52:02 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git/ tags/tty-4.10-rc1
for you to fetch changes up to a9b01b5823f73dc741b623dfc52ccd68f8139b55:
serial: 8250_mid fix calltrace when hotplug 8250 serial controller (2016-11-30 13:06:08 +0100)
----------------------------------------------------------------
TTY/Serial patches for 4.10-rc1
Here's the tty/serial patchset for 4.10-rc1.
It's been a quiet kernel cycle for this subsystem, just a small number
of changes. A few new serial drivers, and some cleanups to the old
vgacon logic, and other minor serial driver changes as well.
All of these have been in linux-next for a while with no reported
issues.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----------------------------------------------------------------
Aleksey Makarov (1):
serial: pl011: add console matching function
Andy Shevchenko (6):
serial: 8250_lpss: set PCI master only for private DMA
serial: 8250_lpss: Try to enable Memory-Write-Invalidate
serial: 8250_lpss: get IRQ via pci_irq_vector()
serial: 8250_port: export serial8250_rpm_{get|put}_tx()
serial: 8250_dma: power off device after TX is done
serial: core: don't check port twice in a row
Angelo Butti (1):
8250: FIX Fourth port offset of Pericom PI7C9X7954 boards
Arnd Bergmann (4):
serial: 8250_pxa: hide early console setup when disabled
serial: pxa2xx: remove __deprecated annotation
serial: pxa2xx: mark PM functions as __maybe_unused
tty: nozomi: avoid sprintf buffer overflow
Askar Safin (1):
tty: typo in comments in drivers/tty/vt/keyboard.c
Ed Blake (3):
serial: 8250: Add IrDA to UART capabilities
serial: 8250: Expose set_ldisc function
serial: 8250_dw: Add support for IrDA SIR mode
Gabriel Krisman Bertazi (1):
serial: 8250_pci: Detach low-level driver during PCI error recovery
Greg Kroah-Hartman (2):
serial: fsl_lpuart: remove build warning
Merge 4.9-rc3 into tty-next
Ji-Ze Hong (Peter Hong) (6):
serial: 8250_fintek: Refactoring read/write method
serial: 8250_fintek: Set IRQ Mode when port probed
serial: 8250_fintek: Set maximum FIFO of F81216H
serial: 8250_fintek: Add F81216 Support
serial: 8250_fintek: Add F81866 Support
serial: 8250_fintek: Add F81865 Support
Jiri Slaby (7):
tty: vt, cleanup and document con_scroll
tty: vt, unify scrolling functions
tty: vgacon+sisusb, move scrolldelta to a common helper
tty: vt, compute vc offsets in advance
tty: vt, rename variables to sane names
vgacon: switch boolean variables to bool
vgacon: remove prehistoric macros
Johan Hovold (3):
tty: amiserial: fix invalid user-pointer check
tty: rocket: fix invalid user-pointer checks
serial: crisv10: fix invalid user-pointer check
Josh Cartwright (1):
sc16is7xx: Drop bogus use of IRQF_ONESHOT
Julia Lawall (1):
tty: nozomi: use permission-specific DEVICE_ATTR variants
Kefeng Wang (1):
tty: amba-pl011: Add earlycon support for SBSA UART
Liwei Song (1):
serial: 8250_mid fix calltrace when hotplug 8250 serial controller
Maciej S. Szmigiero (1):
vt: fix Scroll Lock LED trigger name
Masahiro Yamada (2):
serial: 8250_uniphier: hardcode regshift to avoid unneeded memory read
serial: 8250_uniphier: avoid locking for FCR register write
Nicolae Rosia (2):
tty: serial: fsl_lpuart: add polled console functions
tty: serial: Makefile: move kgdb to be initialized last
Paul Gortmaker (1):
tty: serial: make crisv10 explicitly non-modular
Peter Robinson (1):
tty: serial: Make the STM32 serial port depend on it's arch
Robert Jarzmik (1):
serial: 8250: pxa: add devicetree earlyconsole
Sergey Yanovich (1):
serial: rewrite pxa2xx-uart to use 8250_core
Souptick Joarder (4):
serial: ioc4_serial: Free memory when kzalloc fails during probe
serial: ifx6x60: Free memory when probe fails
serial: sunhv: Free memory when remove() is called
serial: sunsu: Free memory when probe fails
Takatoshi Akiyama (1):
serial: sh-sci: Fix deadlock caused by serial output request
Waiman Long (1):
console: Move userspace I/O out of console_lock to fix lockdep warning
Wolfgang Ocker (1):
mxs-auart: count FIFO overrun errors
Documentation/VGA-softcursor.txt | 12 +-
arch/x86/platform/ce4100/ce4100.c | 2 +-
drivers/tty/amiserial.c | 2 -
drivers/tty/nozomi.c | 51 ++-----
drivers/tty/rocket.c | 4 -
drivers/tty/serial/8250/8250.h | 6 +
drivers/tty/serial/8250/8250_core.c | 7 +-
drivers/tty/serial/8250/8250_dma.c | 9 +-
drivers/tty/serial/8250/8250_dw.c | 22 +++
drivers/tty/serial/8250/8250_fintek.c | 231 ++++++++++++++++++++++++--------
drivers/tty/serial/8250/8250_lpss.c | 7 +-
drivers/tty/serial/8250/8250_mid.c | 4 +-
drivers/tty/serial/8250/8250_of.c | 2 -
drivers/tty/serial/8250/8250_pci.c | 57 +++++++-
drivers/tty/serial/8250/8250_port.c | 18 ++-
drivers/tty/serial/8250/8250_pxa.c | 190 ++++++++++++++++++++++++++
drivers/tty/serial/8250/8250_uniphier.c | 46 ++++---
drivers/tty/serial/8250/Kconfig | 10 ++
drivers/tty/serial/8250/Makefile | 1 +
drivers/tty/serial/Kconfig | 19 ++-
drivers/tty/serial/Makefile | 7 +-
drivers/tty/serial/amba-pl011.c | 56 ++++++++
drivers/tty/serial/crisv10.c | 8 +-
drivers/tty/serial/fsl_lpuart.c | 64 +++++++++
drivers/tty/serial/ifx6x60.c | 1 +
drivers/tty/serial/ioc4_serial.c | 7 +-
drivers/tty/serial/mxs-auart.c | 2 +-
drivers/tty/serial/pxa.c | 2 +
drivers/tty/serial/sc16is7xx.c | 2 +-
drivers/tty/serial/serial_core.c | 17 ++-
drivers/tty/serial/sh-sci.c | 20 +--
drivers/tty/serial/sunhv.c | 3 +-
drivers/tty/serial/sunsu.c | 1 +
drivers/tty/vt/consolemap.c | 115 ++++++++++------
drivers/tty/vt/keyboard.c | 4 +-
drivers/tty/vt/vt.c | 85 ++++++++----
drivers/usb/misc/sisusbvga/sisusb_con.c | 55 ++------
drivers/video/console/fbcon.c | 18 ++-
drivers/video/console/mdacon.c | 7 +-
drivers/video/console/newport_con.c | 8 +-
drivers/video/console/sticon.c | 7 +-
drivers/video/console/vgacon.c | 133 +++++-------------
include/linux/console.h | 16 ++-
include/linux/serial_8250.h | 8 +-
include/linux/serial_core.h | 2 +
include/linux/vt_kern.h | 2 +
46 files changed, 921 insertions(+), 429 deletions(-)
create mode 100644 drivers/tty/serial/8250/8250_pxa.c
^ permalink raw reply
* Re: [PATCH 1/6] clk: sunxi-ng: fix PLL_CPUX adjusting on A33
From: Maxime Ripard @ 2016-12-13 15:44 UTC (permalink / raw)
To: Icenowy Zheng
Cc: Russell King, Chen-Yu Tsai, Michael Turquette, Stephen Boyd,
Jorik Jonker, Hans de Goede, Quentin Schulz, devicetree,
linux-arm-kernel, linux-kernel, linux-clk
In-Reply-To: <20161213152252.53749-2-icenowy@aosc.xyz>
[-- Attachment #1: Type: text/plain, Size: 462 bytes --]
On Tue, Dec 13, 2016 at 11:22:47PM +0800, Icenowy Zheng wrote:
> When adjusting PLL_CPUX on A33, the PLL is temporarily driven too high,
> and the system hangs.
>
> Add a notifier to avoid this situation by temporarily switching to a
> known stable 24 MHz oscillator.
>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Applied, thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: [PATCH] kcm: fix spelling mistake in Kconfig, "connectons"
From: Colin Ian King @ 2016-12-13 17:32 UTC (permalink / raw)
To: David S . Miller, Tom Herbert, netdev; +Cc: linux-kernel
In-Reply-To: <20161213173025.24331-1-colin.king@canonical.com>
On 13/12/16 17:30, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Trivial fix to spelling mistake "connectons" to "connections" in
> Kconfig text.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> net/kcm/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/kcm/Kconfig b/net/kcm/Kconfig
> index 87fca36..23b01e1 100644
> --- a/net/kcm/Kconfig
> +++ b/net/kcm/Kconfig
> @@ -7,5 +7,5 @@ config AF_KCM
> ---help---
> KCM (Kernel Connection Multiplexor) sockets provide a method
> for multiplexing messages of a message based application
> - protocol over kernel connectons (e.g. TCP connections).
> + protocol over kernel connections (e.g. TCP connections).
>
>
Oops, ignore that, I was working on the wrong tree.
^ permalink raw reply
* Re: [PATCH v5] cgroup: Add new capability to allow a process to migrate other tasks between cgroups
From: John Stultz @ 2016-12-13 17:24 UTC (permalink / raw)
To: Casey Schaufler
Cc: Michael Kerrisk, lkml, Tejun Heo, Li Zefan, Jonathan Corbet,
open list:CONTROL GROUP (CGROUP), Android Kernel Team,
Rom Lemarchand, Colin Cross, Dmitry Shmidt, Todd Kjos,
Christian Poetzsch, Amit Pundir, Dmitry Torokhov, Kees Cook,
Serge E . Hallyn, Andy Lutomirski, Linux API
In-Reply-To: <f7ccb39f-bad8-4a78-c796-90927b839494@schaufler-ca.com>
On Tue, Dec 13, 2016 at 9:17 AM, Casey Schaufler <casey@schaufler-ca.com> wrote:
> On 12/13/2016 8:49 AM, John Stultz wrote:
>> On Tue, Dec 13, 2016 at 8:39 AM, Casey Schaufler <casey@schaufler-ca.com> wrote:
>>> On 12/13/2016 1:47 AM, Michael Kerrisk (man-pages) wrote:
>>>> How about CAP_CGROUP_CONTROL or some such, with the idea that this
>>>> might be a capability that allows the holder to step outside usual
>>>> cgroup rules? At the moment, that capability would allow only one such
>>>> step, but maybe there would be others in the future.
>>> I agree, but want to put it more strongly. The granularity of
>>> capabilities can never be fine enough for some people, and this
>>> is an example of a case where you're going a bit too far. If the
>>> use case is Android as you say, you don't need this. As my friends
>>> on the far side of the aisle would say, "just write SELinux policy"
>>> to correctly control access as required.
>> So.. The trouble is that while selinux is good for restricting
>> permissions, the in-kernel permission checks here are already too
>> restrictive.
>
> Why did the original authors of cgroups make it that restrictive?
> If there isn't a good reason, loosen it up. If there is a good
> reason, then pay heed to it.
That's what this patch is proposing. And I agree with Michael that the
newly proposed cap was a bit to narrowly focused on my immediate use
case, and broadening it to CGROUP_CONTROL is smart. Then that
capability could be further restricted w/ selinux policy, as you
suggest.
thanks
-john
^ permalink raw reply
* [PATCH] kcm: fix spelling mistake in Kconfig, "connectons"
From: Colin King @ 2016-12-13 17:30 UTC (permalink / raw)
To: David S . Miller, Tom Herbert, netdev; +Cc: linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Trivial fix to spelling mistake "connectons" to "connections" in
Kconfig text.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
net/kcm/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/kcm/Kconfig b/net/kcm/Kconfig
index 87fca36..23b01e1 100644
--- a/net/kcm/Kconfig
+++ b/net/kcm/Kconfig
@@ -7,5 +7,5 @@ config AF_KCM
---help---
KCM (Kernel Connection Multiplexor) sockets provide a method
for multiplexing messages of a message based application
- protocol over kernel connectons (e.g. TCP connections).
+ protocol over kernel connections (e.g. TCP connections).
--
2.10.2
^ permalink raw reply related
* [PATCH] drivers: media: i2c: ml86v7667: constify v4l2_subdev_* structures
From: Bhumika Goyal @ 2016-12-13 17:31 UTC (permalink / raw)
To: julia.lawall, mchehab, linux-media, linux-kernel; +Cc: Bhumika Goyal
v4l2_subdev_{core/video}_ops structures are stored in the
fields of the v4l2_subdev_ops structure which are of type const.
Also, v4l2_subdev_ops structure is passed to a function
having its argument of type const. As these structures are never
modified, so declare them as const.
Done using Coccinelle: (One of the scripts used)
@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct v4l2_subdev_ops i@p = {...};
@ok1@
identifier r1.i;
position p;
@@
v4l2_i2c_subdev_init(...,&i@p)
@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p
@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct v4l2_subdev_ops i;
File size before:
text data bss dec hex filename
2732 608 8 3348 d14 drivers/media/i2c/ml86v7667.o
File size after:
text data bss dec hex filename
3100 232 8 3340 d0c drivers/media/i2c/ml86v7667.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
drivers/media/i2c/ml86v7667.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/i2c/ml86v7667.c b/drivers/media/i2c/ml86v7667.c
index 38a20fe..57ef901 100644
--- a/drivers/media/i2c/ml86v7667.c
+++ b/drivers/media/i2c/ml86v7667.c
@@ -290,7 +290,7 @@ static int ml86v7667_s_register(struct v4l2_subdev *sd,
.s_ctrl = ml86v7667_s_ctrl,
};
-static struct v4l2_subdev_video_ops ml86v7667_subdev_video_ops = {
+static const struct v4l2_subdev_video_ops ml86v7667_subdev_video_ops = {
.g_std = ml86v7667_g_std,
.s_std = ml86v7667_s_std,
.querystd = ml86v7667_querystd,
@@ -304,14 +304,14 @@ static int ml86v7667_s_register(struct v4l2_subdev *sd,
.set_fmt = ml86v7667_fill_fmt,
};
-static struct v4l2_subdev_core_ops ml86v7667_subdev_core_ops = {
+static const struct v4l2_subdev_core_ops ml86v7667_subdev_core_ops = {
#ifdef CONFIG_VIDEO_ADV_DEBUG
.g_register = ml86v7667_g_register,
.s_register = ml86v7667_s_register,
#endif
};
-static struct v4l2_subdev_ops ml86v7667_subdev_ops = {
+static const struct v4l2_subdev_ops ml86v7667_subdev_ops = {
.core = &ml86v7667_subdev_core_ops,
.video = &ml86v7667_subdev_video_ops,
.pad = &ml86v7667_subdev_pad_ops,
--
1.9.1
^ permalink raw reply related
* [PATCH 4.4 10/16] can: raw: raw_setsockopt: limit number of can_filter that can be set
From: Greg Kroah-Hartman @ 2016-12-13 17:15 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Andrey Konovalov, Marc Kleine-Budde
In-Reply-To: <20161213171518.862135257@linuxfoundation.org>
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marc Kleine-Budde <mkl@pengutronix.de>
commit 332b05ca7a438f857c61a3c21a88489a21532364 upstream.
This patch adds a check to limit the number of can_filters that can be
set via setsockopt on CAN_RAW sockets. Otherwise allocations > MAX_ORDER
are not prevented resulting in a warning.
Reference: https://lkml.org/lkml/2016/12/2/230
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/uapi/linux/can.h | 1 +
net/can/raw.c | 3 +++
2 files changed, 4 insertions(+)
--- a/include/uapi/linux/can.h
+++ b/include/uapi/linux/can.h
@@ -196,5 +196,6 @@ struct can_filter {
};
#define CAN_INV_FILTER 0x20000000U /* to be set in can_filter.can_id */
+#define CAN_RAW_FILTER_MAX 512 /* maximum number of can_filter set via setsockopt() */
#endif /* !_UAPI_CAN_H */
--- a/net/can/raw.c
+++ b/net/can/raw.c
@@ -499,6 +499,9 @@ static int raw_setsockopt(struct socket
if (optlen % sizeof(struct can_filter) != 0)
return -EINVAL;
+ if (optlen > CAN_RAW_FILTER_MAX * sizeof(struct can_filter))
+ return -EINVAL;
+
count = optlen / sizeof(struct can_filter);
if (count > 1) {
^ permalink raw reply
* [PATCH 4.4 12/16] arm64: futex.h: Add missing PAN toggling
From: Greg Kroah-Hartman @ 2016-12-13 17:15 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, James Morse, Will Deacon,
Mian Yousaf Kaukab
In-Reply-To: <20161213171518.862135257@linuxfoundation.org>
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: James Morse <james.morse@arm.com>
commit 811d61e384e24759372bb3f01772f3744b0a8327 upstream.
futex.h's futex_atomic_cmpxchg_inatomic() does not use the
__futex_atomic_op() macro and needs its own PAN toggling. This was missed
when the feature was implemented.
Fixes: 338d4f49d6f ("arm64: kernel: Add support for Privileged Access Never")
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: Mian Yousaf Kaukab <yousaf.kaukab@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm64/include/asm/futex.h | 2 ++
1 file changed, 2 insertions(+)
--- a/arch/arm64/include/asm/futex.h
+++ b/arch/arm64/include/asm/futex.h
@@ -121,6 +121,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval,
return -EFAULT;
asm volatile("// futex_atomic_cmpxchg_inatomic\n"
+ALTERNATIVE("nop", SET_PSTATE_PAN(0), ARM64_HAS_PAN, CONFIG_ARM64_PAN)
" prfm pstl1strm, %2\n"
"1: ldxr %w1, %2\n"
" sub %w3, %w1, %w4\n"
@@ -137,6 +138,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval,
" .align 3\n"
" .quad 1b, 4b, 2b, 4b\n"
" .popsection\n"
+ALTERNATIVE("nop", SET_PSTATE_PAN(1), ARM64_HAS_PAN, CONFIG_ARM64_PAN)
: "+r" (ret), "=&r" (val), "+Q" (*uaddr), "=&r" (tmp)
: "r" (oldval), "r" (newval), "Ir" (-EFAULT)
: "memory");
^ permalink raw reply
* Re: WARNING: kernel stack frame pointer at ffffffff82e03f40 in swapper:0 has bad value (null)
From: Josh Poimboeuf @ 2016-12-13 17:26 UTC (permalink / raw)
To: Andy Lutomirski; +Cc: Borislav Petkov, x86-ml, lkml, Andy Lutomirski
In-Reply-To: <CALCETrVtjqXNCr22fGsmdg8ZyGSo=KO4uPMcfQNjdKr8ss5ykQ@mail.gmail.com>
On Tue, Dec 13, 2016 at 08:55:53AM -0800, Andy Lutomirski wrote:
> On Tue, Dec 13, 2016 at 6:34 AM, Josh Poimboeuf <jpoimboe@redhat.com> wrote:
> > On Mon, Dec 12, 2016 at 05:05:11PM -0600, Josh Poimboeuf wrote:
> >> On Mon, Dec 12, 2016 at 11:33:54PM +0100, Borislav Petkov wrote:
> >> > On Mon, Dec 12, 2016 at 04:11:47PM -0600, Josh Poimboeuf wrote:
> >> > > Yes, please.
> >> >
> >> > Attached.
> >>
> >> Thanks, I was able to recreate. Will take a look tomorrow.
> >
> > Figured it out. Your config has CONFIG_PARAVIRT=n, which convinces gcc
> > to create the following preamble for x86_64_start_kernel():
> >
> > 0000000000000124 <x86_64_start_kernel>:
> > 124: 4c 8d 54 24 08 lea 0x8(%rsp),%r10
> > 129: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp
> > 12d: 41 ff 72 f8 pushq -0x8(%r10)
> > 131: 55 push %rbp
> > 132: 48 89 e5 mov %rsp,%rbp
> >
> > It's an unusual pattern which aligns rsp (though in this case it's
> > already aligned) and saves the start_cpu() return address again on the
> > stack before storing the frame pointer.
>
> Um, what? I can reproduce it -- I get:
>
> 0000000000000124 <x86_64_start_kernel>:
> 124: 4c 8d 54 24 08 lea 0x8(%rsp),%r10
> 129: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp
> 12d: 41 ff 72 f8 pushq -0x8(%r10)
> 131: 55 push %rbp
> 132: 48 89 e5 mov %rsp,%rbp
> 135: 41 57 push %r15
> 137: 41 56 push %r14
> 139: 41 55 push %r13
> 13b: 41 54 push %r12
> 13d: 41 52 push %r10
> 13f: 53 push %rbx
> 140: 48 83 ec 10 sub $0x10,%rsp
>
> ...
>
> and the epilog looks like:
>
> 29c: 58 pop %rax
> 29d: 5a pop %rdx
> 29e: 5b pop %rbx
> 29f: 41 5a pop %r10
> 2a1: 41 5c pop %r12
> 2a3: 41 5d pop %r13
> 2a5: 41 5e pop %r14
> 2a7: 41 5f pop %r15
> 2a9: 5d pop %rbp
> 2aa: 49 8d 62 f8 lea -0x8(%r10),%rsp
> 2ae: c3 retq
>
> This is, I think, *terrible* code. It makes it entirely impossible
> for the CPU to look through the retq until the instruction right
> before it finishes because there's no way the CPU can tell what rsp is
> until the instruction right before the retq. And it's saving and
> restoring an entire extra register (r10) instead of just using rbp for
> this purpose. *And* the extra copy of the return address seems
> totally useless except for unwinding.
>
> This does indeed depend on CONFIG_PARAVIRT, but I'm not seeing what
> changes. Presumably something related to what happens in the
> function?
>
> I want to file a GCC bug, though. This code sucks.
Yeah, I can't figure out why it's doing that. I've seen it align the
stack before, but it was always *after* setting up the frame pointer and
pushing the registers on the stack. I have no idea what triggered it to
do it this way, but it would interesting to know if we can turn it off
somehow.
> > The unwinder assumes the last stack frame header is at a certain offset,
> > but the above code breaks that assumption. I still need to think about
> > the best way to fix it.
>
> Have a dummy written-in-asm top-of-the-stack function? Or recognize
> the end by the final saved RBP?
Assuming this issue could theoretically show up in *any* function called
by entry or head code, I think the least pervasive change would be to
just adjust the "last frame" check in the unwinder, aka
is_last_task_frame()), to check at the "aligned" off-by-one-word offset
in addition to the normal offset.
--
Josh
^ permalink raw reply
* [PATCH 4.4 13/16] m68k: Fix ndelay() macro
From: Greg Kroah-Hartman @ 2016-12-13 17:15 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Boris Brezillon, Geert Uytterhoeven
In-Reply-To: <20161213171518.862135257@linuxfoundation.org>
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Boris Brezillon <boris.brezillon@free-electrons.com>
commit 7e251bb21ae08ca2e4fb28cc0981fac2685a8efa upstream.
The current ndelay() macro definition has an extra semi-colon at the
end of the line thus leading to a compilation error when ndelay is used
in a conditional block without curly braces like this one:
if (cond)
ndelay(t);
else
...
which, after the preprocessor pass gives:
if (cond)
m68k_ndelay(t);;
else
...
thus leading to the following gcc error:
error: 'else' without a previous 'if'
Remove this extra semi-colon.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Fixes: c8ee038bd1488 ("m68k: Implement ndelay() based on the existing udelay() logic")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/m68k/include/asm/delay.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/m68k/include/asm/delay.h
+++ b/arch/m68k/include/asm/delay.h
@@ -114,6 +114,6 @@ static inline void __udelay(unsigned lon
*/
#define HZSCALE (268435456 / (1000000 / HZ))
-#define ndelay(n) __delay(DIV_ROUND_UP((n) * ((((HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6), 1000));
+#define ndelay(n) __delay(DIV_ROUND_UP((n) * ((((HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6), 1000))
#endif /* defined(_M68K_DELAY_H) */
^ permalink raw reply
* [PATCH 4.4 16/16] crypto: rsa - Add Makefile dependencies to fix parallel builds
From: Greg Kroah-Hartman @ 2016-12-13 17:16 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, David Michael, Herbert Xu,
Tuomas Tynkkynen
In-Reply-To: <20161213171518.862135257@linuxfoundation.org>
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Michael <david.michael@coreos.com>
commit 57891633eeef60e732e045731cf20e50ee80acb4 upstream.
Both asn1 headers are included by rsa_helper.c, so rsa_helper.o
should explicitly depend on them.
Signed-off-by: David Michael <david.michael@coreos.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Tuomas Tynkkynen <tuomas@tuxera.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
crypto/Makefile | 1 +
1 file changed, 1 insertion(+)
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -33,6 +33,7 @@ obj-$(CONFIG_CRYPTO_AKCIPHER2) += akciph
$(obj)/rsapubkey-asn1.o: $(obj)/rsapubkey-asn1.c $(obj)/rsapubkey-asn1.h
$(obj)/rsaprivkey-asn1.o: $(obj)/rsaprivkey-asn1.c $(obj)/rsaprivkey-asn1.h
+$(obj)/rsa_helper.o: $(obj)/rsapubkey-asn1.h $(obj)/rsaprivkey-asn1.h
clean-files += rsapubkey-asn1.c rsapubkey-asn1.h
clean-files += rsaprivkey-asn1.c rsaprivkey-asn1.h
^ permalink raw reply
* [PATCH] drivers: media: i2c: ak881x: constify v4l2_subdev_* structures
From: Bhumika Goyal @ 2016-12-13 17:26 UTC (permalink / raw)
To: julia.lawall, mchehab, linux-media, linux-kernel; +Cc: Bhumika Goyal
v4l2_subdev_{core/video}_ops structures are stored in the
fields of the v4l2_subdev_ops structure which are of type const.
Also, v4l2_subdev_ops structure is passed to a function
having its argument of type const. As these structures are never
modified, so declare them as const.
Done using Coccinelle: (One of the scripts used)
@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct v4l2_subdev_video_ops i@p = {...};
@ok1@
identifier r1.i;
position p;
struct v4l2_subdev_ops obj;
@@
obj.video=&i@p;
@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p
@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct v4l2_subdev_video_ops i;
File size before:
text data bss dec hex filename
1809 872 0 2681 a79 drivers/media/i2c/ak881x.o
File size after:
text data bss dec hex filename
2185 496 0 2681 a79 drivers/media/i2c/ak881x.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
drivers/media/i2c/ak881x.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/i2c/ak881x.c b/drivers/media/i2c/ak881x.c
index 3a795dc..16682c84 100644
--- a/drivers/media/i2c/ak881x.c
+++ b/drivers/media/i2c/ak881x.c
@@ -205,14 +205,14 @@ static int ak881x_s_stream(struct v4l2_subdev *sd, int enable)
return 0;
}
-static struct v4l2_subdev_core_ops ak881x_subdev_core_ops = {
+static const struct v4l2_subdev_core_ops ak881x_subdev_core_ops = {
#ifdef CONFIG_VIDEO_ADV_DEBUG
.g_register = ak881x_g_register,
.s_register = ak881x_s_register,
#endif
};
-static struct v4l2_subdev_video_ops ak881x_subdev_video_ops = {
+static const struct v4l2_subdev_video_ops ak881x_subdev_video_ops = {
.s_std_output = ak881x_s_std_output,
.s_stream = ak881x_s_stream,
};
@@ -224,7 +224,7 @@ static int ak881x_s_stream(struct v4l2_subdev *sd, int enable)
.get_fmt = ak881x_fill_fmt,
};
-static struct v4l2_subdev_ops ak881x_subdev_ops = {
+static const struct v4l2_subdev_ops ak881x_subdev_ops = {
.core = &ak881x_subdev_core_ops,
.video = &ak881x_subdev_video_ops,
.pad = &ak881x_subdev_pad_ops,
--
1.9.1
^ permalink raw reply related
* [PATCH 4.4 02/16] parisc: Purge TLB before setting PTE
From: Greg Kroah-Hartman @ 2016-12-13 17:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, John David Anglin, Helge Deller
In-Reply-To: <20161213171518.862135257@linuxfoundation.org>
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: John David Anglin <dave.anglin@bell.net>
commit c78e710c1c9fbeff43dddc0aa3d0ff458e70b0cc upstream.
The attached change interchanges the order of purging the TLB and
setting the corresponding page table entry. TLB purges are strongly
ordered. It occurred to me one night that setting the PTE first might
have subtle ordering issues on SMP machines and cause random memory
corruption.
A TLB lock guards the insertion of user TLB entries. So after the TLB
is purged, a new entry can't be inserted until the lock is released.
This ensures that the new PTE value is used when the lock is released.
Since making this change, no random segmentation faults have been
observed on the Debian hppa buildd servers.
Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/parisc/include/asm/pgtable.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/arch/parisc/include/asm/pgtable.h
+++ b/arch/parisc/include/asm/pgtable.h
@@ -65,9 +65,9 @@ static inline void purge_tlb_entries(str
unsigned long flags; \
spin_lock_irqsave(&pa_tlb_lock, flags); \
old_pte = *ptep; \
- set_pte(ptep, pteval); \
if (pte_inserted(old_pte)) \
purge_tlb_entries(mm, addr); \
+ set_pte(ptep, pteval); \
spin_unlock_irqrestore(&pa_tlb_lock, flags); \
} while (0)
@@ -478,8 +478,8 @@ static inline int ptep_test_and_clear_yo
spin_unlock_irqrestore(&pa_tlb_lock, flags);
return 0;
}
- set_pte(ptep, pte_mkold(pte));
purge_tlb_entries(vma->vm_mm, addr);
+ set_pte(ptep, pte_mkold(pte));
spin_unlock_irqrestore(&pa_tlb_lock, flags);
return 1;
}
@@ -492,9 +492,9 @@ static inline pte_t ptep_get_and_clear(s
spin_lock_irqsave(&pa_tlb_lock, flags);
old_pte = *ptep;
- set_pte(ptep, __pte(0));
if (pte_inserted(old_pte))
purge_tlb_entries(mm, addr);
+ set_pte(ptep, __pte(0));
spin_unlock_irqrestore(&pa_tlb_lock, flags);
return old_pte;
@@ -504,8 +504,8 @@ static inline void ptep_set_wrprotect(st
{
unsigned long flags;
spin_lock_irqsave(&pa_tlb_lock, flags);
- set_pte(ptep, pte_wrprotect(*ptep));
purge_tlb_entries(mm, addr);
+ set_pte(ptep, pte_wrprotect(*ptep));
spin_unlock_irqrestore(&pa_tlb_lock, flags);
}
^ permalink raw reply
* [PATCH 4.4 03/16] parisc: Remove unnecessary TLB purges from flush_dcache_page_asm and flush_icache_page_asm
From: Greg Kroah-Hartman @ 2016-12-13 17:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, John David Anglin, Helge Deller
In-Reply-To: <20161213171518.862135257@linuxfoundation.org>
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: John David Anglin <dave.anglin@bell.net>
commit febe42964fe182281859b3d43d844bb25ca49367 upstream.
We have four routines in pacache.S that use temporary alias pages:
copy_user_page_asm(), clear_user_page_asm(), flush_dcache_page_asm() and
flush_icache_page_asm(). copy_user_page_asm() and clear_user_page_asm()
don't purge the TLB entry used for the operation.
flush_dcache_page_asm() and flush_icache_page_asm do purge the entry.
Presumably, this was thought to optimize TLB use. However, the
operation is quite heavy weight on PA 1.X processors as we need to take
the TLB lock and a TLB broadcast is sent to all processors.
This patch removes the purges from flush_dcache_page_asm() and
flush_icache_page_asm.
Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/parisc/kernel/pacache.S | 22 +---------------------
1 file changed, 1 insertion(+), 21 deletions(-)
--- a/arch/parisc/kernel/pacache.S
+++ b/arch/parisc/kernel/pacache.S
@@ -886,19 +886,10 @@ ENTRY(flush_dcache_page_asm)
fdc,m r31(%r28)
fdc,m r31(%r28)
fdc,m r31(%r28)
- cmpb,COND(<<) %r28, %r25,1b
+ cmpb,COND(<<) %r28, %r25,1b
fdc,m r31(%r28)
sync
-
-#ifdef CONFIG_PA20
- pdtlb,l %r0(%r25)
-#else
- tlb_lock %r20,%r21,%r22
- pdtlb %r0(%r25)
- tlb_unlock %r20,%r21,%r22
-#endif
-
bv %r0(%r2)
nop
.exit
@@ -973,17 +964,6 @@ ENTRY(flush_icache_page_asm)
fic,m %r31(%sr4,%r28)
sync
-
-#ifdef CONFIG_PA20
- pdtlb,l %r0(%r28)
- pitlb,l %r0(%sr4,%r25)
-#else
- tlb_lock %r20,%r21,%r22
- pdtlb %r0(%r28)
- pitlb %r0(%sr4,%r25)
- tlb_unlock %r20,%r21,%r22
-#endif
-
bv %r0(%r2)
nop
.exit
^ permalink raw reply
* [PATCH 4.4 04/16] parisc: Fix TLB related boot crash on SMP machines
From: Greg Kroah-Hartman @ 2016-12-13 17:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Helge Deller
In-Reply-To: <20161213171518.862135257@linuxfoundation.org>
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Helge Deller <deller@gmx.de>
commit 24d0492b7d5d321a9c5846c8c974eba9823ffaa0 upstream.
At bootup we run measurements to calculate the best threshold for when we
should be using full TLB flushes instead of just flushing a specific amount of
TLB entries. This performance test is run over the kernel text segment.
But running this TLB performance test on the kernel text segment turned out to
crash some SMP machines when the kernel text pages were mapped as huge pages.
To avoid those crashes this patch simply skips this test on some SMP machines
and calculates an optimal threshold based on the maximum number of available
TLB entries and number of online CPUs.
On a technical side, this seems to happen:
The TLB measurement code uses flush_tlb_kernel_range() to flush specific TLB
entries with a page size of 4k (pdtlb 0(sr1,addr)). On UP systems this purge
instruction seems to work without problems even if the pages were mapped as
huge pages. But on SMP systems the TLB purge instruction is broadcasted to
other CPUs. Those CPUs then crash the machine because the page size is not as
expected. C8000 machines with PA8800/PA8900 CPUs were not affected by this
problem, because the required cache coherency prohibits to use huge pages at
all. Sadly I didn't found any documentation about this behaviour, so this
finding is purely based on testing with phyiscal SMP machines (A500-44 and
J5000, both were 2-way boxes).
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/parisc/kernel/cache.c | 11 +++++++++++
1 file changed, 11 insertions(+)
--- a/arch/parisc/kernel/cache.c
+++ b/arch/parisc/kernel/cache.c
@@ -375,6 +375,15 @@ void __init parisc_setup_cache_timing(vo
/* calculate TLB flush threshold */
+ /* On SMP machines, skip the TLB measure of kernel text which
+ * has been mapped as huge pages. */
+ if (num_online_cpus() > 1 && !parisc_requires_coherency()) {
+ threshold = max(cache_info.it_size, cache_info.dt_size);
+ threshold *= PAGE_SIZE;
+ threshold /= num_online_cpus();
+ goto set_tlb_threshold;
+ }
+
alltime = mfctl(16);
flush_tlb_all();
alltime = mfctl(16) - alltime;
@@ -393,6 +402,8 @@ void __init parisc_setup_cache_timing(vo
alltime, size, rangetime);
threshold = PAGE_ALIGN(num_online_cpus() * size * alltime / rangetime);
+
+set_tlb_threshold:
if (threshold)
parisc_tlb_flush_threshold = threshold;
printk(KERN_INFO "TLB flush threshold set to %lu KiB\n",
^ permalink raw reply
* [PATCH 4.4 05/16] zram: restrict add/remove attributes to root only
From: Greg Kroah-Hartman @ 2016-12-13 17:15 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Sergey Senozhatsky, Steven Allen,
Minchan Kim, Andrew Morton, Linus Torvalds
In-Reply-To: <20161213171518.862135257@linuxfoundation.org>
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
commit 5c7e9ccd91b90d87029261f8856294ee51934cab upstream.
zram hot_add sysfs attribute is a very 'special' attribute - reading
from it creates a new uninitialized zram device. This file, by a
mistake, can be read by a 'normal' user at the moment, while only root
must be able to create a new zram device, therefore hot_add attribute
must have S_IRUSR mode, not S_IRUGO.
[akpm@linux-foundation.org: s/sence/sense/, reflow comment to use 80 cols]
Fixes: 6566d1a32bf72 ("zram: add dynamic device add/remove functionality")
Link: http://lkml.kernel.org/r/20161205155845.20129-1-sergey.senozhatsky@gmail.com
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Reported-by: Steven Allen <steven@stebalien.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/block/zram/zram_drv.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -1378,8 +1378,14 @@ static ssize_t hot_remove_store(struct c
return ret ? ret : count;
}
+/*
+ * NOTE: hot_add attribute is not the usual read-only sysfs attribute. In a
+ * sense that reading from this file does alter the state of your system -- it
+ * creates a new un-initialized zram device and returns back this device's
+ * device_id (or an error code if it fails to create a new device).
+ */
static struct class_attribute zram_control_class_attrs[] = {
- __ATTR_RO(hot_add),
+ __ATTR(hot_add, 0400, hot_add_show, NULL),
__ATTR_WO(hot_remove),
__ATTR_NULL,
};
^ permalink raw reply
* [PATCH 4.8 03/33] powerpc/boot: Fix build failure in 32-bit boot wrapper
From: Greg Kroah-Hartman @ 2016-12-13 17:16 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Ben Hutchings, Michael Ellerman
In-Reply-To: <20161213171534.171564506@linuxfoundation.org>
4.8-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Hutchings <ben@decadent.org.uk>
commit 10c77dba40ff58fc03587b3b60725bb7fd723183 upstream.
OPAL is not callable from 32-bit mode and the assembly code for it
may not even build (depending on how binutils was configured).
References: https://buildd.debian.org/status/fetch.php?pkg=linux&arch=powerpcspe&ver=4.8.7-1&stamp=1479203712
Fixes: 656ad58ef19e ("powerpc/boot: Add OPAL console to epapr wrappers")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/boot/Makefile | 3 ++-
arch/powerpc/boot/opal.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -78,7 +78,8 @@ src-wlib-y := string.S crt0.S crtsavres.
ns16550.c serial.c simple_alloc.c div64.S util.S \
gunzip_util.c elf_util.c $(zlib) devtree.c stdlib.c \
oflib.c ofconsole.c cuboot.c mpsc.c cpm-serial.c \
- uartlite.c mpc52xx-psc.c opal.c opal-calls.S
+ uartlite.c mpc52xx-psc.c opal.c
+src-wlib-$(CONFIG_PPC64_BOOT_WRAPPER) += opal-calls.S
src-wlib-$(CONFIG_40x) += 4xx.c planetcore.c
src-wlib-$(CONFIG_44x) += 4xx.c ebony.c bamboo.c
src-wlib-$(CONFIG_8xx) += mpc8xx.c planetcore.c fsl-soc.c
--- a/arch/powerpc/boot/opal.c
+++ b/arch/powerpc/boot/opal.c
@@ -13,7 +13,7 @@
#include <libfdt.h>
#include "../include/asm/opal-api.h"
-#ifdef __powerpc64__
+#ifdef CONFIG_PPC64_BOOT_WRAPPER
/* Global OPAL struct used by opal-call.S */
struct opal {
^ permalink raw reply
* [PATCH 4.8 12/33] scsi: lpfc: fix oops/BUG in lpfc_sli_ringtxcmpl_put()
From: Greg Kroah-Hartman @ 2016-12-13 17:16 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Harsha Thyagaraja,
Mauricio Faria de Oliveira, Johannes Thumshirn,
Martin K. Petersen
In-Reply-To: <20161213171534.171564506@linuxfoundation.org>
4.8-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
commit 2319f847a8910cff1d46c9b66aa1dd7cc3e836a9 upstream.
The BUG_ON() recently introduced in lpfc_sli_ringtxcmpl_put() is hit in
the lpfc_els_abort() > lpfc_sli_issue_abort_iotag() >
lpfc_sli_abort_iotag_issue() function path [similar names], due to
'piocb->vport == NULL':
BUG_ON(!piocb || !piocb->vport);
This happens because lpfc_sli_abort_iotag_issue() doesn't set the
'abtsiocbp->vport' pointer -- but this is not the problem.
Previously, lpfc_sli_ringtxcmpl_put() accessed 'piocb->vport' only if
'piocb->iocb.ulpCommand' is neither CMD_ABORT_XRI_CN nor
CMD_CLOSE_XRI_CN, which are the only possible values for
lpfc_sli_abort_iotag_issue():
lpfc_sli_ringtxcmpl_put():
if ((unlikely(pring->ringno == LPFC_ELS_RING)) &&
(piocb->iocb.ulpCommand != CMD_ABORT_XRI_CN) &&
(piocb->iocb.ulpCommand != CMD_CLOSE_XRI_CN) &&
(!(piocb->vport->load_flag & FC_UNLOADING)))
lpfc_sli_abort_iotag_issue():
if (phba->link_state >= LPFC_LINK_UP)
iabt->ulpCommand = CMD_ABORT_XRI_CN;
else
iabt->ulpCommand = CMD_CLOSE_XRI_CN;
So, this function path would not have hit this possible NULL pointer
dereference before.
In order to fix this regression, move the second part of the BUG_ON()
check prior to the pointer dereference that it does check for.
For reference, this is the stack trace observed. The problem happened
because an unsolicited event was received - a PLOGI was received after
our PLOGI was issued but not yet complete, so the discovery state
machine goes on to sw-abort our PLOGI.
kernel BUG at drivers/scsi/lpfc/lpfc_sli.c:1326!
Oops: Exception in kernel mode, sig: 5 [#1]
<...>
NIP [...] lpfc_sli_ringtxcmpl_put+0x1c/0xf0 [lpfc]
LR [...] __lpfc_sli_issue_iocb_s4+0x188/0x200 [lpfc]
Call Trace:
[...] [...] __lpfc_sli_issue_iocb_s4+0xb0/0x200 [lpfc] (unreliable)
[...] [...] lpfc_sli_issue_abort_iotag+0x2b4/0x350 [lpfc]
[...] [...] lpfc_els_abort+0x1a8/0x4a0 [lpfc]
[...] [...] lpfc_rcv_plogi+0x6d4/0x700 [lpfc]
[...] [...] lpfc_rcv_plogi_plogi_issue+0xd8/0x1d0 [lpfc]
[...] [...] lpfc_disc_state_machine+0xc0/0x2b0 [lpfc]
[...] [...] lpfc_els_unsol_buffer+0xcc0/0x26c0 [lpfc]
[...] [...] lpfc_els_unsol_event+0xa8/0x220 [lpfc]
[...] [...] lpfc_complete_unsol_iocb+0xb8/0x138 [lpfc]
[...] [...] lpfc_sli4_handle_received_buffer+0x6a0/0xec0 [lpfc]
[...] [...] lpfc_sli_handle_slow_ring_event_s4+0x1c4/0x240 [lpfc]
[...] [...] lpfc_sli_handle_slow_ring_event+0x24/0x40 [lpfc]
[...] [...] lpfc_do_work+0xd88/0x1970 [lpfc]
[...] [...] kthread+0x108/0x130
[...] [...] ret_from_kernel_thread+0x5c/0xbc
<...>
Fixes: 22466da5b4b7 ("lpfc: Fix possible NULL pointer dereference")
Reported-by: Harsha Thyagaraja <hathyaga@in.ibm.com>
Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/scsi/lpfc/lpfc_sli.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -1323,18 +1323,20 @@ lpfc_sli_ringtxcmpl_put(struct lpfc_hba
{
lockdep_assert_held(&phba->hbalock);
- BUG_ON(!piocb || !piocb->vport);
+ BUG_ON(!piocb);
list_add_tail(&piocb->list, &pring->txcmplq);
piocb->iocb_flag |= LPFC_IO_ON_TXCMPLQ;
if ((unlikely(pring->ringno == LPFC_ELS_RING)) &&
(piocb->iocb.ulpCommand != CMD_ABORT_XRI_CN) &&
- (piocb->iocb.ulpCommand != CMD_CLOSE_XRI_CN) &&
- (!(piocb->vport->load_flag & FC_UNLOADING)))
- mod_timer(&piocb->vport->els_tmofunc,
- jiffies +
- msecs_to_jiffies(1000 * (phba->fc_ratov << 1)));
+ (piocb->iocb.ulpCommand != CMD_CLOSE_XRI_CN)) {
+ BUG_ON(!piocb->vport);
+ if (!(piocb->vport->load_flag & FC_UNLOADING))
+ mod_timer(&piocb->vport->els_tmofunc,
+ jiffies +
+ msecs_to_jiffies(1000 * (phba->fc_ratov << 1)));
+ }
return 0;
}
^ permalink raw reply
* [PATCH 4.8 13/33] sched/autogroup: Fix 64-bit kernel nice level adjustment
From: Greg Kroah-Hartman @ 2016-12-13 17:16 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Michael Kerrisk, Mike Galbraith,
Linus Torvalds, Peter Zijlstra, Peter Zijlstra, Thomas Gleixner,
linux-man, Ingo Molnar
In-Reply-To: <20161213171534.171564506@linuxfoundation.org>
4.8-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mike Galbraith <efault@gmx.de>
commit 83929cce95251cc77e5659bf493bd424ae0e7a67 upstream.
Michael Kerrisk reported:
> Regarding the previous paragraph... My tests indicate
> that writing *any* value to the autogroup [nice priority level]
> file causes the task group to get a lower priority.
Because autogroup didn't call the then meaningless scale_load()...
Autogroup nice level adjustment has been broken ever since load
resolution was increased for 64-bit kernels. Use scale_load() to
scale group weight.
Michael Kerrisk tested this patch to fix the problem:
> Applied and tested against 4.9-rc6 on an Intel u7 (4 cores).
> Test setup:
>
> Terminal window 1: running 40 CPU burner jobs
> Terminal window 2: running 40 CPU burner jobs
> Terminal window 1: running 1 CPU burner job
>
> Demonstrated that:
> * Writing "0" to the autogroup file for TW1 now causes no change
> to the rate at which the process on the terminal consume CPU.
> * Writing -20 to the autogroup file for TW1 caused those processes
> to get the lion's share of CPU while TW2 TW3 get a tiny amount.
> * Writing -20 to the autogroup files for TW1 and TW3 allowed the
> process on TW3 to get as much CPU as it was getting as when
> the autogroup nice values for both terminals were 0.
Reported-by: Michael Kerrisk <mtk.manpages@gmail.com>
Tested-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Mike Galbraith <umgwanakikbuti@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-man <linux-man@vger.kernel.org>
Link: http://lkml.kernel.org/r/1479897217.4306.6.camel@gmx.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/sched/auto_group.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/kernel/sched/auto_group.c
+++ b/kernel/sched/auto_group.c
@@ -192,6 +192,7 @@ int proc_sched_autogroup_set_nice(struct
{
static unsigned long next = INITIAL_JIFFIES;
struct autogroup *ag;
+ unsigned long shares;
int err;
if (nice < MIN_NICE || nice > MAX_NICE)
@@ -210,9 +211,10 @@ int proc_sched_autogroup_set_nice(struct
next = HZ / 10 + jiffies;
ag = autogroup_task_get(p);
+ shares = scale_load(sched_prio_to_weight[nice + 20]);
down_write(&ag->lock);
- err = sched_group_set_shares(ag->tg, sched_prio_to_weight[nice + 20]);
+ err = sched_group_set_shares(ag->tg, shares);
if (!err)
ag->nice = nice;
up_write(&ag->lock);
^ permalink raw reply
* [PATCH 4.8 14/33] vhost-vsock: fix orphan connection reset
From: Greg Kroah-Hartman @ 2016-12-13 17:16 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Stefan Hajnoczi, Peng Tao,
David S. Miller
In-Reply-To: <20161213171534.171564506@linuxfoundation.org>
4.8-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Tao <bergwolf@gmail.com>
commit c4587631c7bad47c045e081d1553cd73a23be59a upstream.
local_addr.svm_cid is host cid. We should check guest cid instead,
which is remote_addr.svm_cid. Otherwise we end up resetting all
connections to all guests.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/vhost/vsock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/vhost/vsock.c
+++ b/drivers/vhost/vsock.c
@@ -506,7 +506,7 @@ static void vhost_vsock_reset_orphans(st
* executing.
*/
- if (!vhost_vsock_get(vsk->local_addr.svm_cid)) {
+ if (!vhost_vsock_get(vsk->remote_addr.svm_cid)) {
sock_set_flag(sk, SOCK_DONE);
vsk->peer_shutdown = SHUTDOWN_MASK;
sk->sk_state = SS_UNCONNECTED;
^ permalink raw reply
* [PATCH 4.8 15/33] perf/x86: Fix full width counter, counter overflow
From: Greg Kroah-Hartman @ 2016-12-13 17:16 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Lukasz Odzioba, Liang, Kan,
Peter Zijlstra (Intel), Alexander Shishkin,
Arnaldo Carvalho de Melo, Jiri Olsa, Linus Torvalds,
Stephane Eranian, Thomas Gleixner, Vince Weaver, Ingo Molnar
In-Reply-To: <20161213171534.171564506@linuxfoundation.org>
4.8-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zijlstra (Intel) <peterz@infradead.org>
commit 7f612a7f0bc13a2361a152862435b7941156b6af upstream.
Lukasz reported that perf stat counters overflow handling is broken on KNL/SLM.
Both these parts have full_width_write set, and that does indeed have
a problem. In order to deal with counter wrap, we must sample the
counter at at least half the counter period (see also the sampling
theorem) such that we can unambiguously reconstruct the count.
However commit:
069e0c3c4058 ("perf/x86/intel: Support full width counting")
sets the sampling interval to the full period, not half.
Fixing that exposes another issue, in that we must not sign extend the
delta value when we shift it right; the counter cannot have
decremented after all.
With both these issues fixed, counter overflow functions correctly
again.
Reported-by: Lukasz Odzioba <lukasz.odzioba@intel.com>
Tested-by: Liang, Kan <kan.liang@intel.com>
Tested-by: Odzioba, Lukasz <lukasz.odzioba@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Fixes: 069e0c3c4058 ("perf/x86/intel: Support full width counting")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/events/core.c | 2 +-
arch/x86/events/intel/core.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/arch/x86/events/core.c
+++ b/arch/x86/events/core.c
@@ -68,7 +68,7 @@ u64 x86_perf_event_update(struct perf_ev
int shift = 64 - x86_pmu.cntval_bits;
u64 prev_raw_count, new_raw_count;
int idx = hwc->idx;
- s64 delta;
+ u64 delta;
if (idx == INTEL_PMC_IDX_FIXED_BTS)
return 0;
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -4024,7 +4024,7 @@ __init int intel_pmu_init(void)
/* Support full width counters using alternative MSR range */
if (x86_pmu.intel_cap.full_width_write) {
- x86_pmu.max_period = x86_pmu.cntval_mask;
+ x86_pmu.max_period = x86_pmu.cntval_mask >> 1;
x86_pmu.perfctr = MSR_IA32_PMC0;
pr_cont("full-width counters, ");
}
^ permalink raw reply
* [PATCH 4.8 16/33] acpi, nfit: fix extended status translations for ACPI DSMs
From: Greg Kroah-Hartman @ 2016-12-13 17:16 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Vishal Verma, Dan Williams
In-Reply-To: <20161213171534.171564506@linuxfoundation.org>
4.8-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vishal Verma <vishal.l.verma@intel.com>
commit 9a901f5495e26e691c7d0ea7b6057a2f3e6330ed upstream.
ACPI DSMs can have an 'extended' status which can be non-zero to convey
additional information about the command. In the xlat_status routine,
where we translate the command statuses, we were returning an error for
a non-zero extended status, even if the primary status indicated success.
Return from each command's 'case' once we have verified both its status
and extend status are good.
Fixes: 11294d63ac91 ("nfit: fail DSMs that return non-zero status by default")
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/acpi/nfit/core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/acpi/nfit/core.c
+++ b/drivers/acpi/nfit/core.c
@@ -113,7 +113,7 @@ static int xlat_status(void *buf, unsign
flags = ND_ARS_PERSISTENT | ND_ARS_VOLATILE;
if ((status >> 16 & flags) == 0)
return -ENOTTY;
- break;
+ return 0;
case ND_CMD_ARS_START:
/* ARS is in progress */
if ((status & 0xffff) == NFIT_ARS_START_BUSY)
@@ -122,7 +122,7 @@ static int xlat_status(void *buf, unsign
/* Command failed */
if (status & 0xffff)
return -EIO;
- break;
+ return 0;
case ND_CMD_ARS_STATUS:
ars_status = buf;
/* Command failed */
@@ -154,7 +154,7 @@ static int xlat_status(void *buf, unsign
/* Unknown status */
if (status >> 16)
return -EIO;
- break;
+ return 0;
case ND_CMD_CLEAR_ERROR:
clear_err = buf;
if (status & 0xffff)
@@ -163,7 +163,7 @@ static int xlat_status(void *buf, unsign
return -EIO;
if (clear_err->length > clear_err->cleared)
return clear_err->cleared;
- break;
+ return 0;
default:
break;
}
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox