This is a note to let you know that I've just added the patch titled
intel_th: msu: Remove set but not used variable 'last'
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the char-misc-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
>From 9800db282dff675dd700d5985d90b605c34b5ccd Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing(a)huawei.com>
Date: Fri, 21 Jun 2019 19:19:28 +0300
Subject: intel_th: msu: Remove set but not used variable 'last'
Commit aad14ad3cf3a ("intel_th: msu: Add current window tracking") added
the following gcc warning:
> drivers/hwtracing/intel_th/msu.c: In function msc_win_switch:
> drivers/hwtracing/intel_th/msu.c:1389:21: warning: variable last set but
> not used [-Wunused-but-set-variable]
Fix it by removing the variable.
Signed-off-by: YueHaibing <yuehaibing(a)huawei.com>
Fixes: aad14ad3cf3a ("intel_th: msu: Add current window tracking")
Reviewed-by: Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin(a)linux.intel.com>
Cc: stable <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20190621161930.60785-3-alexander.shishkin@linux.i…
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/hwtracing/intel_th/msu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c
index 8c568b5c8920..6bfce03c6489 100644
--- a/drivers/hwtracing/intel_th/msu.c
+++ b/drivers/hwtracing/intel_th/msu.c
@@ -1400,10 +1400,9 @@ static int intel_th_msc_init(struct msc *msc)
static void msc_win_switch(struct msc *msc)
{
- struct msc_window *last, *first;
+ struct msc_window *first;
first = list_first_entry(&msc->win_list, struct msc_window, entry);
- last = list_last_entry(&msc->win_list, struct msc_window, entry);
if (msc_is_last_win(msc->cur_win))
msc->cur_win = first;
--
2.22.0
This is a note to let you know that I've just added the patch titled
intel_th: msu: Fix unused variable warning on arm64 platform
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the char-misc-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
>From b96fb368b08f1637cbf780a6b83e36c2c5ed4ff5 Mon Sep 17 00:00:00 2001
From: Shaokun Zhang <zhangshaokun(a)hisilicon.com>
Date: Fri, 21 Jun 2019 19:19:27 +0300
Subject: intel_th: msu: Fix unused variable warning on arm64 platform
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Commit ba39bd8306057 ("intel_th: msu: Switch over to scatterlist")
introduced the following warnings on non-x86 architectures, as a result
of reordering the multi mode buffer allocation sequence:
> drivers/hwtracing/intel_th/msu.c: In function ‘msc_buffer_win_alloc’:
> drivers/hwtracing/intel_th/msu.c:783:21: warning: unused variable ‘i’
> [-Wunused-variable]
> int ret = -ENOMEM, i;
> ^
> drivers/hwtracing/intel_th/msu.c: In function ‘msc_buffer_win_free’:
> drivers/hwtracing/intel_th/msu.c:863:6: warning: unused variable ‘i’
> [-Wunused-variable]
> int i;
> ^
Fix this compiler warning by factoring out set_memory sequences and making
them x86-only.
Suggested-by: Alexander Shishkin <alexander.shishkin(a)linux.intel.com>
Signed-off-by: Shaokun Zhang <zhangshaokun(a)hisilicon.com>
Fixes: ba39bd8306057 ("intel_th: msu: Switch over to scatterlist")
Reviewed-by: Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin(a)linux.intel.com>
Cc: stable <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/20190621161930.60785-2-alexander.shishkin@linux.i…
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/hwtracing/intel_th/msu.c | 40 +++++++++++++++++++++-----------
1 file changed, 27 insertions(+), 13 deletions(-)
diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c
index 81bb54fa3ce8..8c568b5c8920 100644
--- a/drivers/hwtracing/intel_th/msu.c
+++ b/drivers/hwtracing/intel_th/msu.c
@@ -767,6 +767,30 @@ static int __msc_buffer_win_alloc(struct msc_window *win,
return -ENOMEM;
}
+#ifdef CONFIG_X86
+static void msc_buffer_set_uc(struct msc_window *win, unsigned int nr_blocks)
+{
+ int i;
+
+ for (i = 0; i < nr_blocks; i++)
+ /* Set the page as uncached */
+ set_memory_uc((unsigned long)msc_win_block(win, i), 1);
+}
+
+static void msc_buffer_set_wb(struct msc_window *win)
+{
+ int i;
+
+ for (i = 0; i < win->nr_blocks; i++)
+ /* Reset the page to write-back */
+ set_memory_wb((unsigned long)msc_win_block(win, i), 1);
+}
+#else /* !X86 */
+static inline void
+msc_buffer_set_uc(struct msc_window *win, unsigned int nr_blocks) {}
+static inline void msc_buffer_set_wb(struct msc_window *win) {}
+#endif /* CONFIG_X86 */
+
/**
* msc_buffer_win_alloc() - alloc a window for a multiblock mode
* @msc: MSC device
@@ -780,7 +804,7 @@ static int __msc_buffer_win_alloc(struct msc_window *win,
static int msc_buffer_win_alloc(struct msc *msc, unsigned int nr_blocks)
{
struct msc_window *win;
- int ret = -ENOMEM, i;
+ int ret = -ENOMEM;
if (!nr_blocks)
return 0;
@@ -811,11 +835,7 @@ static int msc_buffer_win_alloc(struct msc *msc, unsigned int nr_blocks)
if (ret < 0)
goto err_nomem;
-#ifdef CONFIG_X86
- for (i = 0; i < ret; i++)
- /* Set the page as uncached */
- set_memory_uc((unsigned long)msc_win_block(win, i), 1);
-#endif
+ msc_buffer_set_uc(win, ret);
win->nr_blocks = ret;
@@ -860,8 +880,6 @@ static void __msc_buffer_win_free(struct msc *msc, struct msc_window *win)
*/
static void msc_buffer_win_free(struct msc *msc, struct msc_window *win)
{
- int i;
-
msc->nr_pages -= win->nr_blocks;
list_del(&win->entry);
@@ -870,11 +888,7 @@ static void msc_buffer_win_free(struct msc *msc, struct msc_window *win)
msc->base_addr = 0;
}
-#ifdef CONFIG_X86
- for (i = 0; i < win->nr_blocks; i++)
- /* Reset the page to write-back */
- set_memory_wb((unsigned long)msc_win_block(win, i), 1);
-#endif
+ msc_buffer_set_wb(win);
__msc_buffer_win_free(msc, win);
--
2.22.0
WRITE SAME corrupts data on the block device behind iblock if the
command is emulated. The emulation code issues (M - 1) * N times more
bios than requested, where M is the number of 512 blocks per real block
size and N is the NUMBER OF LOGICAL BLOCKS specified in WRITE SAME
command. So, for a device with 4k blocks, 7 * N more LBAs gets written
after the requested range.
The issue happens because the number of 512 byte sectors to be written
is decreased one by one while the real bios are typically from 1 to 8
512 byte sectors per bio.
Fixes: c66ac9db8d4a ("[SCSI] target: Add LIO target core v4.0.0-rc6")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Roman Bolshakov <r.bolshakov(a)yadro.com>
Reviewed-by: Bart Van Assche <bvanassche(a)acm.org>
---
drivers/target/target_core_iblock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
index f4a075303e9a..6949ea8bc387 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -502,7 +502,7 @@ iblock_execute_write_same(struct se_cmd *cmd)
/* Always in 512 byte units for Linux/Block */
block_lba += sg->length >> SECTOR_SHIFT;
- sectors -= 1;
+ sectors -= sg->length >> SECTOR_SHIFT;
}
iblock_submit_bios(&list);
--
2.22.0
I'm announcing the release of the 5.1.16 kernel.
All users of the 5.1 kernel series must upgrade.
The updated 5.1.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.1.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/robust-futexes.txt | 3
Makefile | 2
arch/arm64/Makefile | 2
arch/arm64/include/asm/futex.h | 4
arch/arm64/include/asm/insn.h | 8
arch/arm64/kernel/insn.c | 40 +++
arch/arm64/net/bpf_jit.h | 4
arch/arm64/net/bpf_jit_comp.c | 28 +-
arch/mips/include/asm/mips-gic.h | 30 ++
arch/x86/kernel/cpu/bugs.c | 11
arch/x86/kernel/cpu/microcode/core.c | 15 -
arch/x86/kernel/cpu/resctrl/rdtgroup.c | 35 +-
drivers/clk/socfpga/clk-s10.c | 4
drivers/clk/tegra/clk-tegra210.c | 2
drivers/firmware/efi/efi.c | 12
drivers/gpu/drm/i915/i915_drv.h | 6
drivers/gpu/drm/i915/intel_audio.c | 62 ++++
drivers/gpu/drm/i915/intel_cdclk.c | 185 ++++++++++----
drivers/gpu/drm/i915/intel_display.c | 57 +++-
drivers/gpu/drm/i915/intel_drv.h | 21 +
drivers/infiniband/core/addr.c | 16 -
drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 5
drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 5
drivers/irqchip/irq-mips-gic.c | 4
drivers/md/dm-init.c | 6
drivers/md/dm-log-writes.c | 23 +
drivers/net/bonding/bond_main.c | 2
drivers/net/ethernet/aquantia/atlantic/aq_filters.c | 10
drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 1
drivers/net/ethernet/aquantia/atlantic/aq_nic.h | 1
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 19 -
drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 2
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 22 +
drivers/net/team/team.c | 2
drivers/net/tun.c | 19 -
drivers/net/usb/qmi_wwan.c | 2
drivers/scsi/vmw_pvscsi.c | 6
fs/binfmt_flat.c | 23 -
fs/inode.c | 2
fs/io_uring.c | 5
fs/nfs/flexfilelayout/flexfilelayoutdev.c | 2
fs/notify/fanotify/fanotify.c | 4
fs/notify/mark.c | 14 -
fs/proc/array.c | 2
include/asm-generic/futex.h | 8
include/linux/bpf-cgroup.h | 8
include/linux/fsnotify_backend.h | 4
include/linux/xarray.h | 1
include/net/tls.h | 15 -
include/uapi/linux/bpf.h | 6
kernel/bpf/lpm_trie.c | 9
kernel/bpf/syscall.c | 8
kernel/bpf/verifier.c | 12
kernel/cpu.c | 3
kernel/trace/bpf_trace.c | 100 ++++++-
kernel/trace/trace_branch.c | 4
lib/xarray.c | 12
mm/hugetlb.c | 29 +-
mm/memory-failure.c | 7
mm/mempolicy.c | 2
mm/page_idle.c | 4
mm/page_io.c | 7
net/core/filter.c | 2
net/core/sock.c | 3
net/ipv4/raw.c | 2
net/ipv4/udp.c | 10
net/ipv6/udp.c | 8
net/packet/af_packet.c | 23 +
net/packet/internal.h | 1
net/sctp/endpointola.c | 8
net/sunrpc/xprtsock.c | 16 -
net/tipc/core.c | 12
net/tipc/netlink_compat.c | 18 +
net/tipc/udp_media.c | 8
net/tls/tls_main.c | 3
tools/testing/selftests/bpf/test_lpm_map.c | 41 ++-
76 files changed, 829 insertions(+), 293 deletions(-)
Alejandro Jimenez (1):
x86/speculation: Allow guests to use SSBD even if host does not
Amir Goldstein (1):
fanotify: update connector fsid cache on add mark
Ard Biesheuvel (1):
efi/memreserve: deal with memreserve entries in unmapped memory
Bjørn Mork (1):
qmi_wwan: Fix out-of-bounds read
Colin Ian King (1):
mm/page_idle.c: fix oops because end_pfn is larger than max_pfn
Daniel Borkmann (2):
bpf: fix unconnected udp hooks
bpf, arm64: use more scalable stadd over ldxr / stxr loop in xadd
Dinh Nguyen (1):
clk: socfpga: stratix10: fix divider entry for the emac clocks
Dirk van der Merwe (1):
net/tls: fix page double free on TX cleanup
Dmitry Bogdanov (1):
net: aquantia: fix vlans not working over bridged network
Eric Dumazet (1):
net/packet: fix memory leak in packet_set_ring()
Fei Li (1):
tun: wake up waitqueues after IFF_UP is set
Geert Uytterhoeven (1):
cpu/speculation: Warn on unsupported mitigations= parameter
Gen Zhang (1):
dm init: fix incorrect uses of kstrndup()
Greg Kroah-Hartman (1):
Linux 5.1.16
Huang Ying (1):
mm, swap: fix THP swap out
Imre Deak (2):
drm/i915: Save the old CDCLK atomic state
drm/i915: Remove redundant store of logical CDCLK state
Jan Kara (1):
scsi: vmw_pscsi: Fix use-after-free in pvscsi_queue_lck()
Jann Horn (1):
fs/binfmt_flat.c: make load_flat_shared_library() work
Jason Gunthorpe (1):
RDMA: Directly cast the sockaddr union to sockaddr
Jean-Philippe Brucker (1):
arm64: insn: Fix ldadd instruction encoding
Jens Axboe (1):
io_uring: ensure req->file is cleared on allocation
JingYi Hou (1):
net: remove duplicate fetch in sock_getsockopt
Johannes Weiner (1):
mm: fix page cache convergence regression
John Ogness (1):
fs/proc/array.c: allow reporting eip/esp for all coredumping threads
Jon Hunter (1):
clk: tegra210: Fix default rates for HDA clocks
Jonathan Lemon (1):
bpf: lpm_trie: check left child of last leftmost node for NULL
Martin KaFai Lau (2):
bpf: udp: Avoid calling reuseport's bpf_prog from udp_gro
bpf: udp: ipv6: Avoid running reuseport's bpf_prog from __udp6_lib_err
Martynas Pumputis (1):
bpf: simplify definition of BPF_FIB_LOOKUP related flags
Matt Mullins (1):
bpf: fix nested bpf tracepoints with per-cpu data
Naoya Horiguchi (2):
mm: soft-offline: return -EBUSY if set_hwpoison_free_buddy_page() fails
mm: hugetlb: soft-offline: dissolve_free_huge_page() return zero on !PageHuge
Nathan Chancellor (1):
arm64: Don't unconditionally add -Wno-psabi to KBUILD_CFLAGS
Neil Horman (1):
af_packet: Block execution of tasks waiting for transmit to complete in AF_PACKET
Paul Burton (1):
irqchip/mips-gic: Use the correct local interrupt map registers
Reinette Chatre (1):
x86/resctrl: Prevent possible overrun during bitmap operations
Roland Hii (2):
net: stmmac: fixed new system time seconds value calculation
net: stmmac: set IC bit when transmitting frames with HW timestamp
Sasha Levin (1):
Revert "x86/uaccess, ftrace: Fix ftrace_likely_update() vs. SMAP"
Stephen Suryaputra (1):
ipv4: Use return value of inet_iif() for __raw_v4_lookup in the while loop
Thomas Gleixner (1):
x86/microcode: Fix the microcode load on CPU hotplug for real
Trond Myklebust (2):
NFS/flexfiles: Use the correct TCP timeout for flexfiles I/O
SUNRPC: Fix up calculation of client message length
Ville Syrjälä (2):
drm/i915: Force 2*96 MHz cdclk on glk/cnl when audio power is enabled
drm/i915: Skip modeset for cdclk changes if possible
Will Deacon (2):
arm64: futex: Avoid copying out uninitialised stack in failed cmpxchg()
futex: Update comments and docs about return values of arch futex code
Xin Long (4):
sctp: change to hold sk after auth shkey is created successfully
tipc: change to use register_pernet_device
tipc: check msg->req data len in tipc_nl_compat_bearer_disable
tipc: pass tunnel dev as NULL to udp_tunnel(6)_xmit_skb
YueHaibing (2):
bonding: Always enable vlan tx offload
team: Always enable vlan tx offload
zhangyi (F) (1):
dm log writes: make sure super sector log updates are written in order
zhong jiang (1):
mm/mempolicy.c: fix an incorrect rebind node in mpol_rebind_nodemask