The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From c9dccacfccc72c32692eedff4a27a4b0833a2afd Mon Sep 17 00:00:00 2001
From: Vincent Whitchurch <vincent.whitchurch(a)axis.com>
Date: Thu, 11 Jul 2019 16:29:37 +0200
Subject: [PATCH] printk: Do not lose last line in kmsg buffer dump
kmsg_dump_get_buffer() is supposed to select all the youngest log
messages which fit into the provided buffer. It determines the correct
start index by using msg_print_text() with a NULL buffer to calculate
the size of each entry. However, when performing the actual writes,
msg_print_text() only writes the entry to the buffer if the written len
is lesser than the size of the buffer. So if the lengths of the
selected youngest log messages happen to precisely fill up the provided
buffer, the last log message is not included.
We don't want to modify msg_print_text() to fill up the buffer and start
returning a length which is equal to the size of the buffer, since
callers of its other users, such as kmsg_dump_get_line(), depend upon
the current behaviour.
Instead, fix kmsg_dump_get_buffer() to compensate for this.
For example, with the following two final prints:
[ 6.427502] AAAAAAAAAAAAA
[ 6.427769] BBBBBBBB12345
A dump of a 64-byte buffer filled by kmsg_dump_get_buffer(), before this
patch:
00000000: 3c 30 3e 5b 20 20 20 20 36 2e 35 32 32 31 39 37 <0>[ 6.522197
00000010: 5d 20 41 41 41 41 41 41 41 41 41 41 41 41 41 0a ] AAAAAAAAAAAAA.
00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
After this patch:
00000000: 3c 30 3e 5b 20 20 20 20 36 2e 34 35 36 36 37 38 <0>[ 6.456678
00000010: 5d 20 42 42 42 42 42 42 42 42 31 32 33 34 35 0a ] BBBBBBBB12345.
00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Link: http://lkml.kernel.org/r/20190711142937.4083-1-vincent.whitchurch@axis.com
Fixes: e2ae715d66bf4bec ("kmsg - kmsg_dump() use iterator to receive log buffer content")
To: rostedt(a)goodmis.org
Cc: linux-kernel(a)vger.kernel.org
Cc: <stable(a)vger.kernel.org> # v3.5+
Signed-off-by: Vincent Whitchurch <vincent.whitchurch(a)axis.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com>
Signed-off-by: Petr Mladek <pmladek(a)suse.com>
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 1888f6a3b694..424abf802f02 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -3274,7 +3274,7 @@ bool kmsg_dump_get_buffer(struct kmsg_dumper *dumper, bool syslog,
/* move first record forward until length fits into the buffer */
seq = dumper->cur_seq;
idx = dumper->cur_idx;
- while (l > size && seq < dumper->next_seq) {
+ while (l >= size && seq < dumper->next_seq) {
struct printk_log *msg = log_from_idx(idx);
l -= msg_print_text(msg, true, time, NULL, 0);
The patch below does not apply to the 5.3-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From bd9c10bc663dd2eaac8fe39dad0f18cd21527446 Mon Sep 17 00:00:00 2001
From: Jan-Marek Glogowski <glogow(a)fbihome.de>
Date: Sun, 15 Sep 2019 16:57:28 +0200
Subject: [PATCH] ALSA: hda/realtek - PCI quirk for Medion E4254
The laptop has a combined jack to attach headsets on the right.
The BIOS encodes them as two different colored jacks at the front,
but otherwise it seems to be configured ok. But any adaption of
the pins config on its own doesn't fix the jack detection to work
in Linux. Still Windows works correct.
This is somehow fixed by chaining ALC256_FIXUP_ASUS_HEADSET_MODE,
which seems to register the microphone jack as a headset part and
also results in fixing jack sensing, visible in dmesg as:
-snd_hda_codec_realtek hdaudioC0D0: Mic=0x19
+snd_hda_codec_realtek hdaudioC0D0: Headset Mic=0x19
[ Actually the essential change is the location of the jack; the
driver created "Front Mic Jack" without the matching volume / mute
control element due to its jack location, which confused PA.
-- tiwai ]
Signed-off-by: Jan-Marek Glogowski <glogow(a)fbihome.de>
Cc: <stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/8f4f9b20-0aeb-f8f1-c02f-fd53c09679f1@fbihome.de
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index e27ef434b60d..b000b36ac3c6 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5872,6 +5872,7 @@ enum {
ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
ALC299_FIXUP_PREDATOR_SPK,
ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC,
+ ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE,
};
static const struct hda_fixup alc269_fixups[] = {
@@ -6937,6 +6938,16 @@ static const struct hda_fixup alc269_fixups[] = {
.chained = true,
.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
},
+ [ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE] = {
+ .type = HDA_FIXUP_PINS,
+ .v.pins = (const struct hda_pintbl[]) {
+ { 0x19, 0x04a11040 },
+ { 0x21, 0x04211020 },
+ { }
+ },
+ .chained = true,
+ .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
+ },
};
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -7200,6 +7211,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),
SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
+ SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE),
#if 0
/* Below is a quirk table taken from the old code.
@@ -7368,6 +7380,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
{.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-chrome-book"},
{.id = ALC299_FIXUP_PREDATOR_SPK, .name = "predator-spk"},
{.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"},
+ {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"},
{}
};
#define ALC225_STANDARD_PINS \
This is the start of the stable review cycle for the 5.2.18 release.
There are 45 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Tue 01 Oct 2019 01:47:47 PM UTC.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.2.18-rc1…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.2.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.2.18-rc1
Ka-Cheong Poon <ka-cheong.poon(a)oracle.com>
net/rds: An rds_sock is added too early to the hash table
Cong Wang <xiyou.wangcong(a)gmail.com>
net_sched: check cops->tcf_block in tc_bind_tclass()
Jian-Hong Pan <jian-hong(a)endlessm.com>
Bluetooth: btrtl: Additional Realtek 8822CE Bluetooth devices
Fernando Fernandez Mancera <ffmancera(a)riseup.net>
netfilter: nft_socket: fix erroneous socket assignment
Florian Westphal <fw(a)strlen.de>
xfrm: policy: avoid warning splat when merging nodes
Darrick J. Wong <darrick.wong(a)oracle.com>
xfs: don't crash on null attr fork xfs_bmapi_read
Ilia Mirkin <imirkin(a)alum.mit.edu>
drm/nouveau/disp/nv50-: fix center/aspect-corrected scaling
Hans de Goede <hdegoede(a)redhat.com>
ACPI: video: Add new hw_changes_brightness quirk, set it on PB Easynote MZ35
Jian-Hong Pan <jian-hong(a)endlessm.com>
Bluetooth: btrtl: HCI reset on close for Realtek BT chip
Stephen Hemminger <stephen(a)networkplumber.org>
net: don't warn in inet diag when IPV6 is disabled
Ville Syrjälä <ville.syrjala(a)linux.intel.com>
drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT
Chris Wilson <chris(a)chris-wilson.co.uk>
drm: Flush output polling on shutdown
Chao Yu <yuchao0(a)huawei.com>
f2fs: fix to do sanity check on segment bitmap of LFS curseg
Michal Suchanek <msuchanek(a)suse.de>
net/ibmvnic: Fix missing { in __ibmvnic_reset
Mikulas Patocka <mpatocka(a)redhat.com>
dm zoned: fix invalid memory access
Chao Yu <yuchao0(a)huawei.com>
Revert "f2fs: avoid out-of-range memory access"
Josh Poimboeuf <jpoimboe(a)redhat.com>
objtool: Clobber user CFLAGS variable
Heikki Krogerus <heikki.krogerus(a)linux.intel.com>
platform/x86: i2c-multi-instantiate: Derive the device name from parent
Takashi Iwai <tiwai(a)suse.de>
ALSA: hda - Apply AMD controller workaround for Raven platform
Shih-Yuan Lee (FourDollars) <fourdollars(a)debian.org>
ALSA: hda - Add laptop imic fixup for ASUS M9V laptop
Takashi Sakamoto <o-takashi(a)sakamocchi.jp>
ALSA: dice: fix wrong packet parameter for Alesis iO26
Jussi Laako <jussi(a)sonarnerd.net>
ALSA: usb-audio: Add DSD support for EVGA NU Audio
Ilya Pshonkin <sudokamikaze(a)protonmail.com>
ALSA: usb-audio: Add Hiby device family to quirks for native DSD support
Vitaly Wool <vitalywool(a)gmail.com>
Revert "mm/z3fold.c: fix race between migration and destruction"
Benjamin Tissoires <benjamin.tissoires(a)redhat.com>
Revert "HID: logitech-hidpp: add USB PID for a few more supported mice"
Peng Fan <peng.fan(a)nxp.com>
clk: imx: imx8mm: fix audio pll setting
Gustavo A. R. Silva <gustavo(a)embeddedor.com>
crypto: talitos - fix missing break in switch statement
Tokunori Ikegami <ikegami.t(a)gmail.com>
mtd: cfi_cmdset_0002: Use chip_good() to retry in do_write_oneword()
Sebastian Parschauer <s.parschauer(a)gmx.de>
HID: Add quirk for HP X500 PIXART OEM mouse
Alan Stern <stern(a)rowland.harvard.edu>
HID: hidraw: Fix invalid read in hidraw_ioctl
Hans de Goede <hdegoede(a)redhat.com>
HID: logitech-dj: Fix crash when initial logi_dj_recv_query_paired_devices fails
Alan Stern <stern(a)rowland.harvard.edu>
HID: logitech: Fix general protection fault caused by Logitech driver
Roderick Colenbrander <roderick.colenbrander(a)sony.com>
HID: sony: Fix memory corruption issue on cleanup.
Alan Stern <stern(a)rowland.harvard.edu>
HID: prodikeys: Fix general protection fault during probe
David S. Miller <davem(a)davemloft.net>
Revert "net: hns: fix LED configuration for marvell phy"
Nick Desaulniers <ndesaulniers(a)google.com>
drm/amd/display: readd -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines
Greg Kurz <groug(a)kaod.org>
powerpc/xive: Fix bogus error code returned by OPAL
Nicholas Kazlauskas <nicholas.kazlauskas(a)amd.com>
drm/amd/display: Don't replace the dc_state for fast updates
Nicholas Kazlauskas <nicholas.kazlauskas(a)amd.com>
drm/amd/display: Skip determining update type for async updates
Nicholas Kazlauskas <nicholas.kazlauskas(a)amd.com>
drm/amd/display: Allow cursor async updates for framebuffer swaps
Juliet Kim <julietk(a)linux.vnet.ibm.com>
net/ibmvnic: free reset work of removed device from queue
Bjorn Andersson <bjorn.andersson(a)linaro.org>
phy: qcom-qmp: Correct ready status, again
Marc Gonzalez <marc.w.gonzalez(a)free.fr>
phy: qcom-qmp: Raise qcom_qmp_phy_enable() polling delay
Steve French <stfrench(a)microsoft.com>
smb3: fix unmount hang in open_shroot
Marcel Holtmann <marcel(a)holtmann.org>
Revert "Bluetooth: validate BLE connection interval updates"
-------------
Diffstat:
Makefile | 4 +-
arch/powerpc/include/asm/opal.h | 2 +-
arch/powerpc/platforms/powernv/opal-call.c | 2 +-
arch/powerpc/sysdev/xive/native.c | 11 +++
drivers/acpi/acpi_video.c | 37 ++++++++++
drivers/bluetooth/btrtl.c | 20 +++++
drivers/bluetooth/btrtl.h | 6 ++
drivers/bluetooth/btusb.c | 4 +
drivers/clk/imx/clk-imx8mm.c | 4 +-
drivers/crypto/talitos.c | 1 +
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 56 ++++++++++----
drivers/gpu/drm/amd/display/dc/calcs/Makefile | 4 +
drivers/gpu/drm/amd/display/dc/dml/Makefile | 4 +
drivers/gpu/drm/drm_dp_helper.c | 4 +-
drivers/gpu/drm/drm_probe_helper.c | 9 ++-
drivers/gpu/drm/nouveau/dispnv50/head.c | 28 ++++++-
drivers/hid/hid-ids.h | 1 +
drivers/hid/hid-lg.c | 10 ++-
drivers/hid/hid-lg4ff.c | 1 -
drivers/hid/hid-logitech-dj.c | 10 +--
drivers/hid/hid-logitech-hidpp.c | 20 -----
drivers/hid/hid-prodikeys.c | 12 ++-
drivers/hid/hid-quirks.c | 1 +
drivers/hid/hid-sony.c | 2 +-
drivers/hid/hidraw.c | 2 +-
drivers/md/dm-zoned-target.c | 2 -
drivers/mtd/chips/cfi_cmdset_0002.c | 18 +++--
drivers/net/ethernet/hisilicon/hns/hns_enet.c | 23 +-----
drivers/net/ethernet/ibm/ibmvnic.c | 9 ++-
drivers/phy/qualcomm/phy-qcom-qmp.c | 33 ++++-----
drivers/platform/x86/i2c-multi-instantiate.c | 2 +-
fs/cifs/smb2ops.c | 21 +++---
fs/f2fs/segment.c | 44 +++++++++--
fs/xfs/libxfs/xfs_bmap.c | 29 ++++++--
include/drm/drm_dp_helper.h | 7 ++
mm/z3fold.c | 90 -----------------------
net/bluetooth/hci_event.c | 5 --
net/bluetooth/l2cap_core.c | 9 +--
net/ipv4/raw_diag.c | 3 -
net/netfilter/nft_socket.c | 6 +-
net/rds/bind.c | 40 +++++-----
net/sched/sch_api.c | 2 +
net/xfrm/xfrm_policy.c | 6 +-
sound/firewire/dice/dice-alesis.c | 2 +-
sound/pci/hda/hda_intel.c | 3 +-
sound/pci/hda/patch_analog.c | 1 +
sound/usb/quirks.c | 2 +
tools/objtool/Makefile | 2 +-
tools/testing/selftests/net/xfrm_policy.sh | 7 ++
49 files changed, 349 insertions(+), 272 deletions(-)
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: vivid: Set vid_cap_streaming and vid_out_streaming to true
Author: Vandana BN <bnvandana(a)gmail.com>
Date: Mon Sep 9 06:43:31 2019 -0300
When vbi stream is started, followed by video streaming,
the vid_cap_streaming and vid_out_streaming were not being set to true,
which would cause the video stream to stop when vbi stream is stopped.
This patch allows to set vid_cap_streaming and vid_out_streaming to true.
According to Hans Verkuil it appears that these 'if (dev->kthread_vid_cap)'
checks are a left-over from the original vivid development and should never
have been there.
Signed-off-by: Vandana BN <bnvandana(a)gmail.com>
Cc: <stable(a)vger.kernel.org> # for v3.18 and up
Signed-off-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung(a)kernel.org>
drivers/media/platform/vivid/vivid-vid-cap.c | 3 ---
drivers/media/platform/vivid/vivid-vid-out.c | 3 ---
2 files changed, 6 deletions(-)
---
diff --git a/drivers/media/platform/vivid/vivid-vid-cap.c b/drivers/media/platform/vivid/vivid-vid-cap.c
index 8cbaa0c998ed..2d030732feac 100644
--- a/drivers/media/platform/vivid/vivid-vid-cap.c
+++ b/drivers/media/platform/vivid/vivid-vid-cap.c
@@ -223,9 +223,6 @@ static int vid_cap_start_streaming(struct vb2_queue *vq, unsigned count)
if (vb2_is_streaming(&dev->vb_vid_out_q))
dev->can_loop_video = vivid_vid_can_loop(dev);
- if (dev->kthread_vid_cap)
- return 0;
-
dev->vid_cap_seq_count = 0;
dprintk(dev, 1, "%s\n", __func__);
for (i = 0; i < VIDEO_MAX_FRAME; i++)
diff --git a/drivers/media/platform/vivid/vivid-vid-out.c b/drivers/media/platform/vivid/vivid-vid-out.c
index 148b663a6075..a0364ac497f9 100644
--- a/drivers/media/platform/vivid/vivid-vid-out.c
+++ b/drivers/media/platform/vivid/vivid-vid-out.c
@@ -161,9 +161,6 @@ static int vid_out_start_streaming(struct vb2_queue *vq, unsigned count)
if (vb2_is_streaming(&dev->vb_vid_cap_q))
dev->can_loop_video = vivid_vid_can_loop(dev);
- if (dev->kthread_vid_out)
- return 0;
-
dev->vid_out_seq_count = 0;
dprintk(dev, 1, "%s\n", __func__);
if (dev->start_streaming_error) {