Linux 3.15.3
Greg KH
maintainerI'm announcing the release of the 3.15.3 kernel.
All users of the 3.15 kernel series must upgrade.
The updated 3.15.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.15.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/vm/hwpoison.txt | 5 Makefile | 2 arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 2 arch/arm/kernel/stacktrace.c | 18 + arch/arm/mach-omap1/board-h2.c | 2 arch/arm/mach-omap1/board-h3.c | 2 arch/arm/mach-omap1/board-innovator.c | 2 arch/arm/mach-omap1/board-osk.c | 2 arch/arm/mach-omap2/gpmc-nand.c | 2 arch/arm/mm/hugetlbpage.c | 5 arch/arm/mm/proc-v7-3level.S | 18 + arch/arm64/include/asm/Kbuild | 1 arch/arm64/include/asm/dma-mapping.h | 2 arch/arm64/include/asm/pgtable.h | 2 arch/arm64/include/uapi/asm/posix_types.h | 10 arch/arm64/kernel/ptrace.c | 32 ++- arch/arm64/mm/hugetlbpage.c | 5 arch/ia64/hp/common/sba_iommu.c | 64 +++--- arch/ia64/mm/hugetlbpage.c | 5 arch/metag/mm/hugetlbpage.c | 5 arch/mips/mm/hugetlbpage.c | 5 arch/powerpc/mm/hugetlbpage.c | 10 arch/s390/include/asm/lowcore.h | 11 - arch/s390/kernel/time.c | 2 arch/s390/mm/hugetlbpage.c | 5 arch/sh/mm/hugetlbpage.c | 5 arch/sparc/mm/hugetlbpage.c | 5 arch/tile/mm/hugetlbpage.c | 5 arch/x86/Kconfig | 4 arch/x86/kernel/entry_32.S | 15 - arch/x86/mm/hugetlbpage.c | 10 arch/x86/syscalls/syscall_64.tbl | 6 drivers/acpi/acpica/utstring.c | 2 drivers/acpi/bus.c | 7 drivers/acpi/utils.c | 64 ++++-- drivers/base/power/opp.c | 4 drivers/block/virtio_blk.c | 9 drivers/block/zram/zram_drv.c | 4 drivers/bluetooth/hci_ldisc.c | 24 +- drivers/bluetooth/hci_uart.h | 1 drivers/char/applicom.c | 1 drivers/char/random.c | 17 - drivers/extcon/extcon-max14577.c | 9 drivers/extcon/extcon-max77693.c | 4 drivers/extcon/extcon-max8997.c | 2 drivers/firmware/efi/efi-pstore.c | 2 drivers/gpu/drm/radeon/radeon_pm.c | 3 drivers/gpu/drm/radeon/radeon_uvd.c | 3 drivers/hid/hid-core.c | 12 + drivers/infiniband/ulp/iser/iser_initiator.c | 34 --- drivers/infiniband/ulp/isert/ib_isert.c | 70 +++--- drivers/infiniband/ulp/isert/ib_isert.h | 2 drivers/media/pci/ivtv/ivtv-alsa-pcm.c | 6 drivers/media/pci/saa7134/saa7134-video.c | 9 drivers/media/platform/exynos4-is/fimc-is.c | 3 drivers/media/platform/exynos4-is/media-dev.c | 2 drivers/media/platform/exynos4-is/media-dev.h | 4 drivers/media/usb/stk1160/stk1160-core.c | 10 drivers/media/usb/stk1160/stk1160.h | 1 drivers/media/usb/uvc/uvc_video.c | 15 - drivers/pci/hotplug/acpiphp.h | 10 drivers/pci/hotplug/acpiphp_glue.c | 60 +++-- drivers/phy/phy-exynos-mipi-video.c | 2 drivers/regulator/s2mpa01.c | 15 - drivers/regulator/s2mps11.c | 15 - drivers/scsi/libiscsi.c | 18 - drivers/staging/imx-drm/imx-hdmi.c | 9 drivers/staging/media/bcm2048/radio-bcm2048.c | 2 drivers/staging/mt29f_spinand/mt29f_spinand.c | 1 drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 7 drivers/staging/tidspbridge/core/dsp-clock.c | 4 drivers/target/iscsi/iscsi_target.c | 17 + drivers/target/loopback/tcm_loop.c | 15 + drivers/target/target_core_sbc.c | 19 + drivers/target/target_core_spc.c | 9 drivers/target/target_core_transport.c | 29 ++ drivers/tty/serial/of_serial.c | 1 drivers/usb/dwc3/gadget.c | 4 drivers/usb/gadget/inode.c | 2 drivers/usb/host/pci-quirks.c | 19 + drivers/usb/misc/usbtest.c | 26 ++ drivers/usb/phy/phy-isp1301-omap.c | 2 drivers/usb/serial/bus.c | 14 + drivers/usb/serial/option.c | 11 - drivers/usb/serial/qcserial.c | 21 + drivers/usb/serial/sierra.c | 55 ++++- drivers/usb/serial/usb_wwan.c | 125 ++++++----- drivers/video/fbdev/matrox/matroxfb_base.h | 2 drivers/video/fbdev/offb.c | 11 - drivers/w1/w1.c | 2 drivers/w1/w1_int.c | 4 fs/aio.c | 6 fs/btrfs/backref.c | 37 ++- fs/btrfs/backref.h | 4 fs/btrfs/ctree.h | 8 fs/btrfs/disk-io.c | 5 fs/btrfs/extent-tree.c | 39 ++- fs/btrfs/extent_io.c | 5 fs/btrfs/file.c | 23 +- fs/btrfs/free-space-cache.c | 4 fs/btrfs/scrub.c | 5 fs/btrfs/send.c | 67 +++--- fs/btrfs/sysfs.c | 5 fs/btrfs/volumes.c | 44 +++- fs/cifs/smb2pdu.c | 7 fs/eventpoll.c | 4 fs/ext4/ext4.h | 3 fs/ext4/extents.c | 7 fs/ext4/inode.c | 6 fs/ext4/mballoc.c | 2 fs/ext4/page-io.c | 32 +-- fs/f2fs/data.c | 2 include/linux/acpi.h | 22 +- include/linux/hugetlb.h | 13 - include/linux/irqdesc.h | 4 include/linux/mempolicy.h | 6 include/linux/mmzone.h | 6 include/linux/page-flags.h | 12 + include/linux/pageblock-flags.h | 37 ++- include/linux/ptrace.h | 32 +++ include/net/bluetooth/mgmt.h | 3 include/scsi/scsi_cmnd.h | 17 + include/target/iscsi/iscsi_transport.h | 3 include/target/target_core_backend.h | 1 kernel/fork.c | 10 kernel/irq/manage.c | 4 kernel/irq/spurious.c | 106 +++++++++- kernel/kthread.c | 4 kernel/locking/rtmutex-debug.h | 5 kernel/locking/rtmutex.c | 243 +++++++++++++++++++---- kernel/locking/rtmutex.h | 5 kernel/printk/printk.c | 1 lib/idr.c | 8 lib/lz4/lz4_decompress.c | 4 mm/Kconfig | 3 mm/memcontrol.c | 3 mm/memory-failure.c | 73 +++++- mm/page-writeback.c | 11 - mm/page_alloc.c | 52 +++- mm/rmap.c | 8 mm/vmscan.c | 46 +++- net/bluetooth/6lowpan.c | 65 +++--- net/bluetooth/hci_event.c | 4 net/bluetooth/l2cap_sock.c | 5 net/bluetooth/mgmt.c | 25 ++ net/bluetooth/smp.c | 7 scripts/package/builddeb | 6 tools/vm/page-types.c | 35 +++ 148 files changed, 1637 insertions(+), 691 deletions(-)
Alan Stern (2):
USB: usbtest: add a timeout for scatter-gather tests
USB: EHCI: avoid BIOS handover on the HASEE E200
Aleksander Morgado (2):
usb: qcserial: add Netgear AirCard 341U
usb: qcserial: add additional Sierra Wireless QMI devices
Alex Deucher (1):
Revert "drm/radeon: use variable UVD clocks"
Alexey Khoroshilov (1):
w1: do not unlock unheld list_mutex in __w1_remove_master_device()
Andrzej Zaborowski (1):
efi-pstore: Fix an overflow on 32-bit builds
Andy Lutomirski (1):
x86_32, entry: Do syscall exit work on badsys (CVE-2014-4508)
Antoine Ténart (1):
phy: exynos-mipi-video: fix check on array index
Benjamin Herrenschmidt (1):
Revert "offb: Add palette hack for little endian"
Benjamin LaHaise (2):
aio: fix aio request leak when events are reaped by userspace
aio: fix kernel memory disclosure in io_getevents() introduced in v3.10
Bjørn Mork (1):
ACPI: add dynamic_debug support
Chander Kashyap (1):
PM / OPP: fix incorrect OPP count handling in of_init_opp_table
Chris Mason (1):
Btrfs: fix double free in find_lock_delalloc_range
Christian Borntraeger (1):
s390/lowcore: reserve 96 bytes for IRB in lowcore
Dan Carpenter (2):
Staging: rtl8188eu: overflow in update_sta_support_rate()
applicom: dereferencing NULL on error path
David Binderman (1):
ACPICA: utstring: Check array index bound before use.
Eric Sandeen (1):
btrfs: fix use of uninit "ret" in end_extent_writepage()
Ezequiel Garcia (1):
media: stk1160: Avoid stack-allocated buffer for control URBs
Fathi Boudra (1):
builddeb: use $OBJCOPY variable instead of objcopy
Felipe Balbi (2):
usb: dwc3: gadget: clear stall when disabling endpoint
bluetooth: hci_ldisc: fix deadlock condition
Filipe Manana (5):
Btrfs: fix leaf corruption caused by ENOSPC while hole punching
Btrfs: read inode size after acquiring the mutex when punching a hole
Btrfs: send, account for orphan directories when building path strings
Btrfs: send, don't error in the presence of subvols/snapshots
Btrfs: send, use the right limits for xattr names and values
Greg Kroah-Hartman (2):
lz4: fix another possible overrun
Linux 3.15.3
H. Peter Anvin (1):
x86-32, espfix: Remove filter for espfix32 due to race
Hans Verkuil (1):
media: saa7134: fix regression with tvtime
Huang Rui (1):
usb: usbtest: fix unlink write error with pattern 1
Hugh Dickins (1):
mm: fix sleeping function warning from __put_anon_vma
Jaegeuk Kim (1):
f2fs: submit bio at the reclaim path
Jan Kara (1):
ext4: fix zeroing of page during writeback
Jason Cooper (1):
ARM: mvebu: DT: fix OpenBlocks AX3-4 RAM size
Jeff Mahoney (1):
btrfs: allocate raid type kobjects dynamically
Jianguo Wu (1):
ARM: 8037/1: mm: support big-endian page tables
Johan Hedberg (5):
Bluetooth: Fix authentication check for FIPS security level
Bluetooth: Fix requiring SMP MITM for outgoing connections
Bluetooth: Fix missing check for FIPS security level
Bluetooth: Clearly distinguish mgmt LTK type from authenticated property
Bluetooth: Fix properly ignoring LTKs of unknown types
Johan Hovold (11):
USB: option: fix runtime PM handling
USB: usb_wwan: fix write and suspend race
USB: usb_wwan: fix urb leak at shutdown
USB: usb_wwan: fix potential NULL-deref at resume
USB: usb_wwan: fix potential blocked I/O after resume
USB: sierra: fix AA deadlock in open error path
USB: sierra: fix use after free at suspend/resume
USB: sierra: fix urb and memory leak in resume error path
USB: sierra: fix urb and memory leak on disconnect
USB: sierra: fix remote wakeup
USB: serial: fix potential runtime pm imbalance at device remove
Johannes Weiner (1):
mm: vmscan: clear kswapd's special reclaim powers before exiting
Josef Bacik (1):
Btrfs: don't check nodes for extent items
Jukka Rissanen (1):
Bluetooth: 6LoWPAN: Fix MAC address universal/local bit handling
Jukka Taimisto (1):
Bluetooth: Fix L2CAP deadlock
Kees Cook (1):
HID: core: fix validation of report id 0
Konstantin Khlebnikov (2):
tools/vm/page-types.c: catch sigbus if raced with truncate
epoll: fix use-after-free in eventpoll_release_file
Krzysztof Kozlowski (7):
extcon: max8997: Fix NULL pointer exception on missing pdata
extcon: max77693: Fix two NULL pointer exceptions on missing pdata
extcon: max14577: Fix probe failure on successful work queue
extcon: max14577: Properly handle regmap_irq_get_virq error
regulator: s2mpa01: Use correct register for buck1 ramp delay
regulator: s2mps11: Fix accidental enable of buck6 ramp delay
regulator: s2mpa01: Fix accidental enable of buck4 ramp delay
Lai Jiangshan (1):
idr: fix overflow bug during maximum ID calculation at maximum height
Liu Bo (4):
Btrfs: fix NULL pointer crash of deleting a seed device
Btrfs: mark mapping with error flag to report errors to userspace
Btrfs: use right type to get real comparison
Btrfs: fix scrub_print_warning to handle skinny metadata extents
Lv Zheng (1):
ACPI: Fix conflict between customized DSDT and DSDT local copy
Martin Schwidefsky (1):
s390/time: cast tv_nsec to u64 prior to shift in update_vsyscall
Matthew Dempsky (1):
ptrace: fix fork event messages across pid namespaces
Maurizio Lombardi (1):
ext4: fix wrong assert in ext4_mb_normalize_request()
Mel Gorman (2):
mm: vmscan: do not throttle based on pfmemalloc reserves if node has no ZONE_NORMAL
mm: page_alloc: use word-based accesses for get/set pageblock bitmaps
Miao Xie (1):
Btrfs: output warning instead of error when loading free space cache failed
Michal Hocko (1):
memcg: do not hang on OOM when killed by userspace OOM access to memory reserves
Mike Frysinger (1):
x86, x32: Use compat shims for io_{setup,submit}Mikulas Patocka (1):
matroxfb: perform a dummy read of M_STATUS
Ming Lei (1):
block: virtio_blk: don't hold spin lock during world switch
Namjae Jeon (2):
ext4: fix data integrity sync in ordered mode
ext4: fix ZERO_RANGE test failure in data journalling
Naoya Horiguchi (2):
hugetlb: restrict hugepage_migration_support() to x86_64 mm/memory-failure.c: support use of a dedicated thread to handle SIGBUS(BUS_MCEERR_AO)
Nicholas Bellinger (3):
target: Set CMD_T_ACTIVE bit for Task Management Requests
target: Use complete_all for se_cmd->t_transport_stop_comp
iscsi-target: Fix ABORT_TASK + connection reset iscsi_queue_req memory leak
Olivier Langlois (1):
media: uvcvideo: Fix clock param realtime setting
Pali Rohár (1):
media: radio-bcm2048: fix wrong overflow check
Paul Bolle (3):
staging: tidspbridge: check for CONFIG_SND_OMAP_SOC_MCBSP
usb: gadget: rename CONFIG_USB_GADGET_PXA25X
ARM: OMAP: replace checks for CONFIG_USB_GADGET_OMAP
Pavel Shilovsky (1):
CIFS: Fix memory leaks in SMB2_open
Pekon Gupta (1):
ARM: OMAP2+: gpmc: enable BCH_HW ecc-scheme for AM43xx platforms
Qu Wenruo (1):
btrfs: Add ctime/mtime update for btrfs device add/remove.
Rafael J. Wysocki (2):
ACPI / hotplug / PCI: Add hotplug contexts to PCI host bridges ACPI / ia64 / sba_iommu: Restore the working initialization ordering
Rickard Strandqvist (1):
fs: btrfs: volumes.c: Fix for possible null pointer dereference
Roland Dreier (1):
target: Report correct response length for some commands
Russell King (2):
imx-drm: fix hdmi hotplug detection initial state
ARM: stacktrace: avoid listing stacktrace functions in stacktrace
Sagi Grimberg (10):
Target/iser: Bail from accept_np if np_thread is trying to close Target/iser: Fix hangs in connection teardown
Target/iser: Improve cm events handling
Target/iser: Wait for proper cleanup before unloading Target/iser: Gracefully reject T10-PI enabled connect request if not supported Target/iser: Fix a wrong dereference in case discovery session is over iser Target/iscsi: Fix sendtargets response pdu for iser transport
scsi_cmnd: Introduce scsi_transfer_length helper
libiscsi, iser: Adjust data_length to include protection information TARGET/sbc,loopback: Adjust command data length in case pi exists on the wire
Stephen Boyd (1):
staging/mt29f_spinand: Terminate of match table
Stephen Chivers (1):
printk/of_serial: fix serial console cessation part way through boot.
Suravee Suthikulpanit (1):
arm64/dma: Removing ARCH_HAS_DMA_GET_REQUIRED_MASK macro
Sylwester Nawrocki (2):
media: exynos4-is: Free FIMC-IS CPU memory only when allocated
media: exynos4-is: Fix compilation for !CONFIG_COMMON_CLK
Takashi Iwai (1):
media: ivtv: Fix Oops when no firmware is loaded
Tetsuo Handa (1):
kthread: fix return value of kthread_create() upon SIGKILL.
Theodore Ts'o (1):
random: fix nasty entropy accounting bug
Thomas Gleixner (4):
rtmutex: Detect changes in the pi lock chain
rtmutex: Handle deadlock detection smarter
rtmutex: Plug slow unlock race
genirq: Sanitize spurious interrupt detection of threaded irqs
Tony Luck (2):
mm/memory-failure.c-failure: send right signal code to correct thread mm/memory-failure.c: don't let collect_procs() skip over processes for MF_ACTION_REQUIRED
Victor Kamensky (1):
arm64: ptrace: fix empty registers set in prstatus of aarch32 process core
Wang Shilong (2):
Btrfs: make sure there are not any read requests before stopping workers
Btrfs: set right total device count for seeding support
Weijie Yang (1):
zram: correct offset usage in zram_bio_discard
Will Deacon (3):
arm64: ptrace: change fs when passing kernel pointer to regset code
arm64: uid16: fix __kernel_old_{gid,uid}_t definitions
arm64: mm: remove broken &= operator from pmd_mknotpresent
xiao jin (2):
USB: usb_wwan: fix urb leak in write error path
USB: usb_wwan: fix race between write and resume
Greg KH
maintainerDocumentation/vm/hwpoison.txt +5 -0
@@ -84,6 +84,11 @@ PR_MCE_KILL PR_MCE_KILL_EARLY: Early kill PR_MCE_KILL_LATE: Late kill PR_MCE_KILL_DEFAULT: Use system global default + Note that if you want to have a dedicated thread which handles + the SIGBUS(BUS_MCEERR_AO) on behalf of the process, you should + call prctl(PR_MCE_KILL_EARLY) on the designated thread. Otherwise, + the SIGBUS is sent to the main thread. + PR_MCE_KILL_GET return current mode
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 15 -SUBLEVEL = 2 +SUBLEVEL = 3 EXTRAVERSION = NAME = Shuffling Zombie Juror
arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts +1 -1
@@ -25,7 +25,7 @@ memory { device_type = "memory"; - reg = <0 0x00000000 0 0xC0000000>; /* 3 GB */ + reg = <0 0x00000000 0 0x40000000>; /* 1 GB soldered on */ }; soc {
arch/arm/kernel/stacktrace.c +13 -5
@@ -83,13 +83,16 @@ static int save_trace(struct stackframe *frame, void *d)return trace->nr_entries >= trace->max_entries; } -void save_stack_trace_tsk (struct task_struct *tsk,struct stack_trace *trace) +/* This must be noinline to so that our skip calculation works correctly */ +static noinline void __save_stack_trace(struct task_struct *tsk, +struct stack_trace *trace,unsigned int nosched) {struct stack_trace_data data;struct stackframe frame; data.trace = trace; data.skip = trace->skip; + data.no_sched_functions = nosched;if (tsk != current) {#ifdef CONFIG_SMP
@@ -102,7 +105,6 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) trace->entries[trace->nr_entries++] =ULONG_MAX ;return ;#else - data.no_sched_functions =1 ; frame.fp =thread_saved_fp (tsk); frame.sp =thread_saved_sp (tsk); frame.lr =0 ;/* recovered from the stack */
@@ -111,11 +113,12 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) }else { registerunsigned long current_sp asm ("sp" ); - data.no_sched_functions =0 ; +/* We don't want this function nor the caller */ + data.skip +=2 ; frame.fp = (unsigned long )__builtin_frame_address (0 ); frame.sp = current_sp; frame.lr = (unsigned long )__builtin_return_address (0 ); - frame.pc = (unsigned long )save_stack_trace_tsk; + frame.pc = (unsigned long )__save_stack_trace; }walk_stackframe (&frame, save_trace, &data);
@@ -123,9 +126,14 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) trace->entries[trace->nr_entries++] = ULONG_MAX; } +void save_stack_trace_tsk (struct task_struct *tsk,struct stack_trace *trace) +{ +__save_stack_trace (tsk, trace,1 ); +} +void save_stack_trace (struct stack_trace *trace) { -save_stack_trace_tsk (current, trace); +__save_stack_trace (current, trace,0 ); }EXPORT_SYMBOL_GPL (save_stack_trace);#endif
arch/arm/mach-omap1/board-h2.c +1 -1
@@ -346,7 +346,7 @@ static struct omap_usb_config h2_usb_config __initdata = {/* usb1 has a Mini-AB port and external isp1301 transceiver */ .otg = 2, -#ifdef CONFIG_USB_GADGET_OMAP +#if IS_ENABLED (CONFIG_USB_OMAP ) .hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled *//* .hmc_mode = 21,*/ /* 0:host(off) 1:dev(loopback) 2:host(loopback) */ #elif defined(CONFIG_USB_OHCI_HCD ) || defined(CONFIG_USB_OHCI_HCD_MODULE )
arch/arm/mach-omap1/board-h3.c +1 -1
@@ -366,7 +366,7 @@ static struct omap_usb_config h3_usb_config __initdata = {/* usb1 has a Mini-AB port and external isp1301 transceiver */ .otg = 2, -#ifdef CONFIG_USB_GADGET_OMAP +#if IS_ENABLED (CONFIG_USB_OMAP ) .hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled */#elif defined(CONFIG_USB_OHCI_HCD ) || defined(CONFIG_USB_OHCI_HCD_MODULE )/* NONSTANDARD CABLE NEEDED (B-to-Mini-B) */
arch/arm/mach-omap1/board-innovator.c +1 -1
@@ -312,7 +312,7 @@ static struct omap_usb_config h2_usb_config __initdata = {/* usb1 has a Mini-AB port and external isp1301 transceiver */ .otg = 2, -#ifdef CONFIG_USB_GADGET_OMAP +#if IS_ENABLED (CONFIG_USB_OMAP ) .hmc_mode = 19, /* 0:host(off) 1:dev|otg 2:disabled *//* .hmc_mode = 21,*/ /* 0:host(off) 1:dev(loopback) 2:host(loopback) */ #elif defined(CONFIG_USB_OHCI_HCD ) || defined(CONFIG_USB_OHCI_HCD_MODULE )
arch/arm/mach-omap1/board-osk.c +1 -1
@@ -283,7 +283,7 @@ static struct omap_usb_config osk_usb_config __initdata = {* be used, with a NONSTANDARD gender-bending cable/dongle, as * a peripheral. */ -#ifdef CONFIG_USB_GADGET_OMAP +#if IS_ENABLED (CONFIG_USB_OMAP ) .register_dev = 1, .hmc_mode = 0,#else
arch/arm/mach-omap2/gpmc-nand.c +1 -1
@@ -46,7 +46,7 @@ static struct platform_device gpmc_nand_device = {static bool gpmc_hwecc_bch_capable (enum omap_ecc ecc_opt) {/* platforms which support all ECC schemes */ -if (soc_is_am33xx () ||cpu_is_omap44xx () || +if (soc_is_am33xx () ||soc_is_am43xx () ||cpu_is_omap44xx () ||soc_is_omap54xx () ||soc_is_dra7xx ())return 1 ;
arch/arm/mm/hugetlbpage.c +0 -5
@@ -56,8 +56,3 @@ int pmd_huge(pmd_t pmd) {return pmd_val (pmd) && !(pmd_val (pmd) &PMD_TABLE_BIT ); } - -int pmd_huge_support (void ) -{ -return 1 ; -}
arch/arm/mm/proc-v7-3level.S +13 -5
@@ -64,6 +64,14 @@ ENTRY(cpu_v7_switch_mm) mov pc, lr ENDPROC(cpu_v7_switch_mm) +#ifdef __ARMEB__ +#define rl r3 +#define rh r2 +#else +#define rl r2 +#define rh r3 +#endif + /* * cpu_v7_set_pte_ext(ptep, pte) *
@@ -73,13 +81,13 @@ ENDPROC(cpu_v7_switch_mm) */ ENTRY(cpu_v7_set_pte_ext) #ifdef CONFIG_MMU - tst r2, #L_PTE_VALID + tst rl, #L_PTE_VALID beq 1f - tst r3, #1 << (57 - 32) @ L_PTE_NONE - bicne r2, #L_PTE_VALID + tst rh, #1 << (57 - 32) @ L_PTE_NONE + bicne rl, #L_PTE_VALID bne 1f - tst r3, #1 << (55 - 32) @ L_PTE_DIRTY - orreq r2, #L_PTE_RDONLY + tst rh, #1 << (55 - 32) @ L_PTE_DIRTY + orreq rl, #L_PTE_RDONLY 1: strd r2, r3, [r0] ALT_SMP(W(nop)) ALT_UP (mcr p15, 0, r0, c7, c10, 1) @ flush_pte
arch/arm64/include/asm/Kbuild +0 -1
@@ -30,7 +30,6 @@ generic-y += msgbuf.h generic-y += mutex.h generic-y += pci.h generic-y += poll.h -generic-y += posix_types.h generic-y += preempt.h generic-y += resource.h generic-y += rwsem.h
arch/arm64/include/asm/dma-mapping.h +0 -2
@@ -26,8 +26,6 @@#include <xen/xen.h> #include <asm/xen/hypervisor.h> -#define ARCH_HAS_DMA_GET_REQUIRED_MASK -#define DMA_ERROR_CODE (~(dma_addr_t)0)extern struct dma_map_ops *dma_ops;extern struct dma_map_ops coherent_swiotlb_dma_ops;
arch/arm64/include/asm/pgtable.h +1 -1
@@ -253,7 +253,7 @@ static inline pmd_t pte_pmd(pte_t pte)#define pmd_mkwrite (pmd) pte_pmd(pte_mkwrite(pmd_pte(pmd)))#define pmd_mkdirty (pmd) pte_pmd(pte_mkdirty(pmd_pte(pmd)))#define pmd_mkyoung (pmd) pte_pmd(pte_mkyoung(pmd_pte(pmd))) -#define pmd_mknotpresent (pmd) (__pmd(pmd_val(pmd) &= ~PMD_TYPE_MASK)) +#define pmd_mknotpresent (pmd) (__pmd(pmd_val(pmd) & ~PMD_TYPE_MASK))#define __HAVE_ARCH_PMD_WRITE#define pmd_write (pmd) pte_write(pmd_pte(pmd))
arch/arm64/include/uapi/asm/posix_types.h new file +10 -0
@@ -0,0 +1,10 @@ +#ifndef __ASM_POSIX_TYPES_H +#define __ASM_POSIX_TYPES_H + +typedef unsigned short __kernel_old_uid_t ; +typedef unsigned short __kernel_old_gid_t ; +#define __kernel_old_uid_t __kernel_old_uid_t + +#include <asm-generic/posix_types.h> + +#endif /* __ASM_POSIX_TYPES_H */
arch/arm64/kernel/ptrace.c +23 -9
@@ -650,11 +650,16 @@ static int compat_gpr_get(struct task_struct *target, reg =task_pt_regs (target)->regs[idx]; } - ret =copy_to_user (ubuf, ®,sizeof (reg)); -if (ret) -break ; - - ubuf +=sizeof (reg); +if (kbuf) { +memcpy (kbuf, ®,sizeof (reg)); + kbuf +=sizeof (reg); + }else { + ret =copy_to_user (ubuf, ®,sizeof (reg)); +if (ret) +break ; + + ubuf +=sizeof (reg); + } }return ret;
@@ -684,11 +689,16 @@ static int compat_gpr_set(struct task_struct *target,unsigned int idx = start + i;compat_ulong_t reg; - ret =copy_from_user (®, ubuf,sizeof (reg)); -if (ret) -return ret; +if (kbuf) { +memcpy (®, kbuf,sizeof (reg)); + kbuf +=sizeof (reg); + }else { + ret =copy_from_user (®, ubuf,sizeof (reg)); +if (ret) +return ret; - ubuf +=sizeof (reg); + ubuf +=sizeof (reg); + }switch (idx) {case 15 :
@@ -821,6 +831,7 @@ static int compat_ptrace_write_user(struct task_struct *tsk, compat_ulong_t off, compat_ulong_t val) {int ret; +mm_segment_t old_fs =get_fs ();if (off &3 || off >=COMPAT_USER_SZ )return -EIO ;
@@ -828,10 +839,13 @@ static int compat_ptrace_write_user(struct task_struct *tsk, compat_ulong_t off,if (off >=sizeof (compat_elf_gregset_t))return 0 ; +set_fs (KERNEL_DS ); ret =copy_regset_from_user (tsk, &user_aarch32_view,REGSET_COMPAT_GPR , off,sizeof (compat_ulong_t), &val); +set_fs (old_fs); +return ret; }
arch/arm64/mm/hugetlbpage.c +0 -5
@@ -58,11 +58,6 @@ int pud_huge(pud_t pud)#endif } -int pmd_huge_support (void ) -{ -return 1 ; -} -static __init int setup_hugepagesz (char *opt) {unsigned long ps =memparse (opt, &opt);
arch/ia64/hp/common/sba_iommu.c +37 -27
125 lines not on this page · raw message
arch/ia64/mm/hugetlbpage.c +0 -5
@@ -114,11 +114,6 @@ int pud_huge(pud_t pud)return 0 ; } -int pmd_huge_support (void ) -{ -return 0 ; -} -struct page *follow_huge_pmd (struct mm_struct *mm,unsigned long address,pmd_t *pmd,int write) {
arch/metag/mm/hugetlbpage.c +0 -5
@@ -110,11 +110,6 @@ int pud_huge(pud_t pud)return 0 ; } -int pmd_huge_support (void ) -{ -return 1 ; -} -struct page *follow_huge_pmd (struct mm_struct *mm,unsigned long address,pmd_t *pmd,int write) {
arch/mips/mm/hugetlbpage.c +0 -5
@@ -84,11 +84,6 @@ int pud_huge(pud_t pud)return (pud_val (pud) & _PAGE_HUGE) !=0 ; } -int pmd_huge_support (void ) -{ -return 1 ; -} -struct page *follow_huge_pmd (struct mm_struct *mm,unsigned long address,pmd_t *pmd,int write)
arch/powerpc/mm/hugetlbpage.c +0 -10
@@ -86,11 +86,6 @@ int pgd_huge(pgd_t pgd)*/ return ((pgd_val(pgd) & 0x3) != 0x0); } - -int pmd_huge_support (void ) -{ -return 1 ; -}#else int pmd_huge (pmd_t pmd) {
@@ -106,11 +101,6 @@ int pgd_huge(pgd_t pgd) {return 0 ; } - -int pmd_huge_support (void ) -{ -return 0 ; -}#endif pte_t *huge_pte_offset (struct mm_struct *mm,unsigned long addr)
arch/s390/include/asm/lowcore.h +6 -5
@@ -142,9 +142,9 @@ struct _lowcore {__u8 pad_0x02fc[0x0300 -0x02fc ];/* 0x02fc */ /* Interrupt response block */ -__u8 irb[64 ];/* 0x0300 */ +__u8 irb[96 ];/* 0x0300 */ -__u8 pad_0x0340[0x0e00 -0x0340 ];/* 0x0340 */ +__u8 pad_0x0360[0x0e00 -0x0360 ];/* 0x0360 */ /* * 0xe00 contains the address of the IPL Parameter Information
@@ -288,12 +288,13 @@ struct _lowcore {__u8 pad_0x03a0[0x0400 -0x03a0 ];/* 0x03a0 */ /* Interrupt response block. */ -__u8 irb[64 ];/* 0x0400 */ +__u8 irb[96 ];/* 0x0400 */ +__u8 pad_0x0460[0x0480 -0x0460 ];/* 0x0460 */ /* Per cpu primary space access list */ -__u32 paste[16 ];/* 0x0440 */ +__u32 paste[16 ];/* 0x0480 */ -__u8 pad_0x0480[0x0e00 -0x0480 ];/* 0x0480 */ +__u8 pad_0x04c0[0x0e00 -0x04c0 ];/* 0x04c0 */ /* * 0xe00 contains the address of the IPL Parameter Information
arch/s390/kernel/time.c +1 -1
@@ -226,7 +226,7 @@ void update_vsyscall(struct timekeeper *tk) vdso_data->wtom_clock_sec = tk->xtime_sec + tk->wall_to_monotonic.tv_sec; vdso_data->wtom_clock_nsec = tk->xtime_nsec + - + (tk->wall_to_monotonic.tv_nsec << tk->shift); + + ((u64 ) tk->wall_to_monotonic.tv_nsec << tk->shift); nsecps = (u64 )NSEC_PER_SEC << tk->shift;while (vdso_data->wtom_clock_nsec >= nsecps) { vdso_data->wtom_clock_nsec -= nsecps;
arch/s390/mm/hugetlbpage.c +0 -5
@@ -220,11 +220,6 @@ int pud_huge(pud_t pud)return 0 ; } -int pmd_huge_support (void ) -{ -return 1 ; -} -struct page *follow_huge_pmd (struct mm_struct *mm,unsigned long address,pmd_t *pmdp,int write) {
arch/sh/mm/hugetlbpage.c +0 -5
@@ -83,11 +83,6 @@ int pud_huge(pud_t pud)return 0 ; } -int pmd_huge_support (void ) -{ -return 0 ; -} -struct page *follow_huge_pmd (struct mm_struct *mm,unsigned long address,pmd_t *pmd,int write) {
arch/sparc/mm/hugetlbpage.c +0 -5
@@ -231,11 +231,6 @@ int pud_huge(pud_t pud)return 0 ; } -int pmd_huge_support (void ) -{ -return 0 ; -} -struct page *follow_huge_pmd (struct mm_struct *mm,unsigned long address,pmd_t *pmd,int write) {
arch/tile/mm/hugetlbpage.c +0 -5
@@ -166,11 +166,6 @@ int pud_huge(pud_t pud)return !!(pud_val (pud) & _PAGE_HUGE_PAGE); } -int pmd_huge_support (void ) -{ -return 1 ; -} -struct page *follow_huge_pmd (struct mm_struct *mm,unsigned long address,pmd_t *pmd,int write) {
arch/x86/Kconfig +4 -0
@@ -1871,6 +1871,10 @@ config ARCH_ENABLE_SPLIT_PMD_PTLOCK def_bool y depends on X86_64 || X86_PAE +config ARCH_ENABLE_HUGEPAGE_MIGRATION + def_bool y + depends on X86_64 && HUGETLB_PAGE && MIGRATION + menu "Power management and ACPI options" config ARCH_HIBERNATION_HEADER
arch/x86/kernel/entry_32.S +8 -7
@@ -431,9 +431,10 @@ sysenter_past_esp: jnz sysenter_audit sysenter_do_call: cmpl $(NR_syscalls), %eax - jae syscall_badsys + jae sysenter_badsys call *sys_call_table(,%eax,4) movl %eax,PT_EAX(%esp) +sysenter_after_call: LOCKDEP_SYS_EXIT DISABLE_INTERRUPTS(CLBR_ANY) TRACE_IRQS_OFF
@@ -551,11 +552,6 @@ ENTRY(iret_exc) CFI_RESTORE_STATE ldt_ss: - larl PT_OLDSS(%esp), %eax - jnz restore_nocheck - testl $0x00400000, %eax # returning to 32bit stack? - jnz restore_nocheck # allright, normal return - #ifdef CONFIG_PARAVIRT /* * The kernel can't run on a non-flat stack if paravirt mode
@@ -688,7 +684,12 @@ END(syscall_fault) syscall_badsys: movl $-ENOSYS,PT_EAX(%esp) - jmp resume_userspace + jmp syscall_exit +END(syscall_badsys) + +sysenter_badsys: + movl $-ENOSYS,PT_EAX(%esp) + jmp sysenter_after_call END(syscall_badsys) CFI_ENDPROC /*
arch/x86/mm/hugetlbpage.c +0 -10
@@ -58,11 +58,6 @@ follow_huge_pmd(struct mm_struct *mm, unsigned long address, {return NULL ; } - -int pmd_huge_support (void ) -{ -return 0 ; -}#else struct page *
@@ -80,11 +75,6 @@ int pud_huge(pud_t pud) {return !!(pud_val (pud) & _PAGE_PSE); } - -int pmd_huge_support (void ) -{ -return 1 ; -}#endif #ifdef CONFIG_HUGETLB_PAGE
arch/x86/syscalls/syscall_64.tbl +4 -2
@@ -212,10 +212,10 @@ 203 common sched_setaffinity sys_sched_setaffinity 204 common sched_getaffinity sys_sched_getaffinity 205 64 set_thread_area -206 common io_setup sys_io_setup +206 64 io_setup sys_io_setup 207 common io_destroy sys_io_destroy 208 common io_getevents sys_io_getevents -209 common io_submit sys_io_submit +209 64 io_submit sys_io_submit 210 common io_cancel sys_io_cancel 211 64 get_thread_area 212 common lookup_dcookie sys_lookup_dcookie
@@ -359,3 +359,5 @@ 540 x32 process_vm_writev compat_sys_process_vm_writev 541 x32 setsockopt compat_sys_setsockopt 542 x32 getsockopt compat_sys_getsockopt +543 x32 io_setup compat_sys_io_setup +544 x32 io_submit compat_sys_io_submit
drivers/acpi/acpica/utstring.c +1 -1
@@ -353,7 +353,7 @@ void acpi_ut_print_string(char *string, u16 max_length) }acpi_os_printf ("\"" ); -for (i =0 ; string[i] && (i < max_length); i++) { +for (i =0 ; (i < max_length) && string[i]; i++) {/* Escape sequences */
drivers/acpi/bus.c +7 -0
@@ -52,6 +52,12 @@ struct proc_dir_entry *acpi_root_dir;EXPORT_SYMBOL (acpi_root_dir); #ifdef CONFIG_X86 +#ifdef CONFIG_ACPI_CUSTOM_DSDT +static inline int set_copy_dsdt(const struct dmi_system_id *id) +{ + return 0; +} +#else static int set_copy_dsdt(const struct dmi_system_id *id) { printk(KERN_NOTICE "%s detected - "
@@ -59,6 +65,7 @@ static int set_copy_dsdt(const struct dmi_system_id *id) acpi_gbl_copy_dsdt_locally =1 ;return 0 ; } +#endif static struct dmi_system_id dsdt_dmi_table[]__initdata = {/*
drivers/acpi/utils.c +52 -12
93 lines not on this page · raw message
drivers/base/power/opp.c +1 -3
@@ -734,11 +734,9 @@ int of_init_opp_table(struct device *dev)unsigned long freq =be32_to_cpup (val++) *1000 ;unsigned long volt =be32_to_cpup (val++); -if (dev_pm_opp_add (dev, freq, volt)) { +if (dev_pm_opp_add (dev, freq, volt))dev_warn (dev,"%s: Failed to add OPP %ld\n" , __func__, freq); -continue ; - } nr -=2 ; }
drivers/block/virtio_blk.c +6 -3
@@ -159,6 +159,7 @@ static int virtio_queue_rq(struct blk_mq_hw_ctx *hctx, struct request *req)unsigned int num;const bool last = (req->cmd_flags &REQ_END ) !=0 ;int err; +bool notify = false;BUG_ON (req->nr_phys_segments +2 > vblk->sg_elems);
@@ -211,10 +212,12 @@ static int virtio_queue_rq(struct blk_mq_hw_ctx *hctx, struct request *req)return BLK_MQ_RQ_QUEUE_ERROR ; } -if (last) -virtqueue_kick (vblk->vq); - +if (last &&virtqueue_kick_prepare (vblk->vq)) + notify = true;spin_unlock_irqrestore (&vblk->vq_lock, flags); + +if (notify) +virtqueue_notify (vblk->vq);return BLK_MQ_RQ_QUEUE_OK ; }
drivers/block/zram/zram_drv.c +2 -2
@@ -572,10 +572,10 @@ static void zram_bio_discard(struct zram *zram, u32 index,* skipping this logical block is appropriate here. */ if (offset) { -if (n < offset) +if (n <= (PAGE_SIZE - offset))return ; - n -= offset; + n -= (PAGE_SIZE - offset); index++; }
drivers/bluetooth/hci_ldisc.c +19 -5
@@ -118,10 +118,6 @@ static inline struct sk_buff *hci_uart_dequeue(struct hci_uart *hu)int hci_uart_tx_wakeup (struct hci_uart *hu) { -struct tty_struct *tty = hu->tty; -struct hci_dev *hdev = hu->hdev; -struct sk_buff *skb; -if (test_and_set_bit (HCI_UART_SENDING , &hu->tx_state)) {set_bit (HCI_UART_TX_WAKEUP , &hu->tx_state);return 0 ;
@@ -129,6 +125,22 @@ int hci_uart_tx_wakeup(struct hci_uart *hu)BT_DBG ("" ); +schedule_work (&hu->write_work); + +return 0 ; +} + +static void hci_uart_write_work (struct work_struct *work) +{ + struct hci_uart *hu = container_of(work, struct hci_uart, write_work); +struct tty_struct *tty = hu->tty; +struct hci_dev *hdev = hu->hdev; +struct sk_buff *skb; + +/* REVISIT: should we cope with bad skbs or ->write() returning +* and error value ? +*/ + restart:clear_bit (HCI_UART_TX_WAKEUP , &hu->tx_state);
@@ -153,7 +165,6 @@ restart: goto restart;clear_bit (HCI_UART_SENDING , &hu->tx_state); -return 0 ; }static void hci_uart_init_work (struct work_struct *work)
@@ -282,6 +293,7 @@ static int hci_uart_tty_open(struct tty_struct *tty) tty->receive_room =65536 ;INIT_WORK (&hu->init_ready, hci_uart_init_work); +INIT_WORK (&hu->write_work, hci_uart_write_work);spin_lock_init (&hu->rx_lock);
@@ -319,6 +331,8 @@ static void hci_uart_tty_close(struct tty_struct *tty)if (hdev)hci_uart_close (hdev); +cancel_work_sync (&hu->write_work); +if (test_and_clear_bit (HCI_UART_PROTO_SET , &hu->flags)) {if (hdev) {if (test_bit (HCI_UART_REGISTERED , &hu->flags))
drivers/bluetooth/hci_uart.h +1 -0
@@ -68,6 +68,7 @@ struct hci_uart {unsigned long hdev_flags;struct work_struct init_ready; +struct work_struct write_work;struct hci_uart_proto *proto;void *priv;
drivers/char/applicom.c +0 -1
@@ -345,7 +345,6 @@ out:free_irq (apbs[i].irq, &dummy);iounmap (apbs[i].RamIO); } -pci_disable_device (dev);return ret; }
drivers/char/random.c +9 -8
@@ -979,7 +979,6 @@ static void push_to_pool(struct work_struct *work)static size_t account (struct entropy_store *r,size_t nbytes,int min,int reserved) { -int have_bytes;int entropy_count, orig;size_t ibytes;
@@ -988,17 +987,19 @@ static size_t account(struct entropy_store *r, size_t nbytes, int min,/* Can we pull enough? */ retry: entropy_count = orig =ACCESS_ONCE (r->entropy_count); - have_bytes = entropy_count >> (ENTROPY_SHIFT +3 ); ibytes = nbytes;/* If limited, never pull more than available */ -if (r->limit) - ibytes =min_t (size_t, ibytes, have_bytes - reserved); +if (r->limit) { +int have_bytes = entropy_count >> (ENTROPY_SHIFT +3 ); + +if ((have_bytes -= reserved) <0 ) + have_bytes =0 ; + ibytes =min_t (size_t, ibytes, have_bytes); + }if (ibytes < min) ibytes =0 ; -if (have_bytes >= ibytes + reserved) - entropy_count -= ibytes << (ENTROPY_SHIFT +3 ); -else - entropy_count = reserved << (ENTROPY_SHIFT +3 ); +if ((entropy_count -= ibytes << (ENTROPY_SHIFT +3 )) <0 ) + entropy_count =0 ;if (cmpxchg (&r->entropy_count, orig, entropy_count) != orig) goto retry;
drivers/extcon/extcon-max14577.c +2 -7
@@ -650,7 +650,7 @@ static int max14577_muic_probe(struct platform_device *pdev)unsigned int virq =0 ; virq =regmap_irq_get_virq (max14577->irq_data, muic_irq->irq); -if (!virq) +if (virq <=0 )return -EINVAL ; muic_irq->virq = virq;
@@ -710,13 +710,8 @@ static int max14577_muic_probe(struct platform_device *pdev)* driver should notify cable state to upper layer. */ INIT_DELAYED_WORK (&info->wq_detcable, max14577_muic_detect_cable_wq); - ret =queue_delayed_work (system_power_efficient_wq, &info->wq_detcable, +queue_delayed_work (system_power_efficient_wq, &info->wq_detcable, delay_jiffies); -if (ret <0 ) { -dev_err (&pdev->dev, -"failed to schedule delayed work for cable detect\n" ); - goto err_extcon; - }return ret;
drivers/extcon/extcon-max77693.c +2 -2
@@ -1193,7 +1193,7 @@ static int max77693_muic_probe(struct platform_device *pdev)/* Initialize MUIC register by using platform data or default data */ -if (pdata->muic_data) { +if (pdata && pdata->muic_data) { init_data = pdata->muic_data->init_data; num_init_data = pdata->muic_data->num_init_data; }else {
@@ -1226,7 +1226,7 @@ static int max77693_muic_probe(struct platform_device *pdev) = init_data[i].data; } -if (pdata->muic_data) { +if (pdata && pdata->muic_data) {struct max77693_muic_platform_data *muic_pdata = pdata->muic_data;
drivers/extcon/extcon-max8997.c +1 -1
@@ -715,7 +715,7 @@ static int max8997_muic_probe(struct platform_device *pdev) goto err_irq; } -if (pdata->muic_pdata) { +if (pdata && pdata->muic_pdata) {struct max8997_muic_platform_data *muic_pdata = pdata->muic_pdata;
drivers/firmware/efi/efi-pstore.c +1 -1
@@ -40,7 +40,7 @@ struct pstore_read_data {static inline u64 generic_id (unsigned long timestamp,unsigned int part,int count) { -return (timestamp *100 + part) *1000 + count; +return ((u64 ) timestamp *100 + part) *1000 + count; }static int efi_pstore_read_func (struct efivar_entry *entry,void *data)
drivers/gpu/drm/radeon/radeon_pm.c +3 -0
@@ -984,6 +984,8 @@ void radeon_dpm_enable_uvd(struct radeon_device *rdev, bool enable)if (enable) {mutex_lock (&rdev->pm.mutex); rdev->pm.dpm.uvd_active = true; +/* disable this for now */ +#if 0 if ((rdev->pm.dpm.sd ==1 ) && (rdev->pm.dpm.hd ==0 )) dpm_state =POWER_STATE_TYPE_INTERNAL_UVD_SD ;else if ((rdev->pm.dpm.sd ==2 ) && (rdev->pm.dpm.hd ==0 ))
@@ -993,6 +995,7 @@ void radeon_dpm_enable_uvd(struct radeon_device *rdev, bool enable) else if ((rdev->pm.dpm.sd == 0) && (rdev->pm.dpm.hd == 2)) dpm_state = POWER_STATE_TYPE_INTERNAL_UVD_HD2; else +#endif dpm_state =POWER_STATE_TYPE_INTERNAL_UVD ; rdev->pm.dpm.state = dpm_state;mutex_unlock (&rdev->pm.mutex);
drivers/gpu/drm/radeon/radeon_uvd.c +2 -1
@@ -812,7 +812,8 @@ void radeon_uvd_note_usage(struct radeon_device *rdev) (rdev->pm.dpm.hd != hd)) { rdev->pm.dpm.sd = sd; rdev->pm.dpm.hd = hd; - streams_changed = true; +/* disable this for now */ +/*streams_changed = true;*/ } }
drivers/hid/hid-core.c +11 -1
@@ -842,7 +842,17 @@ struct hid_report *hid_validate_values(struct hid_device *hid,* ->numbered being checked, which may not always be the case when * drivers go to access report values. */ - report = hid->report_enum[type].report_id_hash[id]; +if (id ==0 ) { +/* +* Validating on id 0 means we should examine the first +* report in the list. +*/ + report =list_entry ( + hid->report_enum[type].report_list.next, + struct hid_report, list); + }else { + report = hid->report_enum[type].report_id_hash[id]; + }if (!report) {hid_err (hid,"missing %s %u\n" , hid_report_names[type], id);return NULL ;
drivers/infiniband/ulp/iser/iser_initiator.c +10 -24
@@ -41,11 +41,11 @@#include "iscsi_iser.h" /* Register user buffer memory and initialize passive rdma -* dto descriptor. Total data size is stored in -* iser_task->data[ISER_DIR_IN].data_len +* dto descriptor. Data size is stored in +* task->data[ISER_DIR_IN].data_len, Protection size +* os stored in task->prot[ISER_DIR_IN].data_len */ -static int iser_prepare_read_cmd (struct iscsi_task *task, -unsigned int edtl) +static int iser_prepare_read_cmd (struct iscsi_task *task) {struct iscsi_iser_task *iser_task = task->dd_data;
@@ -73,14 +73,6 @@ static int iser_prepare_read_cmd(struct iscsi_task *task,return err; } -if (edtl > iser_task->data[ISER_DIR_IN ].data_len) { -iser_err ("Total data length: %ld, less than EDTL: " -"%d, in READ cmd BHS itt: %d, conn: 0x%p\n" , - iser_task->data[ISER_DIR_IN ].data_len, edtl, - task->itt, iser_task->ib_conn); -return -EINVAL ; - } - err = device->iser_reg_rdma_mem (iser_task,ISER_DIR_IN );if (err) {iser_err ("Failed to set up Data-IN RDMA\n" );
@@ -100,8 +92,9 @@ static int iser_prepare_read_cmd(struct iscsi_task *task, }/* Register user buffer memory and initialize passive rdma -* dto descriptor. Total data size is stored in -* task->data[ISER_DIR_OUT].data_len +* dto descriptor. Data size is stored in +* task->data[ISER_DIR_OUT].data_len, Protection size +* is stored at task->prot[ISER_DIR_OUT].data_len */ static int iser_prepare_write_cmd(struct iscsi_task *task,
@@ -135,14 +128,6 @@ iser_prepare_write_cmd(struct iscsi_task *task,return err; } -if (edtl > iser_task->data[ISER_DIR_OUT ].data_len) { -iser_err ("Total data length: %ld, less than EDTL: %d, " -"in WRITE cmd BHS itt: %d, conn: 0x%p\n" , - iser_task->data[ISER_DIR_OUT ].data_len, - edtl, task->itt, task->conn); -return -EINVAL ; - } - err = device->iser_reg_rdma_mem (iser_task,ISER_DIR_OUT );if (err !=0 ) {iser_err ("Failed to register write cmd RDMA mem\n" );
@@ -417,11 +402,12 @@ int iser_send_command(struct iscsi_conn *conn,if (scsi_prot_sg_count (sc)) { prot_buf->buf =scsi_prot_sglist (sc); prot_buf->size =scsi_prot_sg_count (sc); - prot_buf->data_len = sc->prot_sdb->length; + prot_buf->data_len = data_buf->data_len >> +ilog2 (sc->device->sector_size) *8 ; }if (hdr->flags &ISCSI_FLAG_CMD_READ ) { - err =iser_prepare_read_cmd (task, edtl); + err =iser_prepare_read_cmd (task);if (err) goto send_command_error; }
drivers/infiniband/ulp/isert/ib_isert.c +35 -35
157 lines not on this page · raw message
drivers/infiniband/ulp/isert/ib_isert.h +1 -1
@@ -116,7 +116,6 @@ struct isert_device;struct isert_conn {enum iser_conn_state state; -bool logout_posted;int post_recv_buf_count;atomic_t post_send_buf_count;u32 responder_resources;
@@ -151,6 +150,7 @@ struct isert_conn {#define ISERT_COMP_BATCH_COUNT 8int conn_comp_batch;struct llist_head conn_comp_llist; +bool disconnect; };#define ISERT_MAX_CQ 64
drivers/media/pci/ivtv/ivtv-alsa-pcm.c +6 -0
@@ -159,6 +159,12 @@ static int snd_ivtv_pcm_capture_open(struct snd_pcm_substream *substream)/* Instruct the CX2341[56] to start sending packets */ snd_ivtv_lock (itvsc); + +if (ivtv_init_on_first_open (itv)) { +snd_ivtv_unlock (itvsc); +return -ENXIO ; + } + s = &itv->streams[IVTV_ENC_STREAM_TYPE_PCM ];v4l2_fh_init (&item.fh, s->vdev);
drivers/media/pci/saa7134/saa7134-video.c +3 -6
@@ -1243,6 +1243,7 @@ static int video_release(struct file *file)videobuf_streamoff (&dev->cap);res_free (dev, fh,RESOURCE_VIDEO );videobuf_mmap_free (&dev->cap); +INIT_LIST_HEAD (&dev->cap.stream); }if (dev->cap.read_buf) {buffer_release (&dev->cap, dev->cap.read_buf);
@@ -1254,6 +1255,7 @@ static int video_release(struct file *file)videobuf_stop (&dev->vbi);res_free (dev, fh,RESOURCE_VBI );videobuf_mmap_free (&dev->vbi); +INIT_LIST_HEAD (&dev->vbi.stream); }/* ts-capture will not work in planar mode, so turn it off Hac: 04.05*/
@@ -1987,17 +1989,12 @@ int saa7134_streamoff(struct file *file, void *priv, enum v4l2_buf_type type) {struct saa7134_dev *dev =video_drvdata (file); -int err;int res =saa7134_resource (file);if (res !=RESOURCE_EMPRESS )pm_qos_remove_request (&dev->qos_request); - err =videobuf_streamoff (saa7134_queue (file)); -if (err <0 ) -return err; -res_free (dev, priv, res); -return 0 ; +return videobuf_streamoff (saa7134_queue (file)); }EXPORT_SYMBOL_GPL (saa7134_streamoff);
drivers/media/platform/exynos4-is/fimc-is.c +3 -0
@@ -367,6 +367,9 @@ static void fimc_is_free_cpu_memory(struct fimc_is *is) {struct device *dev = &is->pdev->dev; +if (is->memory.vaddr ==NULL ) +return ; +dma_free_coherent (dev, is->memory.size, is->memory.vaddr, is->memory.paddr); }
drivers/media/platform/exynos4-is/media-dev.c +1 -1
@@ -1520,7 +1520,7 @@ err: }#else #define fimc_md_register_clk_provider (fmd) (0) -#define fimc_md_unregister_clk_provider (fmd) (0) +#define fimc_md_unregister_clk_provider (fmd)#endif static int subdev_notifier_bound(struct v4l2_async_notifier *notifier,
drivers/media/platform/exynos4-is/media-dev.h +4 -0
@@ -94,7 +94,9 @@ struct fimc_sensor_info { };struct cam_clk { +#ifdef CONFIG_COMMON_CLK struct clk_hw hw; +#endif struct fimc_md *fmd; };#define to_cam_clk (_hw) container_of(_hw, struct cam_clk, hw)
@@ -142,7 +144,9 @@ struct fimc_md {struct cam_clk_provider {struct clk *clks[FIMC_MAX_CAMCLKS ]; +#ifdef CONFIG_COMMON_CLK struct clk_onecell_data clk_data; +#endif struct device_node *of_node;struct cam_clk camclk[FIMC_MAX_CAMCLKS ];int num_clocks;
drivers/media/usb/stk1160/stk1160-core.c +9 -1
@@ -67,17 +67,25 @@ int stk1160_read_reg(struct stk1160 *dev, u16 reg, u8 *value) {int ret;int pipe =usb_rcvctrlpipe (dev->udev,0 ); +u8 *buf; *value =0 ; + + buf =kmalloc (sizeof (u8),GFP_KERNEL ); +if (!buf) +return -ENOMEM ; ret =usb_control_msg (dev->udev, pipe,0x00 ,USB_DIR_IN |USB_TYPE_VENDOR |USB_RECIP_DEVICE , -0x00 , reg, value,sizeof (u8),HZ ); +0x00 , reg, buf,sizeof (u8),HZ );if (ret <0 ) {stk1160_err ("read failed on reg 0x%x (%d)\n" , reg, ret); +kfree (buf);return ret; } + *value = *buf; +kfree (buf);return 0 ; }
drivers/media/usb/stk1160/stk1160.h +0 -1
@@ -143,7 +143,6 @@ struct stk1160 {int num_alt;struct stk1160_isoc_ctl isoc_ctl; -char urb_buf[255 ];/* urb control msg buffer */ /* frame properties */ int width;/* current frame width */
drivers/media/usb/uvc/uvc_video.c +10 -5
@@ -361,6 +361,14 @@ static int uvc_commit_video(struct uvc_streaming *stream,* Clocks and timestamps */ +static inline void uvc_video_get_ts (struct timespec *ts) +{ +if (uvc_clock_param ==CLOCK_MONOTONIC ) +ktime_get_ts (ts); +else +ktime_get_real_ts (ts); +} +static void uvc_video_clock_decode (struct uvc_streaming *stream,struct uvc_buffer *buf,const __u8 *data,int len)
@@ -420,7 +428,7 @@ uvc_video_clock_decode(struct uvc_streaming *stream, struct uvc_buffer *buf, stream->clock.last_sof = dev_sof; host_sof =usb_get_current_frame_number (stream->dev->udev); -ktime_get_ts (&ts); +uvc_video_get_ts (&ts);/* The UVC specification allows device implementations that can't obtain * the USB frame number to keep their own frame counters as long as they
@@ -1011,10 +1019,7 @@ static int uvc_video_decode_start(struct uvc_streaming *stream,return -ENODATA ; } -if (uvc_clock_param ==CLOCK_MONOTONIC ) -ktime_get_ts (&ts); -else -ktime_get_real_ts (&ts); +uvc_video_get_ts (&ts); buf->buf.v4l2_buf.sequence = stream->sequence; buf->buf.v4l2_buf.timestamp.tv_sec = ts.tv_sec;
drivers/pci/hotplug/acpiphp.h +10 -0
@@ -142,6 +142,16 @@ static inline acpi_handle func_to_handle(struct acpiphp_func *func)return func_to_acpi_device (func)->handle; } +struct acpiphp_root_context { +struct acpi_hotplug_context hp; +struct acpiphp_bridge *root_bridge; +}; + +static inline struct acpiphp_root_context *to_acpiphp_root_context (struct acpi_hotplug_context *hp) +{ + return container_of(hp, struct acpiphp_root_context, hp); +} +/* * struct acpiphp_attention_info - device specific attention registration *
drivers/pci/hotplug/acpiphp_glue.c +42 -18
101 lines not on this page · raw message
drivers/phy/phy-exynos-mipi-video.c +1 -1
@@ -101,7 +101,7 @@ static struct phy *exynos_mipi_video_phy_xlate(struct device *dev, {struct exynos_mipi_video_phy *state =dev_get_drvdata (dev); -if (WARN_ON (args->args[0 ] >EXYNOS_MIPI_PHYS_NUM )) +if (WARN_ON (args->args[0 ] >=EXYNOS_MIPI_PHYS_NUM ))return ERR_PTR (-ENODEV );return state->phys[args->args[0 ]].phy;
drivers/regulator/s2mpa01.c +9 -6
@@ -116,7 +116,6 @@ static int s2mpa01_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay) ramp_delay = s2mpa01->ramp_delay16; ramp_shift =S2MPA01_BUCK16_RAMP_SHIFT ; - ramp_reg =S2MPA01_REG_RAMP1 ;break ;case S2MPA01_BUCK2 : enable_shift =S2MPA01_BUCK2_RAMP_EN_SHIFT ;
@@ -192,11 +191,15 @@ static int s2mpa01_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)if (!ramp_enable) goto ramp_disable; - ret =regmap_update_bits (rdev->regmap,S2MPA01_REG_RAMP1 , -1 << enable_shift,1 << enable_shift); -if (ret) { -dev_err (&rdev->dev,"failed to enable ramp rate\n" ); -return ret; +/* Ramp delay can be enabled/disabled only for buck[1234] */ +if (rdev_get_id (rdev) >=S2MPA01_BUCK1 && +rdev_get_id (rdev) <=S2MPA01_BUCK4 ) { + ret =regmap_update_bits (rdev->regmap,S2MPA01_REG_RAMP1 , +1 << enable_shift,1 << enable_shift); +if (ret) { +dev_err (&rdev->dev,"failed to enable ramp rate\n" ); +return ret; + } } ramp_val =get_ramp_delay (ramp_delay);
drivers/regulator/s2mps11.c +10 -5
@@ -202,11 +202,16 @@ static int s2mps11_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)if (!ramp_enable) goto ramp_disable; - ret =regmap_update_bits (rdev->regmap,S2MPS11_REG_RAMP , -1 << enable_shift,1 << enable_shift); -if (ret) { -dev_err (&rdev->dev,"failed to enable ramp rate\n" ); -return ret; +/* Ramp delay can be enabled/disabled only for buck[2346] */ +if ((rdev_get_id (rdev) >=S2MPS11_BUCK2 && +rdev_get_id (rdev) <=S2MPS11_BUCK4 ) || +rdev_get_id (rdev) ==S2MPS11_BUCK6 ) { + ret =regmap_update_bits (rdev->regmap,S2MPS11_REG_RAMP , +1 << enable_shift,1 << enable_shift); +if (ret) { +dev_err (&rdev->dev,"failed to enable ramp rate\n" ); +return ret; + } } ramp_val =get_ramp_delay (ramp_delay);
drivers/scsi/libiscsi.c +9 -9
@@ -338,7 +338,7 @@ static int iscsi_prep_scsi_cmd_pdu(struct iscsi_task *task)struct iscsi_session *session = conn->session;struct scsi_cmnd *sc = task->sc;struct iscsi_scsi_req *hdr; -unsigned hdrlength, cmd_len; +unsigned hdrlength, cmd_len, transfer_length;itt_t itt;int rc;
@@ -391,11 +391,11 @@ static int iscsi_prep_scsi_cmd_pdu(struct iscsi_task *task)if (scsi_get_prot_op (sc) !=SCSI_PROT_NORMAL ) task->protected = true; + transfer_length =scsi_transfer_length (sc); + hdr->data_length =cpu_to_be32 (transfer_length);if (sc->sc_data_direction ==DMA_TO_DEVICE ) { -unsigned out_len =scsi_out (sc)->length;struct iscsi_r2t_info *r2t = &task->unsol_r2t; - hdr->data_length =cpu_to_be32 (out_len); hdr->flags |=ISCSI_FLAG_CMD_WRITE ;/* * Write counters:
@@ -414,18 +414,19 @@ static int iscsi_prep_scsi_cmd_pdu(struct iscsi_task *task)memset (r2t,0 ,sizeof (*r2t));if (session->imm_data_en) { -if (out_len >= session->first_burst) +if (transfer_length >= session->first_burst) task->imm_count =min (session->first_burst, conn->max_xmit_dlength);else - task->imm_count =min (out_len, - conn->max_xmit_dlength); + task->imm_count =min (transfer_length, + conn->max_xmit_dlength);hton24 (hdr->dlength, task->imm_count); }else zero_data (hdr->dlength);if (!session->initial_r2t_en) { - r2t->data_length =min (session->first_burst, out_len) - + r2t->data_length =min (session->first_burst, + transfer_length) - task->imm_count; r2t->data_offset = task->imm_count; r2t->ttt =cpu_to_be32 (ISCSI_RESERVED_TAG );
@@ -438,7 +439,6 @@ static int iscsi_prep_scsi_cmd_pdu(struct iscsi_task *task) }else { hdr->flags |=ISCSI_FLAG_CMD_FINAL ;zero_data (hdr->dlength); - hdr->data_length =cpu_to_be32 (scsi_in (sc)->length);if (sc->sc_data_direction ==DMA_FROM_DEVICE ) hdr->flags |=ISCSI_FLAG_CMD_READ ;
@@ -466,7 +466,7 @@ static int iscsi_prep_scsi_cmd_pdu(struct iscsi_task *task)scsi_bidi_cmnd (sc) ?"bidirectional" : sc->sc_data_direction ==DMA_TO_DEVICE ?"write" :"read" , conn->id, sc, sc->cmnd[0 ], - task->itt,scsi_bufflen (sc), + task->itt, transfer_length,scsi_bidi_cmnd (sc) ?scsi_in (sc)->length :0 , session->cmdsn, session->max_cmdsn - session->exp_cmdsn + 1);
drivers/staging/imx-drm/imx-hdmi.c +3 -6
@@ -120,8 +120,6 @@ struct imx_hdmi {struct clk *isfr_clk;struct clk *iahb_clk; -enum drm_connector_status connector_status; -struct hdmi_data_info hdmi_data;int vic;
@@ -1382,7 +1380,9 @@ static enum drm_connector_status imx_hdmi_connector_detect(struct drm_connector { struct imx_hdmi *hdmi = container_of(connector, struct imx_hdmi, connector); -return hdmi->connector_status; + +return hdmi_readb (hdmi,HDMI_PHY_STAT0 ) &HDMI_PHY_HPD ? + connector_status_connected : connector_status_disconnected; }static int imx_hdmi_connector_get_modes (struct drm_connector *connector)
@@ -1524,7 +1524,6 @@ static irqreturn_t imx_hdmi_irq(int irq, void *dev_id)hdmi_modb (hdmi,0 ,HDMI_PHY_HPD ,HDMI_PHY_POL0 ); - hdmi->connector_status = connector_status_connected;imx_hdmi_poweron (hdmi); }else {dev_dbg (hdmi->dev,"EVENT=plugout\n" );
@@ -1532,7 +1531,6 @@ static irqreturn_t imx_hdmi_irq(int irq, void *dev_id)hdmi_modb (hdmi,HDMI_PHY_HPD ,HDMI_PHY_HPD ,HDMI_PHY_POL0 ); - hdmi->connector_status = connector_status_disconnected;imx_hdmi_poweroff (hdmi); }drm_helper_hpd_irq_event (hdmi->connector.dev);
@@ -1606,7 +1604,6 @@ static int imx_hdmi_bind(struct device *dev, struct device *master, void *data)return -ENOMEM ; hdmi->dev = dev; - hdmi->connector_status = connector_status_disconnected; hdmi->sample_rate =48000 ; hdmi->ratio =100 ;
drivers/staging/media/bcm2048/radio-bcm2048.c +1 -1
@@ -737,7 +737,7 @@ static int bcm2048_set_region(struct bcm2048_device *bdev, u8 region)int err;u32 new_frequency =0 ; -if (region >ARRAY_SIZE (region_configs)) +if (region >=ARRAY_SIZE (region_configs))return -EINVAL ;mutex_lock (&bdev->mutex);
drivers/staging/mt29f_spinand/mt29f_spinand.c +1 -0
@@ -924,6 +924,7 @@ static int spinand_remove(struct spi_device *spi)static const struct of_device_id spinand_dt[] = { { .compatible ="spinand,mt29f" , }, + {} };/*
drivers/staging/rtl8188eu/core/rtw_wlan_util.c +6 -1
@@ -1599,13 +1599,18 @@ int update_sta_support_rate(struct adapter *padapter, u8 *pvar_ie, uint var_ie_l pIE = (struct ndis_802_11_var_ie *)rtw_get_ie (pvar_ie, _SUPPORTEDRATES_IE_, &ie_len, var_ie_len);if (pIE ==NULL )return _FAIL; +if (ie_len >NDIS_802_11_LENGTH_RATES_EX ) +return _FAIL;memcpy (pmlmeinfo->FW_sta_info[cam_idx].SupportedRates, pIE->data, ie_len); supportRateNum = ie_len; pIE = (struct ndis_802_11_var_ie *)rtw_get_ie (pvar_ie, _EXT_SUPPORTEDRATES_IE_, &ie_len, var_ie_len); -if (pIE) +if (pIE) { +if (supportRateNum + ie_len >NDIS_802_11_LENGTH_RATES_EX ) +return _FAIL;memcpy ((pmlmeinfo->FW_sta_info[cam_idx].SupportedRates + supportRateNum), pIE->data, ie_len); + }return _SUCCESS; }
drivers/staging/tidspbridge/core/dsp-clock.c +2 -2
@@ -226,7 +226,7 @@ int dsp_clk_enable(enum dsp_clk_id clk_id)case GPT_CLK : status =omap_dm_timer_start (timer[clk_id -1 ]);break ; -#ifdef CONFIG_OMAP_MCBSP +#ifdef CONFIG_SND_OMAP_SOC_MCBSP case MCBSP_CLK :omap_mcbsp_request (MCBSP_ID (clk_id));omap2_mcbsp_set_clks_src (MCBSP_ID (clk_id),MCBSP_CLKS_PAD_SRC );
@@ -302,7 +302,7 @@ int dsp_clk_disable(enum dsp_clk_id clk_id)case GPT_CLK : status =omap_dm_timer_stop (timer[clk_id -1 ]);break ; -#ifdef CONFIG_OMAP_MCBSP +#ifdef CONFIG_SND_OMAP_SOC_MCBSP case MCBSP_CLK :omap2_mcbsp_set_clks_src (MCBSP_ID (clk_id),MCBSP_CLKS_PRCM_SRC );omap_mcbsp_free (MCBSP_ID (clk_id));
drivers/target/iscsi/iscsi_target.c +11 -6
@@ -3390,7 +3390,9 @@ static bool iscsit_check_inaddr_any(struct iscsi_np *np)#define SENDTARGETS_BUF_LIMIT 32768U -static int iscsit_build_sendtargets_response (struct iscsi_cmd *cmd) +static int +iscsit_build_sendtargets_response (struct iscsi_cmd *cmd, +enum iscsit_transport_type network_transport) {char *payload =NULL ;struct iscsi_conn *conn = cmd->conn;
@@ -3467,6 +3469,9 @@ static int iscsit_build_sendtargets_response(struct iscsi_cmd *cmd)struct iscsi_np *np = tpg_np->tpg_np;bool inaddr_any =iscsit_check_inaddr_any (np); +if (np->np_network_transport != network_transport) +continue ; +if (!target_name_printed) { len =sprintf (buf,"TargetName=%s" , tiqn->tiqn);
@@ -3520,11 +3525,12 @@ eob:int iscsit_build_text_rsp (struct iscsi_cmd *cmd,struct iscsi_conn *conn, -struct iscsi_text_rsp *hdr) +struct iscsi_text_rsp *hdr, +enum iscsit_transport_type network_transport) {int text_length, padding; - text_length =iscsit_build_sendtargets_response (cmd); + text_length =iscsit_build_sendtargets_response (cmd, network_transport);if (text_length <0 )return text_length;
@@ -3562,7 +3568,7 @@ static int iscsit_send_text_rsp(u32 tx_size =0 ;int text_length, iov_count =0 , rc; - rc =iscsit_build_text_rsp (cmd, conn, hdr); + rc =iscsit_build_text_rsp (cmd, conn, hdr,ISCSI_TCP );if (rc <0 )return rc;
@@ -4234,8 +4240,6 @@ int iscsit_close_connection(if (conn->conn_transport->iscsit_wait_conn) conn->conn_transport->iscsit_wait_conn (conn); -iscsit_free_queue_reqs_for_conn (conn); -/* * During Connection recovery drop unacknowledged out of order * commands for this connection, and prepare the other commands
@@ -4252,6 +4256,7 @@ int iscsit_close_connection(iscsit_clear_ooo_cmdsns_for_conn (conn);iscsit_release_commands_from_conn (conn); } +iscsit_free_queue_reqs_for_conn (conn);/* * Handle decrementing session or connection usage count if
drivers/target/loopback/tcm_loop.c +12 -3
@@ -179,7 +179,7 @@ static void tcm_loop_submission_work(struct work_struct *work)struct tcm_loop_hba *tl_hba;struct tcm_loop_tpg *tl_tpg;struct scatterlist *sgl_bidi =NULL ; -u32 sgl_bidi_count =0 ; +u32 sgl_bidi_count =0 , transfer_length;int rc; tl_hba = *(struct tcm_loop_hba **)shost_priv (sc->device->host);
@@ -213,12 +213,21 @@ static void tcm_loop_submission_work(struct work_struct *work) } -if (!scsi_prot_sg_count (sc) &&scsi_get_prot_op (sc) !=SCSI_PROT_NORMAL ) + transfer_length =scsi_transfer_length (sc); +if (!scsi_prot_sg_count (sc) && +scsi_get_prot_op (sc) !=SCSI_PROT_NORMAL ) { se_cmd->prot_pto = true; +/* +* loopback transport doesn't support +* WRITE_GENERATE, READ_STRIP protection +* information operations, go ahead unprotected. +*/ + transfer_length =scsi_bufflen (sc); + } rc = target_submit_cmd_map_sgls(se_cmd, tl_nexus->se_sess, sc->cmnd, &tl_cmd->tl_sense_buf[0], tl_cmd->sc->device->lun, - scsi_bufflen(sc), tcm_loop_sam_attr(sc), + transfer_length, tcm_loop_sam_attr(sc), sc->sc_data_direction, 0, scsi_sglist(sc), scsi_sg_count(sc), sgl_bidi, sgl_bidi_count,
drivers/target/target_core_sbc.c +15 -4
@@ -81,7 +81,7 @@ sbc_emulate_readcapacity(struct se_cmd *cmd)transport_kunmap_data_sg (cmd); } -target_complete_cmd (cmd,GOOD ); +target_complete_cmd_with_length (cmd,GOOD ,8 );return 0 ; }
@@ -137,7 +137,7 @@ sbc_emulate_readcapacity_16(struct se_cmd *cmd)transport_kunmap_data_sg (cmd); } -target_complete_cmd (cmd,GOOD ); +target_complete_cmd_with_length (cmd,GOOD ,32 );return 0 ; }
@@ -665,8 +665,19 @@ sbc_check_prot(struct se_device *dev, struct se_cmd *cmd, unsigned char *cdb, cmd->prot_type = dev->dev_attrib.pi_prot_type; cmd->prot_length = dev->prot_length * sectors; -pr_debug ("%s: prot_type=%d, prot_length=%d prot_op=%d prot_checks=%d\n" , - __func__, cmd->prot_type, cmd->prot_length, + +/** +* In case protection information exists over the wire +* we modify command data length to describe pure data. +* The actual transfer length is data length + protection +* length +**/ +if (protect) + cmd->data_length = sectors * dev->dev_attrib.block_size; + +pr_debug ("%s: prot_type=%d, data_length=%d, prot_length=%d " +"prot_op=%d prot_checks=%d\n" , + __func__, cmd->prot_type, cmd->data_length, cmd->prot_length, cmd->prot_op, cmd->prot_checks);return true;
drivers/target/target_core_spc.c +6 -3
@@ -721,6 +721,7 @@ spc_emulate_inquiry(struct se_cmd *cmd)unsigned char *buf;sense_reason_t ret;int p; +int len =0 ; buf =kzalloc (SE_INQUIRY_BUF ,GFP_KERNEL );if (!buf) {
@@ -742,6 +743,7 @@ spc_emulate_inquiry(struct se_cmd *cmd) } ret =spc_emulate_inquiry_std (cmd, buf); + len = buf[4 ] +5 ; goto out; }
@@ -749,6 +751,7 @@ spc_emulate_inquiry(struct se_cmd *cmd)if (cdb[2 ] == evpd_handlers[p].page) { buf[1 ] = cdb[2 ]; ret = evpd_handlers[p].emulate (cmd, buf); + len =get_unaligned_be16 (&buf[2 ]) +4 ; goto out; } }
@@ -765,7 +768,7 @@ out:kfree (buf);if (!ret) -target_complete_cmd (cmd,GOOD ); +target_complete_cmd_with_length (cmd,GOOD , len);return ret; }
@@ -1103,7 +1106,7 @@ set_length:transport_kunmap_data_sg (cmd); } -target_complete_cmd (cmd,GOOD ); +target_complete_cmd_with_length (cmd,GOOD , length);return 0 ; }
@@ -1279,7 +1282,7 @@ done: buf[3 ] = (lun_count &0xff );transport_kunmap_data_sg (cmd); -target_complete_cmd (cmd,GOOD ); +target_complete_cmd_with_length (cmd,GOOD ,8 + lun_count *8 );return 0 ; }EXPORT_SYMBOL (spc_emulate_report_luns);
drivers/target/target_core_transport.c +26 -3
@@ -562,7 +562,7 @@ static int transport_cmd_check_stop(struct se_cmd *cmd, bool remove_from_lists,spin_unlock_irqrestore (&cmd->t_state_lock, flags); -complete (&cmd->t_transport_stop_comp); +complete_all (&cmd->t_transport_stop_comp);return 1 ; }
@@ -687,7 +687,7 @@ void target_complete_cmd(struct se_cmd *cmd, u8 scsi_status)if (cmd->transport_state &CMD_T_ABORTED && cmd->transport_state &CMD_T_STOP ) {spin_unlock_irqrestore (&cmd->t_state_lock, flags); -complete (&cmd->t_transport_stop_comp); +complete_all (&cmd->t_transport_stop_comp);return ; }else if (!success) {INIT_WORK (&cmd->work, target_complete_failure_work);
@@ -703,6 +703,23 @@ void target_complete_cmd(struct se_cmd *cmd, u8 scsi_status) }EXPORT_SYMBOL (target_complete_cmd); +void target_complete_cmd_with_length (struct se_cmd *cmd,u8 scsi_status,int length) +{ +if (scsi_status ==SAM_STAT_GOOD && length < cmd->data_length) { +if (cmd->se_cmd_flags &SCF_UNDERFLOW_BIT ) { + cmd->residual_count += cmd->data_length - length; + }else { + cmd->se_cmd_flags |=SCF_UNDERFLOW_BIT ; + cmd->residual_count = cmd->data_length - length; + } + + cmd->data_length = length; + } + +target_complete_cmd (cmd, scsi_status); +} +EXPORT_SYMBOL (target_complete_cmd_with_length); +static void target_add_to_state_list (struct se_cmd *cmd) {struct se_device *dev = cmd->se_dev;
@@ -1761,7 +1778,7 @@ void target_execute_cmd(struct se_cmd *cmd) cmd->se_tfo->get_task_tag(cmd));spin_unlock_irq (&cmd->t_state_lock); -complete (&cmd->t_transport_stop_comp); +complete_all (&cmd->t_transport_stop_comp);return ; }
@@ -2938,6 +2955,12 @@ static void target_tmr_work(struct work_struct *work)int transport_generic_handle_tmr (struct se_cmd *cmd) { +unsigned long flags; + +spin_lock_irqsave (&cmd->t_state_lock, flags); + cmd->transport_state |=CMD_T_ACTIVE ; +spin_unlock_irqrestore (&cmd->t_state_lock, flags); +INIT_WORK (&cmd->work, target_tmr_work);queue_work (cmd->se_dev->tmr_wq, &cmd->work);return 0 ;
drivers/tty/serial/of_serial.c +1 -0
@@ -173,6 +173,7 @@ static int of_platform_serial_probe(struct platform_device *ofdev) {struct uart_8250_port port8250;memset (&port8250,0 ,sizeof (port8250)); + port.type = port_type; port8250.port = port;if (port.fifosize)
drivers/usb/dwc3/gadget.c +4 -0
@@ -604,6 +604,10 @@ static int __dwc3_gadget_ep_disable(struct dwc3_ep *dep)dwc3_remove_requests (dwc, dep); +/* make sure HW endpoint isn't stalled */ +if (dep->flags &DWC3_EP_STALL ) +__dwc3_gadget_ep_set_halt (dep,0 ); + reg =dwc3_readl (dwc->regs,DWC3_DALEPENA ); reg &= ~DWC3_DALEPENA_EP (dep->number);dwc3_writel (dwc->regs,DWC3_DALEPENA , reg);
drivers/usb/gadget/inode.c +1 -1
@@ -1501,7 +1501,7 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) }break ; -#ifndef CONFIG_USB_GADGET_PXA25X +#ifndef CONFIG_USB_PXA25X /* PXA automagically handles this request too */ case USB_REQ_GET_CONFIGURATION :if (ctrl->bRequestType !=0x80 )
drivers/usb/host/pci-quirks.c +16 -3
@@ -656,6 +656,14 @@ static const struct dmi_system_id ehci_dmi_nohandoff_table[] = { DMI_MATCH(DMI_BIOS_VERSION, "Lucid-"), }, }, + { + /* HASEE E200 */ + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "HASEE"), + DMI_MATCH(DMI_BOARD_NAME, "E210"), + DMI_MATCH(DMI_BIOS_VERSION, "6.00"), + }, + }, { } };
@@ -665,9 +673,14 @@ static void ehci_bios_handoff(struct pci_dev *pdev, {int try_handoff =1 , tried_handoff =0 ; -/* The Pegatron Lucid tablet sporadically waits for 98 seconds trying -* the handoff on its unused controller. Skip it. */ -if (pdev->vendor ==0x8086 && pdev->device ==0x283a ) { +/* +* The Pegatron Lucid tablet sporadically waits for 98 seconds trying +* the handoff on its unused controller. Skip it. +* +* The HASEE E200 hangs when the semaphore is set (bugzilla #77021). +*/ +if (pdev->vendor ==0x8086 && (pdev->device ==0x283a || + pdev->device ==0x27cc )) {if (dmi_check_system (ehci_dmi_nohandoff_table)) try_handoff =0 ; }
drivers/usb/misc/usbtest.c +25 -1
@@ -7,7 +7,7 @@#include <linux/moduleparam.h> #include <linux/scatterlist.h> #include <linux/mutex.h> - +#include <linux/timer.h> #include <linux/usb.h> #define SIMPLE_IO_TIMEOUT 10000/* in milliseconds */
@@ -484,6 +484,14 @@ alloc_sglist(int nents, int max, int vary)return sg; } +static void sg_timeout (unsigned long _req) +{ +struct usb_sg_request *req = (struct usb_sg_request *) _req; + + req->status = -ETIMEDOUT ; +usb_sg_cancel (req); +} + static int perform_sglist( struct usbtest_dev *tdev, unsigned iterations,
@@ -495,6 +503,9 @@ static int perform_sglist( {struct usb_device *udev =testdev_to_usbdev (tdev);int retval =0 ; +struct timer_list sg_timer; + +setup_timer_on_stack (&sg_timer, sg_timeout, (unsigned long ) req);while (retval ==0 && iterations-- >0 ) { retval = usb_sg_init(req, udev, pipe,
@@ -505,7 +516,10 @@ static int perform_sglist(if (retval)break ; +mod_timer (&sg_timer, jiffies + +msecs_to_jiffies (SIMPLE_IO_TIMEOUT ));usb_sg_wait (req); +del_timer_sync (&sg_timer); retval = req->status;/* FIXME check resulting data pattern */
@@ -1320,6 +1334,11 @@ static int unlink1(struct usbtest_dev *dev, int pipe, int size, int async) urb->context = &completion; urb->complete = unlink1_callback; +if (usb_pipeout (urb->pipe)) { +simple_fill_buf (urb); + urb->transfer_flags |=URB_ZERO_PACKET ; + } +/* keep the endpoint busy. there are lots of hc/hcd-internal * states, and testing should get to all of them over time. *
@@ -1450,6 +1469,11 @@ static int unlink_queued(struct usbtest_dev *dev, int pipe, unsigned num, unlink_queued_callback, &ctx); ctx.urbs[i]->transfer_dma = buf_dma; ctx.urbs[i]->transfer_flags =URB_NO_TRANSFER_DMA_MAP ; + +if (usb_pipeout (ctx.urbs[i]->pipe)) { +simple_fill_buf (ctx.urbs[i]); + ctx.urbs[i]->transfer_flags |=URB_ZERO_PACKET ; + } }/* Submit all the URBs and then unlink URBs num - 4 and num - 2. */
drivers/usb/phy/phy-isp1301-omap.c +1 -1
@@ -1295,7 +1295,7 @@ isp1301_set_host(struct usb_otg *otg, struct usb_bus *host)return isp1301_otg_enable (isp);return 0 ; -#elif !defined(CONFIG_USB_GADGET_OMAP ) +#elif !IS_ENABLED (CONFIG_USB_OMAP )// FIXME update its refcount otg->host = host;
drivers/usb/serial/bus.c +11 -3
@@ -97,13 +97,19 @@ static int usb_serial_device_remove(struct device *dev)struct usb_serial_port *port;int retval =0 ;int minor; +int autopm_err; port =to_usb_serial_port (dev);if (!port)return -ENODEV ; -/* make sure suspend/resume doesn't race against port_remove */ -usb_autopm_get_interface (port->serial->interface); +/* +* Make sure suspend/resume doesn't race against port_remove. +* +* Note that no further runtime PM callbacks will be made if +* autopm_get fails. +*/ + autopm_err =usb_autopm_get_interface (port->serial->interface); minor = port->minor;tty_unregister_device (usb_serial_tty_driver, minor);
@@ -117,7 +123,9 @@ static int usb_serial_device_remove(struct device *dev)dev_info (dev,"%s converter now disconnected from ttyUSB%d\n" , driver->description, minor); -usb_autopm_put_interface (port->serial->interface); +if (!autopm_err) +usb_autopm_put_interface (port->serial->interface); +return retval; }
drivers/usb/serial/option.c +10 -1
@@ -1925,6 +1925,7 @@ static int option_send_setup(struct usb_serial_port *port)struct option_private *priv = intfdata->private;struct usb_wwan_port_private *portdata;int val =0 ; +int res; portdata =usb_get_serial_port_data (port);
@@ -1933,9 +1934,17 @@ static int option_send_setup(struct usb_serial_port *port)if (portdata->rts_state) val |=0x02 ; -return usb_control_msg (serial->dev,usb_rcvctrlpipe (serial->dev,0 ), + res =usb_autopm_get_interface (serial->interface); +if (res) +return res; + + res =usb_control_msg (serial->dev,usb_rcvctrlpipe (serial->dev,0 ),0x22 ,0x21 , val, priv->bInterfaceNumber,NULL ,0 ,USB_CTRL_SET_TIMEOUT ); + +usb_autopm_put_interface (serial->interface); + +return res; }MODULE_AUTHOR (DRIVER_AUTHOR );
drivers/usb/serial/qcserial.c +21 -0
@@ -145,12 +145,33 @@ static const struct usb_device_id id_table[] = { {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901f, 0)}, /* Sierra Wireless EM7355 Device Management */ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901f, 2)}, /* Sierra Wireless EM7355 NMEA */ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901f, 3)}, /* Sierra Wireless EM7355 Modem */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9040, 0)}, /* Sierra Wireless Modem Device Management */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9040, 2)}, /* Sierra Wireless Modem NMEA */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9040, 3)}, /* Sierra Wireless Modem Modem */ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9041, 0)}, /* Sierra Wireless MC7305/MC7355 Device Management */ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9041, 2)}, /* Sierra Wireless MC7305/MC7355 NMEA */ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9041, 3)}, /* Sierra Wireless MC7305/MC7355 Modem */ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 0)}, /* Netgear AirCard 340U Device Management */ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 2)}, /* Netgear AirCard 340U NMEA */ {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 3)}, /* Netgear AirCard 340U Modem */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9053, 0)}, /* Sierra Wireless Modem Device Management */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9053, 2)}, /* Sierra Wireless Modem NMEA */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9053, 3)}, /* Sierra Wireless Modem Modem */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9054, 0)}, /* Sierra Wireless Modem Device Management */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9054, 2)}, /* Sierra Wireless Modem NMEA */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9054, 3)}, /* Sierra Wireless Modem Modem */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9055, 0)}, /* Netgear AirCard 341U Device Management */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9055, 2)}, /* Netgear AirCard 341U NMEA */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9055, 3)}, /* Netgear AirCard 341U Modem */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9056, 0)}, /* Sierra Wireless Modem Device Management */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9056, 2)}, /* Sierra Wireless Modem NMEA */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9056, 3)}, /* Sierra Wireless Modem Modem */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9060, 0)}, /* Sierra Wireless Modem Device Management */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9060, 2)}, /* Sierra Wireless Modem NMEA */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9060, 3)}, /* Sierra Wireless Modem Modem */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9061, 0)}, /* Sierra Wireless Modem Device Management */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9061, 2)}, /* Sierra Wireless Modem NMEA */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9061, 3)}, /* Sierra Wireless Modem Modem */ {USB_DEVICE_INTERFACE_NUMBER(0x413c, 0x81a2, 0)}, /* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card Device Management */ {USB_DEVICE_INTERFACE_NUMBER(0x413c, 0x81a2, 2)}, /* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card NMEA */ {USB_DEVICE_INTERFACE_NUMBER(0x413c, 0x81a2, 3)}, /* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card Modem */
drivers/usb/serial/sierra.c +43 -12
119 lines not on this page · raw message
drivers/usb/serial/usb_wwan.c +67 -58
227 lines not on this page · raw message
drivers/video/fbdev/matrox/matroxfb_base.h +1 -1
@@ -698,7 +698,7 @@ void matroxfb_unregister_driver(struct matroxfb_driver* drv);#define mga_fifo (n) do {} while ((mga_inl(M_FIFOSTATUS) & 0xFF) < (n)) -#define WaitTillIdle () do {} while (mga_inl(M_STATUS) & 0x10000) +#define WaitTillIdle () do { mga_inl(M_STATUS); do {} while (mga_inl(M_STATUS) & 0x10000); } while (0)/* code speedup */ #ifdef CONFIG_FB_MATROX_MILLENIUM
drivers/video/fbdev/offb.c +1 -10
@@ -91,15 +91,6 @@ extern boot_infos_t *boot_infos;#define AVIVO_DC_LUTB_WHITE_OFFSET_GREEN 0x6cd4#define AVIVO_DC_LUTB_WHITE_OFFSET_RED 0x6cd8 -#define FB_RIGHT_POS (p, bpp) (fb_be_math(p) ? 0 : (32 - (bpp))) - -static inline u32 offb_cmap_byteswap (struct fb_info *info,u32 value) -{ -u32 bpp = info->var.bits_per_pixel; - -return cpu_to_be32 (value) >>FB_RIGHT_POS (info, bpp); -} -/* * Set a single color register. The values supplied are already * rounded down to the hardware's capabilities (according to the
@@ -129,7 +120,7 @@ static int offb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, mask <<= info->var.transp.offset; value |= mask; } - pal[regno] =offb_cmap_byteswap (info, value); + pal[regno] = value;return 0 ; }
drivers/w1/w1.c +2 -0
@@ -1078,6 +1078,8 @@ static void w1_search_process(struct w1_master *dev, u8 search_type)* w1_process_callbacks() - execute each dev->async_list callback entry * @dev: w1_master device * +* The w1 master list_mutex must be held. +* * Return: 1 if there were commands to executed 0 otherwise */ int w1_process_callbacks (struct w1_master *dev)
drivers/w1/w1_int.c +4 -0
@@ -219,9 +219,13 @@ void __w1_remove_master_device(struct w1_master *dev)if (msleep_interruptible (1000 ))flush_signals (current); +mutex_lock (&dev->list_mutex);w1_process_callbacks (dev); +mutex_unlock (&dev->list_mutex); } +mutex_lock (&dev->list_mutex);w1_process_callbacks (dev); +mutex_unlock (&dev->list_mutex);memset (&msg,0 ,sizeof (msg)); msg.id.mst.id = dev->id;
fs/aio.c +4 -2
@@ -1021,6 +1021,7 @@ void aio_complete(struct kiocb *iocb, long res, long res2)/* everything turned out well, dispose of the aiocb. */ kiocb_free (iocb); +put_reqs_available (ctx,1 );/* * We have to order our ring_info tail store above and test
@@ -1062,6 +1063,9 @@ static long aio_read_events_ring(struct kioctx *ctx,if (head == tail) goto out; + head %= ctx->nr_events; + tail %= ctx->nr_events; +while (ret < nr) {long avail;struct io_event *ev;
@@ -1100,8 +1104,6 @@ static long aio_read_events_ring(struct kioctx *ctx,flush_dcache_page (ctx->ring_pages[0 ]);pr_debug ("%li h%u t%u\n" , ret, head, tail); - -put_reqs_available (ctx, ret); out:mutex_unlock (&ctx->ring_lock);
fs/btrfs/backref.c +23 -14
@@ -984,11 +984,12 @@ again: goto out; }if (ref->count && ref->parent) { -if (extent_item_pos && !ref->inode_list) { +if (extent_item_pos && !ref->inode_list && + ref->level ==0 ) {u32 bsz;struct extent_buffer *eb; bsz =btrfs_level_size (fs_info->extent_root, - info_level); + ref->level); eb =read_tree_block (fs_info->extent_root, ref->parent, bsz,0 );if (!eb || !extent_buffer_uptodate (eb)) {
@@ -1404,9 +1405,10 @@ int extent_from_logical(struct btrfs_fs_info *fs_info, u64 logical,* returns <0 on error */ static int __get_extent_inline_ref (unsigned long *ptr,struct extent_buffer *eb, -struct btrfs_extent_item *ei,u32 item_size, -struct btrfs_extent_inline_ref **out_eiref, -int *out_type) +struct btrfs_key *key, +struct btrfs_extent_item *ei,u32 item_size, +struct btrfs_extent_inline_ref **out_eiref, +int *out_type) {unsigned long end;u64 flags;
@@ -1416,19 +1418,26 @@ static int __get_extent_inline_ref(unsigned long *ptr, struct extent_buffer *eb,/* first call */ flags =btrfs_extent_flags (eb, ei);if (flags &BTRFS_EXTENT_FLAG_TREE_BLOCK ) { - info = (struct btrfs_tree_block_info *)(ei +1 ); - *out_eiref = - (struct btrfs_extent_inline_ref *)(info +1 ); +if (key->type ==BTRFS_METADATA_ITEM_KEY ) { +/* a skinny metadata extent */ + *out_eiref = + (struct btrfs_extent_inline_ref *)(ei +1 ); + }else { +WARN_ON (key->type !=BTRFS_EXTENT_ITEM_KEY ); + info = (struct btrfs_tree_block_info *)(ei +1 ); + *out_eiref = + (struct btrfs_extent_inline_ref *)(info +1 ); + } }else { *out_eiref = (struct btrfs_extent_inline_ref *)(ei +1 ); } *ptr = (unsigned long )*out_eiref; -if ((void *)*ptr >= (void *)ei + item_size) +if ((unsigned long )(*ptr) >= (unsigned long )ei + item_size)return -ENOENT ; } end = (unsigned long )ei + item_size; - *out_eiref = (struct btrfs_extent_inline_ref *)*ptr; + *out_eiref = (struct btrfs_extent_inline_ref *)(*ptr); *out_type =btrfs_extent_inline_ref_type (eb, *out_eiref); *ptr +=btrfs_extent_inline_ref_size (*out_type);
@@ -1447,8 +1456,8 @@ static int __get_extent_inline_ref(unsigned long *ptr, struct extent_buffer *eb,* <0 on error. */ int tree_backref_for_extent (unsigned long *ptr,struct extent_buffer *eb, -struct btrfs_extent_item *ei,u32 item_size, -u64 *out_root,u8 *out_level) +struct btrfs_key *key,struct btrfs_extent_item *ei, +u32 item_size,u64 *out_root,u8 *out_level) {int ret;int type;
@@ -1459,8 +1468,8 @@ int tree_backref_for_extent(unsigned long *ptr, struct extent_buffer *eb,return 1 ;while (1 ) { - ret =__get_extent_inline_ref (ptr, eb, ei, item_size, - &eiref, &type); + ret =__get_extent_inline_ref (ptr, eb, key, ei, item_size, + &eiref, &type);if (ret <0 )return ret;
fs/btrfs/backref.h +2 -2
@@ -40,8 +40,8 @@ int extent_from_logical(struct btrfs_fs_info *fs_info, u64 logical, u64 *flags);int tree_backref_for_extent (unsigned long *ptr,struct extent_buffer *eb, -struct btrfs_extent_item *ei,u32 item_size, -u64 *out_root,u8 *out_level); +struct btrfs_key *key,struct btrfs_extent_item *ei, +u32 item_size,u64 *out_root,u8 *out_level); int iterate_extent_inodes(struct btrfs_fs_info *fs_info, u64 extent_item_objectid,
fs/btrfs/ctree.h +7 -1
@@ -1113,6 +1113,12 @@ struct btrfs_qgroup_limit_item {__le64 rsv_excl; } __attribute__ ((__packed__)); +/* For raid type sysfs entries */ +struct raid_kobject { +int raid_type; +struct kobject kobj; +}; +struct btrfs_space_info {spinlock_t lock;
@@ -1163,7 +1169,7 @@ struct btrfs_space_info {wait_queue_head_t wait;struct kobject kobj; -struct kobject block_group_kobjs[BTRFS_NR_RAID_TYPES ]; +struct kobject *block_group_kobjs[BTRFS_NR_RAID_TYPES ]; };#define BTRFS_BLOCK_RSV_GLOBAL 1
fs/btrfs/disk-io.c +5 -0
@@ -3633,6 +3633,11 @@ int close_ctree(struct btrfs_root *root)btrfs_free_block_groups (fs_info); +/* +* we must make sure there is not any read request to +* submit after we stopping all workers. +*/ +invalidate_inode_pages2 (fs_info->btree_inode->i_mapping);btrfs_stop_all_workers (fs_info);free_root_pointers (fs_info,1 );
fs/btrfs/extent-tree.c +26 -13
@@ -3401,10 +3401,8 @@ static int update_space_info(struct btrfs_fs_info *info, u64 flags,return ret; } -for (i =0 ; i <BTRFS_NR_RAID_TYPES ; i++) { +for (i =0 ; i <BTRFS_NR_RAID_TYPES ; i++)INIT_LIST_HEAD (&found->block_groups[i]); -kobject_init (&found->block_group_kobjs[i], &btrfs_raid_ktype); - }init_rwsem (&found->groups_sem);spin_lock_init (&found->lock); found->flags = flags &BTRFS_BLOCK_GROUP_TYPE_MASK ;
@@ -8327,8 +8325,9 @@ int btrfs_free_block_groups(struct btrfs_fs_info *info)list_del (&space_info->list);for (i =0 ; i <BTRFS_NR_RAID_TYPES ; i++) {struct kobject *kobj; - kobj = &space_info->block_group_kobjs[i]; -if (kobj->parent) { + kobj = space_info->block_group_kobjs[i]; + space_info->block_group_kobjs[i] =NULL ; +if (kobj) {kobject_del (kobj);kobject_put (kobj); }
@@ -8352,17 +8351,26 @@ static void __link_block_group(struct btrfs_space_info *space_info,up_write (&space_info->groups_sem);if (first) { -struct kobject *kobj = &space_info->block_group_kobjs[index]; +struct raid_kobject *rkobj;int ret; -kobject_get (&space_info->kobj);/* put in release */ - ret =kobject_add (kobj, &space_info->kobj,"%s" , -get_raid_name (index)); + rkobj =kzalloc (sizeof (*rkobj),GFP_NOFS ); +if (!rkobj) + goto out_err; + rkobj->raid_type = index; +kobject_init (&rkobj->kobj, &btrfs_raid_ktype); + ret =kobject_add (&rkobj->kobj, &space_info->kobj, +"%s" ,get_raid_name (index));if (ret) { -pr_warn ("BTRFS: failed to add kobject for block cache. ignoring.\n" ); -kobject_put (&space_info->kobj); +kobject_put (&rkobj->kobj); + goto out_err; } + space_info->block_group_kobjs[index] = &rkobj->kobj; } + +return ; +out_err: +pr_warn ("BTRFS: failed to add kobject for block cache. ignoring.\n" ); } static struct btrfs_block_group_cache *
@@ -8697,6 +8705,7 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans,struct btrfs_root *tree_root = root->fs_info->tree_root;struct btrfs_key key;struct inode *inode; +struct kobject *kobj =NULL ;int ret;int index;int factor;
@@ -8796,11 +8805,15 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans,*/ list_del_init (&block_group->list);if (list_empty (&block_group->space_info->block_groups[index])) { -kobject_del (&block_group->space_info->block_group_kobjs[index]); -kobject_put (&block_group->space_info->block_group_kobjs[index]); + kobj = block_group->space_info->block_group_kobjs[index]; + block_group->space_info->block_group_kobjs[index] =NULL ;clear_avail_alloc_bits (root->fs_info, block_group->flags); }up_write (&block_group->space_info->groups_sem); +if (kobj) { +kobject_del (kobj); +kobject_put (kobj); + }if (block_group->cached ==BTRFS_CACHE_STARTED )wait_block_group_cache_done (block_group);
fs/btrfs/extent_io.c +4 -1
@@ -1693,6 +1693,7 @@ again:* shortening the size of the delalloc range we're searching */ free_extent_state (cached_state); + cached_state =NULL ;if (!loops) { max_bytes =PAGE_CACHE_SIZE ; loops =1 ;
@@ -2353,7 +2354,7 @@ int end_extent_writepage(struct page *page, int err, u64 start, u64 end) {int uptodate = (err ==0 );struct extent_io_tree *tree; -int ret; +int ret =0 ; tree = &BTRFS_I (page->mapping->host)->io_tree;
@@ -2367,6 +2368,8 @@ int end_extent_writepage(struct page *page, int err, u64 start, u64 end)if (!uptodate) {ClearPageUptodate (page);SetPageError (page); + ret = ret <0 ? ret : -EIO ; +mapping_set_error (page->mapping, ret); }return 0 ; }
fs/btrfs/file.c +21 -2
@@ -780,6 +780,18 @@ next_slot: extent_end = search_start; } +/* +* Don't skip extent items representing 0 byte lengths. They +* used to be created (bug) if while punching holes we hit +* -ENOSPC condition. So if we find one here, just ensure we +* delete it, otherwise we would insert a new file extent item +* with the same key (offset) as that 0 bytes length file +* extent item in the call to setup_items_for_insert() later +* in this function. +*/ +if (extent_end == key.offset && extent_end >= search_start) + goto delete_extent_item; +if (extent_end <= search_start) { path->slots[0 ]++; goto next_slot;
@@ -893,6 +905,7 @@ next_slot:* | ------ extent ------ | */ if (start <= key.offset && end >= extent_end) { +delete_extent_item:if (del_nr ==0 ) { del_slot = path->slots[0 ]; del_nr =1 ;
@@ -2187,13 +2200,14 @@ static int btrfs_punch_hole(struct inode *inode, loff_t offset, loff_t len)bool same_page = ((offset >>PAGE_CACHE_SHIFT ) == ((offset + len -1 ) >>PAGE_CACHE_SHIFT ));bool no_holes =btrfs_fs_incompat (root->fs_info,NO_HOLES ); -u64 ino_size =round_up (inode->i_size,PAGE_CACHE_SIZE ); +u64 ino_size; ret =btrfs_wait_ordered_range (inode, offset, len);if (ret)return ret;mutex_lock (&inode->i_mutex); + ino_size =round_up (inode->i_size,PAGE_CACHE_SIZE );/* * We needn't truncate any page which is beyond the end of the file * because we are sure there is no data there.
@@ -2347,7 +2361,12 @@ static int btrfs_punch_hole(struct inode *inode, loff_t offset, loff_t len) } trans->block_rsv = &root->fs_info->trans_block_rsv; -if (cur_offset < ino_size) { +/* +* Don't insert file hole extent item if it's for a range beyond eof +* (because it's useless) or if it represents a 0 bytes range (when +* cur_offset == drop_end). +*/ +if (cur_offset < ino_size && cur_offset < drop_end) { ret =fill_holes (trans, inode, path, cur_offset, drop_end);if (ret) { err = ret;
fs/btrfs/free-space-cache.c +2 -2
@@ -831,7 +831,7 @@ int load_free_space_cache(struct btrfs_fs_info *fs_info,if (!matched) {__btrfs_remove_free_space_cache (ctl); -btrfs_err (fs_info,"block group %llu has wrong amount of free space" , +btrfs_warn (fs_info,"block group %llu has wrong amount of free space" , block_group->key.objectid); ret =-1 ; }
@@ -843,7 +843,7 @@ out:spin_unlock (&block_group->lock); ret =0 ; -btrfs_err (fs_info,"failed to load free space cache for block group %llu" , +btrfs_warn (fs_info,"failed to load free space cache for block group %llu, rebuild it now" , block_group->key.objectid); }
fs/btrfs/scrub.c +3 -2
@@ -588,8 +588,9 @@ static void scrub_print_warning(const char *errstr, struct scrub_block *sblock)if (flags &BTRFS_EXTENT_FLAG_TREE_BLOCK ) { do { - ret = tree_backref_for_extent(&ptr, eb, ei, item_size, - &ref_root, &ref_level); + ret = tree_backref_for_extent(&ptr, eb, &found_key, ei, + item_size, &ref_root, + &ref_level); printk_in_rcu(KERN_WARNING "BTRFS: %s at logical %llu on dev %s, " "sector %llu: metadata %s (level %d) in tree "
fs/btrfs/send.c +36 -31
100 lines not on this page · raw message
fs/btrfs/sysfs.c +3 -2
@@ -254,6 +254,7 @@ static ssize_t global_rsv_reserved_show(struct kobject *kobj,BTRFS_ATTR (global_rsv_reserved,0444 , global_rsv_reserved_show);#define to_space_info (_kobj) container_of(_kobj, struct btrfs_space_info, kobj) +#define to_raid_kobj (_kobj) container_of(_kobj, struct raid_kobject, kobj)static ssize_t raid_bytes_show (struct kobject *kobj,struct kobj_attribute *attr,char *buf);
@@ -266,7 +267,7 @@ static ssize_t raid_bytes_show(struct kobject *kobj, {struct btrfs_space_info *sinfo =to_space_info (kobj->parent);struct btrfs_block_group_cache *block_group; -int index = kobj - sinfo->block_group_kobjs; +int index =to_raid_kobj (kobj)->raid_type;u64 val =0 ;down_read (&sinfo->groups_sem);
@@ -288,7 +289,7 @@ static struct attribute *raid_attributes[] = {static void release_raid_kobj (struct kobject *kobj) { -kobject_put (kobj->parent); +kfree (to_raid_kobj (kobj)); }struct kobj_type btrfs_raid_ktype = {
fs/btrfs/volumes.c +35 -9
36 lines not on this page · raw message
kernel/irq/spurious.c +102 -4
106 lines not on this page · raw message
kernel/locking/rtmutex.c +208 -35
243 lines not on this page · raw message
mm/memory-failure.c +53 -20
73 lines not on this page · raw message
mm/page_alloc.c +32 -20
52 lines not on this page · raw message
mm/vmscan.c +40 -6
46 lines not on this page · raw message
net/bluetooth/6lowpan.c +35 -30
65 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.