4.6.5-stable review
Subsystems (3)
Greg Kroah-Hartman
maintainerPATCH 113/203 virtio_balloon: fix PFN format for virtio-1
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael S. Tsirkin <[email protected]>
commit 87c9403b0d1de4676b0bd273eea68fcf6de68e68 upstream.
Everything should be LE when using virtio-1, but the linux balloon driver does not seem to care about that.
--- drivers/virtio/virtio_balloon.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-)
drivers/virtio/virtio_balloon.c +12 -8
@@ -75,7 +75,7 @@ struct virtio_balloon {/* The array of pfns we tell the Host about. */ unsigned int num_pfns; -u32 pfns[VIRTIO_BALLOON_ARRAY_PFNS_MAX ]; +__virtio32 pfns[VIRTIO_BALLOON_ARRAY_PFNS_MAX ];/* Memory statistics */ struct virtio_balloon_stat stats[VIRTIO_BALLOON_S_NR ];
@@ -127,14 +127,16 @@ static void tell_host(struct virtio_ball } -static void set_page_pfns (u32 pfns[],struct page *page) +static void set_page_pfns (struct virtio_balloon *vb, +__virtio32 pfns[],struct page *page) {unsigned int i;/* Set balloon pfns pointing at this page. * Note that the first pfn points at start of the page. */ for (i =0 ; i <VIRTIO_BALLOON_PAGES_PER_PAGE ; i++) - pfns[i] =page_to_balloon_pfn (page) + i; + pfns[i] =cpu_to_virtio32 (vb->vdev, +page_to_balloon_pfn (page) + i); }static unsigned fill_balloon (struct virtio_balloon *vb,size_t num)
@@ -158,7 +160,7 @@ static unsigned fill_balloon(struct virtmsleep (200 );break ; } -set_page_pfns (vb->pfns + vb->num_pfns, page); +set_page_pfns (vb, vb->pfns + vb->num_pfns, page); vb->num_pages +=VIRTIO_BALLOON_PAGES_PER_PAGE ;if (!virtio_has_feature (vb->vdev,VIRTIO_BALLOON_F_DEFLATE_ON_OOM ))
@@ -177,10 +179,12 @@ static unsigned fill_balloon(struct virtstatic void release_pages_balloon (struct virtio_balloon *vb) {unsigned int i; +struct page *page;/* Find pfns pointing at start of each page, get pages and free them. */ for (i =0 ; i < vb->num_pfns; i +=VIRTIO_BALLOON_PAGES_PER_PAGE ) { -struct page *page =balloon_pfn_to_page (vb->pfns[i]); + page =balloon_pfn_to_page (virtio32_to_cpu (vb->vdev, + vb->pfns[i]));if (!virtio_has_feature (vb->vdev,VIRTIO_BALLOON_F_DEFLATE_ON_OOM ))adjust_managed_page_count (page,1 );
@@ -203,7 +207,7 @@ static unsigned leak_balloon(struct virt page =balloon_page_dequeue (vb_dev_info);if (!page)break ; -set_page_pfns (vb->pfns + vb->num_pfns, page); +set_page_pfns (vb, vb->pfns + vb->num_pfns, page); vb->num_pages -=VIRTIO_BALLOON_PAGES_PER_PAGE ; }
@@ -471,13 +475,13 @@ static int virtballoon_migratepage(struc__count_vm_event (BALLOON_MIGRATE );spin_unlock_irqrestore (&vb_dev_info->pages_lock, flags); vb->num_pfns =VIRTIO_BALLOON_PAGES_PER_PAGE ; -set_page_pfns (vb->pfns, newpage); +set_page_pfns (vb, vb->pfns, newpage);tell_host (vb, vb->inflate_vq);/* balloon's page migration 2nd step -- deflate "page" */ balloon_page_delete (page); vb->num_pfns =VIRTIO_BALLOON_PAGES_PER_PAGE ; -set_page_pfns (vb->pfns, page); +set_page_pfns (vb, vb->pfns, page);tell_host (vb, vb->deflate_vq);mutex_unlock (&vb->balloon_lock);
Greg Kroah-Hartman
maintainerPATCH 166/203 ALSA: hdac_regmap - fix the register access for runtime PM
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jaroslav Kysela <[email protected]>
commit 8198868f0a283eb23e264951632ce61ec2f82228 upstream.
Call path:
1) snd_hdac_power_up_pm()
2) snd_hdac_power_up()
3) pm_runtime_get_sync()
4) __pm_runtime_resume()
5) rpm_resume()
The rpm_resume() returns 1 when the device is already active. Because the return value is unmodified, the hdac regmap read/write functions should allow this value for the retry I/O operation, too.
--- sound/hda/hdac_regmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/hda/hdac_regmap.c +2 -2
@@ -444,7 +444,7 @@ int snd_hdac_regmap_write_raw(struct hda err =reg_raw_write (codec, reg, val);if (err == -EAGAIN ) { err =snd_hdac_power_up_pm (codec); -if (!err) +if (err >=0 ) err =reg_raw_write (codec, reg, val);snd_hdac_power_down_pm (codec); }
@@ -470,7 +470,7 @@ static int __snd_hdac_regmap_read_raw(st err =reg_raw_read (codec, reg, val, uncached);if (err == -EAGAIN ) { err =snd_hdac_power_up_pm (codec); -if (!err) +if (err >=0 ) err =reg_raw_read (codec, reg, val, uncached);snd_hdac_power_down_pm (codec); }
Greg Kroah-Hartman
maintainerPATCH 167/203 ALSA: hda - Fix the headset mic jack detection on Dell machine
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Woodrow Shen <[email protected]>
commit f83c32925d45926cd0e0f18bf28e6039116c4486 upstream.
The new Dell laptop with codec 3246 can't detect headset mic when headset was inserted on the machine. So adding pin configurations into quirk table makes headset mic work correctly.
Codec: Realtek ALC3246
Vendor Id: 0x10ec0256
Subsystem Id: 0x10280781
--- sound/pci/hda/patch_realtek.c | 4 ++++ 1 file changed, 4 insertions(+)
sound/pci/hda/patch_realtek.c +4 -0
@@ -5832,6 +5832,10 @@ static const struct snd_hda_pin_quirk al {0x14, 0x90170120}, {0x21, 0x02211030}), SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, + {0x12, 0x90a60170}, + {0x14, 0x90170120}, + {0x21, 0x02211030}), + SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, ALC256_STANDARD_PINS), SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4, {0x12, 0x90a60130},
Greg Kroah-Hartman
maintainerPATCH 168/203 ALSA: hda / realtek - add two more Thinkpad IDs (5050,5053) for tpt460 fixup
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jaroslav Kysela <[email protected]>
commit 0f087ee3f3b86a4507db4ff1d2d5a3880e4cfd16 upstream.
See: https://bugzilla.redhat.com/show_bug.cgi?id=1349539
See: https://bugzilla.kernel.org/show_bug.cgi?id=120961
--- sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+)
sound/pci/hda/patch_realtek.c +2 -0
@@ -5650,6 +5650,8 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x17aa ,0x503c ,"Thinkpad L450" ,ALC292_FIXUP_TPT440_DOCK ),SND_PCI_QUIRK (0x17aa ,0x504a ,"ThinkPad X260" ,ALC292_FIXUP_TPT440_DOCK ),SND_PCI_QUIRK (0x17aa ,0x504b ,"Thinkpad" ,ALC293_FIXUP_LENOVO_SPK_NOISE ), +SND_PCI_QUIRK (0x17aa ,0x5050 ,"Thinkpad T560p" ,ALC292_FIXUP_TPT460 ), +SND_PCI_QUIRK (0x17aa ,0x5053 ,"Thinkpad T460" ,ALC292_FIXUP_TPT460 ),SND_PCI_QUIRK (0x17aa ,0x5109 ,"Thinkpad" ,ALC269_FIXUP_LIMIT_INT_MIC_BOOST ),SND_PCI_QUIRK (0x17aa ,0x3bf8 ,"Quanta FL1" ,ALC269_FIXUP_PCM_44K ), SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
Greg Kroah-Hartman
maintainerPATCH 170/203 ALSA: echoaudio: Fix memory allocation
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christophe JAILLET <[email protected]>
commit 9c6795a9b3cbb56a9fbfaf43909c5c22999ba317 upstream.
'commpage_bak' is allocated with 'sizeof(struct echoaudio)' bytes. We then copy 'sizeof(struct comm_page)' bytes in it.
On my system, smatch complains because one is 2960 and the other is 3072.
This would result in memory corruption or a oops.
--- sound/pci/echoaudio/echoaudio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/pci/echoaudio/echoaudio.c +2 -2
@@ -2200,11 +2200,11 @@ static int snd_echo_resume(struct deviceu32 pipe_alloc_mask;int err; - commpage_bak =kmalloc (sizeof (struct echoaudio ),GFP_KERNEL ); + commpage_bak =kmalloc (sizeof (*commpage),GFP_KERNEL );if (commpage_bak ==NULL )return -ENOMEM ; commpage = chip->comm_page; -memcpy (commpage_bak, commpage,sizeof (struct comm_page )); +memcpy (commpage_bak, commpage,sizeof (*commpage)); err =init_hw (chip, chip->pci->device, chip->pci->subsystem_device);if (err <0 ) {
Greg Kroah-Hartman
maintainerPATCH 172/203 ALSA: hda/realtek: Add Lenovo L460 to docking unit fixup
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Torsten Hilbrich <[email protected]>
commit 9cd25743765cfe851aed8d655a62d60156aed293 upstream.
This solves the issue that a headphone is not working on the docking unit.
--- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+)
sound/pci/hda/patch_realtek.c +1 -0
@@ -5651,6 +5651,7 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x17aa ,0x504a ,"ThinkPad X260" ,ALC292_FIXUP_TPT440_DOCK ),SND_PCI_QUIRK (0x17aa ,0x504b ,"Thinkpad" ,ALC293_FIXUP_LENOVO_SPK_NOISE ),SND_PCI_QUIRK (0x17aa ,0x5050 ,"Thinkpad T560p" ,ALC292_FIXUP_TPT460 ), +SND_PCI_QUIRK (0x17aa ,0x5051 ,"Thinkpad L460" ,ALC292_FIXUP_TPT460 ),SND_PCI_QUIRK (0x17aa ,0x5053 ,"Thinkpad T460" ,ALC292_FIXUP_TPT460 ),SND_PCI_QUIRK (0x17aa ,0x5109 ,"Thinkpad" ,ALC269_FIXUP_LIMIT_INT_MIC_BOOST ), SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),
Greg Kroah-Hartman
maintainerPATCH 156/203 iio: accel: kxsd9: fix the usage of spi_w8r8()
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Walleij <[email protected]>
commit 0c1f91b98552da49d9d8eed32b3132a58d2f4598 upstream.
These two spi_w8r8() calls return a value with is used by the code following the error check. The dubious use was caused by a cleanup patch.
--- drivers/iio/accel/kxsd9.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/accel/kxsd9.c +2 -2
@@ -81,7 +81,7 @@ static int kxsd9_write_scale(struct iio_mutex_lock (&st->buf_lock); ret =spi_w8r8 (st->us,KXSD9_READ (KXSD9_REG_CTRL_C )); -if (ret) +if (ret <0 ) goto error_ret; st->tx[0 ] =KXSD9_WRITE (KXSD9_REG_CTRL_C ); st->tx[1 ] = (ret & ~KXSD9_FS_MASK ) | i;
@@ -163,7 +163,7 @@ static int kxsd9_read_raw(struct iio_devbreak ;case IIO_CHAN_INFO_SCALE : ret =spi_w8r8 (st->us,KXSD9_READ (KXSD9_REG_CTRL_C )); -if (ret) +if (ret <0 ) goto error_ret; *val2 = kxsd9_micro_scales[ret &KXSD9_FS_MASK ]; ret =IIO_VAL_INT_PLUS_MICRO ;
Greg Kroah-Hartman
maintainerPATCH 165/203 ALSA: dummy: Fix a use-after-free at closing
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
commit d5dbbe6569481bf12dcbe3e12cff72c5f78d272c upstream.
syzkaller fuzzer spotted a potential use-after-free case in snd-dummy driver when hrtimer is used as backend:
Quoted 30 lines
==================================================================
BUG: KASAN: use-after-free in rb_erase+0x1b17/0x2010 at addr ffff88005e5b6f68 Read of size 8 by task syz-executor/8984 =============================================================================BUG kmalloc-192 (Not tainted): kasan: bad access detected
-----------------------------------------------------------------------------Disabling lock debugging due to kernel taint
INFO: Allocated in0xbbbbbbbbbbbbbbbbage=18446705582212484632
....
[< none >]dummy_hrtimer_create+0x49/0x1a0sound/drivers/dummy.c:464
....
INFO: Freed in0xfffd8e09age=18446705496313138713 cpu=2164287125 pid=-1
[< none >]dummy_hrtimer_free+0x68/0x80sound/drivers/dummy.c:481
....Call Trace: [<ffffffff8179e59e>] __asan_report_load8_noabort+0x3e/0x40 mm/kasan/report.c:333 [< inline >] rb_set_parent include/linux/rbtree_augmented.h:111 [< inline >] __rb_erase_augmented include/linux/rbtree_augmented.h:218 [<ffffffff82ca5787>] rb_erase+0x1b17/0x2010 lib/rbtree.c:427 [<ffffffff82cb02e8>] timerqueue_del+0x78/0x170 lib/timerqueue.c:86 [<ffffffff814d0c80>] __remove_hrtimer+0x90/0x220 kernel/time/hrtimer.c:903 [< inline >] remove_hrtimer kernel/time/hrtimer.c:945 [<ffffffff814d23da>] hrtimer_try_to_cancel+0x22a/0x570 kernel/time/hrtimer.c:1046 [<ffffffff814d2742>] hrtimer_cancel+0x22/0x40 kernel/time/hrtimer.c:1066 [<ffffffff85420531>] dummy_hrtimer_stop+0x91/0xb0 sound/drivers/dummy.c:417 [<ffffffff854228bf>] dummy_pcm_trigger+0x17f/0x1e0 sound/drivers/dummy.c:507 [<ffffffff85392170>] snd_pcm_do_stop+0x160/0x1b0 sound/core/pcm_native.c:1106 [<ffffffff85391b26>] snd_pcm_action_single+0x76/0x120 sound/core/pcm_native.c:956 [<ffffffff85391e01>] snd_pcm_action+0x231/0x290 sound/core/pcm_native.c:974
Quoted 8 lines
[< inline >] snd_pcm_stop sound/core/pcm_native.c:1139 [<ffffffff8539754d>] snd_pcm_drop+0x12d/0x1d0 sound/core/pcm_native.c:1784 [<ffffffff8539d3be>] snd_pcm_common_ioctl1+0xfae/0x2150 sound/core/pcm_native.c:2805 [<ffffffff8539ee91>] snd_pcm_capture_ioctl1+0x2a1/0x5e0 sound/core/pcm_native.c:2976 [<ffffffff8539f2ec>] snd_pcm_kernel_ioctl+0x11c/0x160 sound/core/pcm_native.c:3020 [<ffffffff853d9a44>] snd_pcm_oss_sync+0x3a4/0xa30 sound/core/oss/pcm_oss.c:1693 [<ffffffff853da27d>] snd_pcm_oss_release+0x1ad/0x280 sound/core/oss/pcm_oss.c:2483 .....
A workaround is to call hrtimer_cancel() in dummy_hrtimer_sync() which is called certainly before other blocking ops.
--- sound/drivers/dummy.c | 1 + 1 file changed, 1 insertion(+)
sound/drivers/dummy.c +1 -0
@@ -420,6 +420,7 @@ static int dummy_hrtimer_stop(struct sndstatic inline void dummy_hrtimer_sync (struct dummy_hrtimer_pcm *dpcm) { +hrtimer_cancel (&dpcm->timer);tasklet_kill (&dpcm->tasklet); }
Greg Kroah-Hartman
maintainerPATCH 174/203 ALSA: hda - fix read before array start
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bob Copeland <[email protected]>
commit 81e43960dce1c8e58e682fb3ec26c1d8f83a9afc upstream.
UBSAN reports the following warning from accessing path->path[-1] in set_path_power():
[ 16.078040] ================================================================================ [ 16.078124] UBSAN: Undefined behaviour in sound/pci/hda/hda_generic.c:3981:17 [ 16.078198] index -1 is out of range for type 'hda_nid_t [10]' [ 16.078270] CPU: 2 PID: 1738 Comm: modprobe Not tainted 4.7.0-rc1-wt+ #47 [ 16.078274] Hardware name: LENOVO 3443CTO/3443CTO, BIOS G6ET23WW (1.02 ) 08/14/2012 [ 16.078278] ffff8800cb246000 ffff8800cb3638b8 ffffffff815c4fe3 0000000000000032 [ 16.078286] ffff8800cb3638e0 ffffffffffffffff ffff8800cb3638d0 ffffffff8162443d [ 16.078294] ffffffffa0894200 ffff8800cb363920 ffffffff81624af7 0000000000000292 [ 16.078302] Call Trace: [ 16.078311] [<ffffffff815c4fe3>] dump_stack+0x86/0xd3 [ 16.078317] [<ffffffff8162443d>] ubsan_epilogue+0xd/0x40 [ 16.078324] [<ffffffff81624af7>] __ubsan_handle_out_of_bounds+0x67/0x70 [ 16.078335] [<ffffffffa087665f>] set_path_power+0x1bf/0x230 [snd_hda_codec_generic] [ 16.078344] [<ffffffffa087880d>] add_pin_power_ctls+0x8d/0xc0 [snd_hda_codec_generic] [ 16.078352] [<ffffffffa087f190>] ? pin_power_down_callback+0x20/0x20 [snd_hda_codec_generic] [ 16.078360] [<ffffffffa0878947>] add_all_pin_power_ctls+0x107/0x150 [snd_hda_codec_generic] [ 16.078370] [<ffffffffa08842b3>] snd_hda_gen_parse_auto_config+0x2d73/0x49e0 [snd_hda_codec_generic] [ 16.078376] [<ffffffff81173360>] ? trace_hardirqs_on_caller+0x1b0/0x2c0 [ 16.078390] [<ffffffffa089df27>] alc_parse_auto_config+0x147/0x310 [snd_hda_codec_realtek] [ 16.078402] [<ffffffffa08a332a>] patch_alc269+0x23a/0x560 [snd_hda_codec_realtek] [ 16.078417] [<ffffffffa0838644>] hda_codec_driver_probe+0xa4/0x1a0 [snd_hda_codec] [ 16.078424] [<ffffffff817bbac1>] driver_probe_device+0x101/0x380 [ 16.078430] [<ffffffff817bbdf9>] __driver_attach+0xb9/0x100 [ 16.078438] [<ffffffff817bbd40>] ? driver_probe_device+0x380/0x380 [ 16.078444] [<ffffffff817b8d20>] bus_for_each_dev+0x70/0xc0 [ 16.078449] [<ffffffff817bb087>] driver_attach+0x27/0x50 [ 16.078454] [<ffffffff817ba956>] bus_add_driver+0x166/0x2c0 [ 16.078460] [<ffffffffa0369000>] ? 0xffffffffa0369000 [ 16.078465] [<ffffffff817bd13d>] driver_register+0x7d/0x130 [ 16.078477] [<ffffffffa083816f>] __hda_codec_driver_register+0x6f/0x90 [snd_hda_codec] [ 16.078488] [<ffffffffa036901e>] realtek_driver_init+0x1e/0x1000 [snd_hda_codec_realtek] [ 16.078493] [<ffffffff8100215e>] do_one_initcall+0x4e/0x1d0 [ 16.078499] [<ffffffff8119f54d>] ? rcu_read_lock_sched_held+0x6d/0x80 [ 16.078504] [<ffffffff813701b1>] ? kmem_cache_alloc_trace+0x391/0x560 [ 16.078510] [<ffffffff812bb314>] ? do_init_module+0x28/0x273 [ 16.078515] [<ffffffff812bb387>] do_init_module+0x9b/0x273 [ 16.078522] [<ffffffff811e3782>] load_module+0x20b2/0x3410 [ 16.078527] [<ffffffff811df140>] ? m_show+0x210/0x210 [ 16.078533] [<ffffffff813b2b26>] ? kernel_read+0x66/0xe0 [ 16.078541] [<ffffffff811e4cfa>] SYSC_finit_module+0xba/0xc0 [ 16.078547] [<ffffffff811e4d1e>] SyS_finit_module+0xe/0x10 [ 16.078552] [<ffffffff81a860fc>] entry_SYSCALL_64_fastpath+0x1f/0xbd [ 16.078556] ================================================================================
Fix by checking path->depth before use.
--- sound/pci/hda/hda_generic.c | 2 ++ 1 file changed, 2 insertions(+)
sound/pci/hda/hda_generic.c +2 -0
@@ -3977,6 +3977,8 @@ static hda_nid_t set_path_power(struct hfor (n =0 ; n < spec->paths.used; n++) { path =snd_array_elem (&spec->paths, n); +if (!path->depth) +continue ;if (path->path[0 ] == nid || path->path[path->depth -1 ] == nid) {bool pin_old = path->pin_enabled;
Greg Kroah-Hartman
maintainerPATCH 182/203 ARM: dts: armada-38x: fix MBUS_ID for crypto SRAM on Armada 385 Linksys
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Petazzoni <[email protected]>
commit 929e604efa3dc0522214e0dc18984be23993e9f0 upstream.
When the support for the Marvell crypto engine was added in the Device Tree of the various Armada 385 Device Tree files in commit d716f2e837ac6 ("ARM: mvebu: define crypto SRAM ranges for all armada-38x boards"), a typo was made in the MBus window attributes for the Armada 385 Linksys board: 0x09/0x05 are used instead of 0x19/0x15. This commit fixes this typo, which makes the CESA engines operational on Armada 385 Linksys boards.
--- arch/arm/boot/dts/armada-385-linksys.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/armada-385-linksys.dtsi +2 -2
@@ -58,8 +58,8 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000 MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000 - MBUS_ID(0x09, 0x09) 0 0xf1100000 0x10000 - MBUS_ID(0x09, 0x05) 0 0xf1110000 0x10000>; + MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000 + MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000>; internal-regs {
Greg Kroah-Hartman
maintainerPATCH 184/203 ovl: fix dentry leak for default_permissions
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miklos Szeredi <[email protected]>
commit a4859d75944a726533ab86d24bb5ffd1b2b7d6cc upstream.
When using the 'default_permissions' mount option, ovl_permission() on non-directories was missing a dput(alias), resulting in "BUG Dentry still in use".
--- fs/overlayfs/inode.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
fs/overlayfs/inode.c +5 -3
@@ -121,16 +121,18 @@ int ovl_permission(struct inode *inode, err =vfs_getattr (&realpath, &stat);if (err) -return err; + goto out_dput; + err = -ESTALE ;if ((stat.mode ^ inode->i_mode) &S_IFMT ) -return -ESTALE ; + goto out_dput; inode->i_mode = stat.mode; inode->i_uid = stat.uid; inode->i_gid = stat.gid; -return generic_permission (inode, mask); + err =generic_permission (inode, mask); + goto out_dput; }/* Careful in RCU walk mode */
Greg Kroah-Hartman
maintainerPATCH 185/203 ovl: get_write_access() in truncate
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miklos Szeredi <[email protected]>
commit 03bea60409328de54e4ff7ec41672e12a9cb0908 upstream.
When truncating a file we should check write access on the underlying inode. And we should do so on the lower file as well (before copy-up) for consistency.
Original patch and test case by Aihua Zhang.
- - >o >o - - test.c - - >o >o - -
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
int ret;
ret = truncate(argv[0], 4096);
if (ret != -1) {
fprintf(stderr, "truncate(argv[0]) should have failed\n");
return 1;
}
if (errno != ETXTBSY) {
perror("truncate(argv[0])");
return 1;
}
return 0;
}- - >o >o - - >o >o - - >o >o - -
--- fs/overlayfs/inode.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
fs/overlayfs/inode.c +21 -0
@@ -59,16 +59,37 @@ int ovl_setattr(struct dentry *dentry, sif (err) goto out; +if (attr->ia_valid &ATTR_SIZE ) { +struct inode *realinode =d_inode (ovl_dentry_real (dentry)); + + err = -ETXTBSY ; +if (atomic_read (&realinode->i_writecount) <0 ) + goto out_drop_write; + } + err =ovl_copy_up (dentry);if (!err) { +struct inode *winode =NULL ; + upperdentry =ovl_dentry_upper (dentry); +if (attr->ia_valid &ATTR_SIZE ) { + winode =d_inode (upperdentry); + err =get_write_access (winode); +if (err) + goto out_drop_write; + } +inode_lock (upperdentry->d_inode); err =notify_change (upperdentry, attr,NULL );if (!err)ovl_copyattr (upperdentry->d_inode, dentry->d_inode);inode_unlock (upperdentry->d_inode); + +if (winode) +put_write_access (winode); } +out_drop_write:ovl_drop_write (dentry); out:return err;
Greg Kroah-Hartman
maintainerPATCH 187/203 ovl: handle ATTR_KILL*
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miklos Szeredi <[email protected]>
commit b99c2d913810e56682a538c9f2394d76fca808f8 upstream.
Before 4bacc9c9234c ("overlayfs: Make f_path...") file->f_path pointed to the underlying file, hence suid/sgid removal on write worked fine.
After that patch file->f_path pointed to the overlay file, and the file mode bits weren't copied to overlay_inode->i_mode. So the suid/sgid removal simply stopped working.
The fix is to copy the mode bits, but then ovl_setattr() needs to clear ATTR_MODE to avoid the BUG() in notify_change(). So do this first, then in the next patch copy the mode.
--- fs/overlayfs/inode.c | 3 +++ 1 file changed, 3 insertions(+)
fs/overlayfs/inode.c +3 -0
@@ -80,6 +80,9 @@ int ovl_setattr(struct dentry *dentry, s goto out_drop_write; } +if (attr->ia_valid & (ATTR_KILL_SUID |ATTR_KILL_SGID )) + attr->ia_valid &= ~ATTR_MODE ; +inode_lock (upperdentry->d_inode); err =notify_change (upperdentry, attr,NULL );if (!err)
Greg Kroah-Hartman
maintainerPATCH 188/203 ovl: verify upper dentry in ovl_remove_and_whiteout()
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maxim Patlasov <[email protected]>
commit cfc9fde0b07c3b44b570057c5f93dda59dca1c94 upstream.
The upper dentry may become stale before we call ovl_lock_rename_workdir. For example, someone could (mistakenly or maliciously) manually unlink(2) it directly from upperdir.
To ensure it is not stale, let's lookup it after ovl_lock_rename_workdir and and check if it matches the upper dentry.
Essentially, it is the same problem and similar solution as in commit 11f3710417d0 ("ovl: verify upper dentry before unlink and rename").
--- fs/overlayfs/dir.c | 56 +++++++++++++++++++++++------------------------------ 1 file changed, 25 insertions(+), 31 deletions(-)
fs/overlayfs/dir.c +25 -31
@@ -511,6 +511,7 @@ static int ovl_remove_and_whiteout(strucstruct dentry *upper;struct dentry *opaquedir =NULL ;int err; +int flags =0 ;if (WARN_ON (!workdir))return -EROFS ;
@@ -540,46 +541,39 @@ static int ovl_remove_and_whiteout(strucif (err) goto out_dput; + upper =lookup_one_len (dentry->d_name.name, upperdir, + dentry->d_name.len); + err =PTR_ERR (upper); +if (IS_ERR (upper)) + goto out_unlock; + + err = -ESTALE ; +if ((opaquedir && upper != opaquedir) || + (!opaquedir &&ovl_dentry_upper (dentry) && + upper !=ovl_dentry_upper (dentry))) { + goto out_dput_upper; + } + whiteout =ovl_whiteout (workdir, dentry); err =PTR_ERR (whiteout);if (IS_ERR (whiteout)) - goto out_unlock; + goto out_dput_upper; - upper =ovl_dentry_upper (dentry); -if (!upper) { - upper =lookup_one_len (dentry->d_name.name, upperdir, - dentry->d_name.len); - err =PTR_ERR (upper); -if (IS_ERR (upper)) - goto kill_whiteout; - - err =ovl_do_rename (wdir, whiteout, udir, upper,0 ); -dput (upper); -if (err) - goto kill_whiteout; - }else { -int flags =0 ; - -if (opaquedir) - upper = opaquedir; - err = -ESTALE ; -if (upper->d_parent != upperdir) - goto kill_whiteout; - -if (is_dir) - flags |=RENAME_EXCHANGE ; - - err =ovl_do_rename (wdir, whiteout, udir, upper, flags); -if (err) - goto kill_whiteout; +if (d_is_dir (upper)) + flags =RENAME_EXCHANGE ; + + err =ovl_do_rename (wdir, whiteout, udir, upper, flags); +if (err) + goto kill_whiteout; +if (flags) +ovl_cleanup (wdir, upper); -if (is_dir) -ovl_cleanup (wdir, upper); - }ovl_dentry_version_inc (dentry->d_parent); out_d_drop:d_drop (dentry);dput (whiteout); +out_dput_upper: +dput (upper); out_unlock:unlock_rename (workdir, upperdir); out_dput:
Greg Kroah-Hartman
maintainerPATCH 190/203 s390: fix test_fp_ctl inline assembly contraints
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Martin Schwidefsky <[email protected]>
commit bcf4dd5f9ee096bd1510f838dd4750c35df4e38b upstream.
The test_fp_ctl function is used to test if a given value is a valid floating-point control. The inline assembly in test_fp_ctl uses an incorrect constraint for the 'orig_fpc' variable. If the compiler chooses the same register for 'fpc' and 'orig_fpc' the test_fp_ctl() function always returns true. This allows user space to trigger kernel oopses with invalid floating-point control values on the signal stack.
This problem has been introduced with git commit 4725c86055f5bbdcdf "s390: fix save and restore of the floating-point-control register"
--- arch/s390/include/asm/fpu/api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/include/asm/fpu/api.h +1 -1
@@ -22,7 +22,7 @@ static inline int test_fp_ctl(u32 fpc)" la %0,0\n" "1:\n" EX_TABLE (0b ,1b ) - : "=d" (rc), "=d" (orig_fpc) + : "=d" (rc), "=&d" (orig_fpc) : "d" (fpc), "0" (-EINVAL)); return rc; }
Greg Kroah-Hartman
maintainerPATCH 192/203 53c700: fix BUG on untagged commands
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: James Bottomley <[email protected]>
commit 8beb330044d0d1878c7b92290e91c0b889e92633 upstream.
The untagged command case in the 53c700 driver has been broken since host wide tags were enabled because the replaced scsi_find_tag() function had a special case for the tag value SCSI_NO_TAG to retrieve sdev->current_cmnd. The replacement function scsi_host_find_tag() has no such special case and returns NULL causing untagged commands to trigger a BUG() in the driver. Inspection shows that the 53c700 is the only driver using this SCSI_NO_TAG case, so a local fix in the driver suffices to fix this problem globally.
--- drivers/scsi/53c700.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/53c700.c +2 -2
@@ -1122,7 +1122,7 @@ process_script_interrupt(__u32 dsps, __u }else {struct scsi_cmnd *SCp; - SCp =scsi_host_find_tag (SDp->host,SCSI_NO_TAG ); + SCp = SDp->current_cmnd;if (unlikely (SCp ==NULL )) {sdev_printk (KERN_ERR , SDp,"no saved request for untagged cmd\n" );
@@ -1826,7 +1826,7 @@ NCR_700_queuecommand_lck(struct scsi_cmn slot->tag, slot); }else { slot->tag =SCSI_NO_TAG ; -/* must populate current_cmnd for scsi_host_find_tag to work */ +/* save current command for reselection */ SCp->device->current_cmnd = SCp; }/* sanity check: some of the commands generated by the mid-layer
Greg Kroah-Hartman
maintainerPATCH 158/203 iio:ad7266: Fix support for optional regulators
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Brown <[email protected]>
commit e5511c816e5ac4909bdd38e85ac344e2b9b8e984 upstream.
The ad7266 driver attempts to support deciding between the use of internal and external power supplies by checking to see if an error is returned when requesting the regulator. This doesn't work with the current code since the driver uses a normal regulator_get() which is for non-optional supplies and so assumes that if a regulator is not provided by the platform then this is a bug in the platform integration and so substitutes a dummy regulator. Use regulator_get_optional() instead which indicates to the framework that the regulator may be absent and provides a dummy regulator instead.
--- drivers/iio/adc/ad7266.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ad7266.c +1 -1
@@ -396,7 +396,7 @@ static int ad7266_probe(struct spi_devic st =iio_priv (indio_dev); - st->reg =devm_regulator_get (&spi->dev,"vref" ); + st->reg =devm_regulator_get_optional (&spi->dev,"vref" );if (!IS_ERR (st->reg)) { ret =regulator_enable (st->reg);if (ret)
Greg Kroah-Hartman
maintainerPATCH 159/203 iio:ad7266: Fix probe deferral for vref
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Brown <[email protected]>
commit 68b356eb3d9f5e38910fb62e22a78e2a18d544ae upstream.
Currently the ad7266 driver treats any failure to get vref as though the regulator were not present but this means that if probe deferral is triggered the driver will act as though the regulator were not present. Instead only use the internal reference if we explicitly got -ENODEV which is what is returned for absent regulators.
--- drivers/iio/adc/ad7266.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/iio/adc/ad7266.c +3 -0
@@ -408,6 +408,9 @@ static int ad7266_probe(struct spi_devic st->vref_mv = ret /1000 ; }else { +/* Any other error indicates that the regulator does exist */ +if (PTR_ERR (st->reg) != -ENODEV ) +return PTR_ERR (st->reg);/* Use internal reference */ st->vref_mv =2500 ; }
Greg Kroah-Hartman
maintainerPATCH 160/203 tty: vt: Fix soft lockup in fbcon cursor blink timer.
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Daney <[email protected]>
commit 1b45996d2ebf9680ccd0db875fc668aa025f40fd upstream.
We are getting somewhat random soft lockups with this signature:
[ 86.992215] [<fffffc00080935e0>] el1_irq+0xa0/0x10c [ 86.997082] [<fffffc000841822c>] cursor_timer_handler+0x30/0x54 [ 87.002991] [<fffffc000810ec44>] call_timer_fn+0x54/0x1a8 [ 87.008378] [<fffffc000810ef88>] run_timer_softirq+0x1c4/0x2bc [ 87.014200] [<fffffc000809077c>] __do_softirq+0x114/0x344 [ 87.019590] [<fffffc00080af45c>] irq_exit+0x74/0x98 [ 87.024458] [<fffffc00080fac20>] __handle_domain_irq+0x98/0xfc [ 87.030278] [<fffffc000809056c>] gic_handle_irq+0x94/0x190
This is caused by the vt visual_init() function calling into fbcon_init() with a vc_cur_blink_ms value of zero. This is a transient condition, as it is later set to a non-zero value. But, if the timer happens to expire while the blink rate is zero, it goes into an endless loop, and we get soft lockup.
The fix is to initialize vc_cur_blink_ms before calling the con_init() function.
--- drivers/tty/vt/vt.c | 1 + 1 file changed, 1 insertion(+)
drivers/tty/vt/vt.c +1 -0
@@ -750,6 +750,7 @@ static void visual_init(struct vc_data * vc->vc_complement_mask =0 ; vc->vc_can_do_color =0 ; vc->vc_panic_force_write = false; + vc->vc_cur_blink_ms =DEFAULT_CURSOR_BLINK_MS ; vc->vc_sw->con_init (vc, init);if (!vc->vc_complement_mask) vc->vc_complement_mask = vc->vc_can_do_color ?0x7700 :0x0800 ;
Greg Kroah-Hartman
maintainerPATCH 191/203 Revert "s390/kdump: Clear subchannel ID to signal non-CCW/SCSI IPL"
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Holzheu <[email protected]>
commit 5419447e2142d6ed68c9f5c1a28630b3a290a845 upstream.
This reverts commit 852ffd0f4e23248b47531058e531066a988434b5.
There are use cases where an intermediate boot kernel (1) uses kexec to boot the final production kernel (2). For this scenario we should provide the original boot information to the production kernel (2). Therefore clearing the boot information during kexec() should not be done.
--- arch/s390/kernel/ipl.c | 7 ------- 1 file changed, 7 deletions(-)
arch/s390/kernel/ipl.c +0 -7
@@ -2064,12 +2064,5 @@ void s390_reset_system(void) S390_lowcore.program_new_psw.addr = (unsigned long ) s390_base_pgm_handler; -/* -* Clear subchannel ID and number to signal new kernel that no CCW or -* SCSI IPL has been done (for kexec and kdump) -*/ - S390_lowcore.subchannel_id =0 ; - S390_lowcore.subchannel_nr =0 ; -do_reset_calls (); }
Greg Kroah-Hartman
maintainerPATCH 196/203 xen/acpi: allow xen-acpi-processor driver to load on Xen 4.7
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Beulich <[email protected]>
commit 6f2d9d99213514360034c6d52d2c3919290b3504 upstream.
As of Xen 4.7 PV CPUID doesn't expose either of CPUID[1].ECX[7] and CPUID[0x80000007].EDX[7] anymore, causing the driver to fail to load on both Intel and AMD systems. Doing any kind of hardware capability checks in the driver as a prerequisite was wrong anyway: With the hypervisor being in charge, all such checking should be done by it. If ACPI data gets uploaded despite some missing capability, the hypervisor is free to ignore part or all of that data.
Ditch the entire check_prereq() function, and do the only valid check (xen_initial_domain()) in the caller in its place.
--- drivers/xen/xen-acpi-processor.c | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-)
drivers/xen/xen-acpi-processor.c +3 -32
@@ -423,36 +423,7 @@ upload:return 0 ; } -static int __init check_prereq (void ) -{ -struct cpuinfo_x86 *c = &cpu_data (0 ); - -if (!xen_initial_domain ()) -return -ENODEV ; - -if (!acpi_gbl_FADT.smi_command) -return -ENODEV ; -if (c->x86_vendor ==X86_VENDOR_INTEL ) { -if (!cpu_has (c,X86_FEATURE_EST )) -return -ENODEV ; - -return 0 ; - } -if (c->x86_vendor ==X86_VENDOR_AMD ) { -/* Copied from powernow-k8.h, can't include ../cpufreq/powernow -* as we get compile warnings for the static functions. -*/ -#define CPUID_FREQ_VOLT_CAPABILITIES 0x80000007 -#define USE_HW_PSTATE 0x00000080 -u32 eax, ebx, ecx, edx; -cpuid (CPUID_FREQ_VOLT_CAPABILITIES , &eax, &ebx, &ecx, &edx); -if ((edx &USE_HW_PSTATE ) !=USE_HW_PSTATE ) -return -ENODEV ; -return 0 ; - } -return -ENODEV ; -}/* acpi_perf_data is a pointer to percpu data. */ static struct acpi_processor_performance __percpu *acpi_perf_data;
@@ -509,10 +480,10 @@ struct notifier_block xen_acpi_processorstatic int __init xen_acpi_processor_init (void ) {unsigned int i; -int rc =check_prereq (); +int rc; -if (rc) -return rc; +if (!xen_initial_domain ()) +return -ENODEV ; nr_acpi_bits =get_max_acpi_id () +1 ; acpi_ids_done =kcalloc (BITS_TO_LONGS (nr_acpi_bits),sizeof (unsigned long ),GFP_KERNEL );
Greg Kroah-Hartman
maintainerPATCH 194/203 cifs: dynamic allocation of ntlmssp blob
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jerome Marchand <[email protected]>
commit b8da344b74c822e966c6d19d6b2321efe82c5d97 upstream.
In sess_auth_rawntlmssp_authenticate(), the ntlmssp blob is allocated statically and its size is an "empirical" 5*sizeof(struct _AUTHENTICATE_MESSAGE) (320B on x86_64). I don't know where this value comes from or if it was ever appropriate, but it is currently
insufficient: the user and domain name in UTF16 could take 1kB by themselves. Because of that, build_ntlmssp_auth_blob() might corrupt memory (out-of-bounds write). The size of ntlmssp_blob in SMB2_sess_setup() is too small too (sizeof(struct _NEGOTIATE_MESSAGE)
+ 500).
This patch allocates the blob dynamically inbuild_ntlmssp_auth_blob().
--- fs/cifs/ntlmssp.h | 2 - fs/cifs/sess.c | 76 +++++++++++++++++++++++++++++------------------------- fs/cifs/smb2pdu.c | 10 +------ 3 files changed, 45 insertions(+), 43 deletions(-)
fs/cifs/ntlmssp.h +1 -1
@@ -133,6 +133,6 @@ typedef struct _AUTHENTICATE_MESSAGE {int decode_ntlmssp_challenge (char *bcc_ptr,int blob_len,struct cifs_ses *ses);void build_ntlmssp_negotiate_blob (unsigned char *pbuffer,struct cifs_ses *ses); -int build_ntlmssp_auth_blob (unsigned char *pbuffer,u16 *buflen, +int build_ntlmssp_auth_blob (unsigned char **pbuffer,u16 *buflen,struct cifs_ses *ses,const struct nls_table *nls_cp);
fs/cifs/sess.c +42 -34
160 lines not on this page · raw message
fs/cifs/smb2pdu.c +2 -8
@@ -588,7 +588,7 @@ SMB2_sess_setup(const unsigned int xid,u16 blob_length =0 ;struct key *spnego_key =NULL ;char *security_blob =NULL ; -char *ntlmssp_blob =NULL ; +unsigned char *ntlmssp_blob =NULL ;bool use_spnego = false;/* else use raw ntlmssp */ cifs_dbg (FYI ,"Session Setup\n" );
@@ -713,13 +713,7 @@ ssetup_ntlmssp_authenticate: iov[1 ].iov_len = blob_length; }else if (phase == NtLmAuthenticate) { req->hdr.SessionId = ses->Suid; - ntlmssp_blob =kzalloc (sizeof (struct _NEGOTIATE_MESSAGE ) +500 , -GFP_KERNEL ); -if (ntlmssp_blob ==NULL ) { - rc = -ENOMEM ; - goto ssetup_exit; - } - rc =build_ntlmssp_auth_blob (ntlmssp_blob, &blob_length, ses, + rc =build_ntlmssp_auth_blob (&ntlmssp_blob, &blob_length, ses, nls_cp);if (rc) { cifs_dbg(FYI, "build_ntlmssp_auth_blob failed %d\n",
Greg Kroah-Hartman
maintainerPATCH 200/203 crypto: qat - make qat_asym_algs.o depend on asn1 headers
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Stancek <[email protected]>
commit 81dc0365cfa7bc7c08a0e44d9ee04964df782e19 upstream.
Parallel build can sporadically fail because asn1 headers may
not be built yet by the time qat_asym_algs.o is compiled:
drivers/crypto/qat/qat_common/qat_asym_algs.c:55:32: fatal error: qat_rsapubkey-asn1.h: No such file or directory
#include "qat_rsapubkey-asn1.h"
--- drivers/crypto/qat/qat_common/Makefile | 1 + 1 file changed, 1 insertion(+)
drivers/crypto/qat/qat_common/Makefile +1 -0
@@ -2,6 +2,7 @@ $(obj)/qat_rsapubkey-asn1.o: $(obj)/qat_ $(obj)/qat_rsapubkey-asn1.h $(obj)/qat_rsaprivkey-asn1.o: $(obj)/qat_rsaprivkey-asn1.c \ $(obj)/qat_rsaprivkey-asn1.h +$(obj)/qat_asym_algs.o: $(obj)/qat_rsapubkey-asn1.h $(obj)/qat_rsaprivkey-asn1.h clean-files += qat_rsapubkey-asn1.c qat_rsapubkey-asn1.h clean-files += qat_rsaprivkey-asn1.c qat_rsaprivkey-asn1.h
Greg Kroah-Hartman
maintainerPATCH 201/203 drm/i915: Revert DisplayPort fast link training feature
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mika Kahola <[email protected]>
commit 34511dce4b35685d3988d5c8b100d11a068db5bd upstream.
It has been found out that in some HW combination the DisplayPort fast link training feature caused screen flickering. Let's revert this feature for now until we can ensure that the feature works for all platforms.
This is a manual revert of commits 5fa836a9d859 ("drm/i915: DP link training optimization") and 4e96c97742f4 ("drm/i915: eDP link training optimization").
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91393
--- drivers/gpu/drm/i915/intel_dp.c | 3 --- drivers/gpu/drm/i915/intel_dp_link_training.c | 25 ++----------------------- drivers/gpu/drm/i915/intel_drv.h | 2 -- 3 files changed, 2 insertions(+), 28 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +0 -3
@@ -5022,9 +5022,6 @@ intel_dp_hpd_pulse(struct intel_digital_intel_display_power_get (dev_priv, power_domain);if (long_hpd) { -/* indicate that we need to restart link training */ - intel_dp->train_set_valid = false; -if (!intel_digital_port_connected (dev_priv, intel_dig_port)) goto mst_fail;
drivers/gpu/drm/i915/intel_dp_link_training.c +2 -23
@@ -85,8 +85,7 @@ static bool intel_dp_reset_link_train(struct intel_dp *intel_dp, uint8_t dp_train_pat) { -if (!intel_dp->train_set_valid) -memset (intel_dp->train_set,0 ,sizeof (intel_dp->train_set)); + memset(intel_dp->train_set, 0, sizeof(intel_dp->train_set));intel_dp_set_signal_levels (intel_dp);return intel_dp_set_link_train (intel_dp, dp_train_pat); }
@@ -161,22 +160,6 @@ intel_dp_link_training_clock_recovery(stbreak ; } -/* -* if we used previously trained voltage and pre-emphasis values -* and we don't get clock recovery, reset link training values -*/ -if (intel_dp->train_set_valid) { -DRM_DEBUG_KMS ("clock recovery not ok, reset" ); -/* clear the flag as we are not reusing train set */ - intel_dp->train_set_valid = false; -if (!intel_dp_reset_link_train (intel_dp, -DP_TRAINING_PATTERN_1 | -DP_LINK_SCRAMBLING_DISABLE )) { -DRM_ERROR ("failed to enable link training\n" ); -return ; - } -continue ; - }/* Check to see if we've tried the max voltage */ for (i =0 ; i < intel_dp->lane_count; i++)
@@ -284,7 +267,6 @@ intel_dp_link_training_channel_equalizat/* Make sure clock is still ok */ if (!drm_dp_clock_recovery_ok (link_status, intel_dp->lane_count)) { - intel_dp->train_set_valid = false;intel_dp_link_training_clock_recovery (intel_dp); intel_dp_set_link_train(intel_dp, training_pattern |
@@ -301,7 +283,6 @@ intel_dp_link_training_channel_equalizat/* Try 5 times, then try clock recovery if that fails */ if (tries >5 ) { - intel_dp->train_set_valid = false;intel_dp_link_training_clock_recovery (intel_dp); intel_dp_set_link_train(intel_dp, training_pattern |
@@ -322,10 +303,8 @@ intel_dp_link_training_channel_equalizatintel_dp_set_idle_link_train (intel_dp); -if (channel_eq) { - intel_dp->train_set_valid = true; +if (channel_eq)DRM_DEBUG_KMS ("Channel EQ done. DP Training successful\n" ); - } }void intel_dp_stop_link_train (struct intel_dp *intel_dp)
drivers/gpu/drm/i915/intel_drv.h +0 -2
@@ -811,8 +811,6 @@ struct intel_dp {/* This is called before a link training is starterd */ void (*prepare_link_retrain)(struct intel_dp *intel_dp); -bool train_set_valid; -/* Displayport compliance testing */ unsigned long compliance_test_type;unsigned long compliance_test_data;
Greg Kroah-Hartman
maintainerPATCH 195/203 File names with trailing period or space need special case conversion
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Steve French <[email protected]>
commit 45e8a2583d97ca758a55c608f78c4cef562644d1 upstream.
POSIX allows files with trailing spaces or a trailing period but SMB3 does not, so convert these using the normal Services For Mac mapping as we do for other reserved characters such as
: < > | ? *
This is similar to what Macs do for the same problem over SMB3.
--- fs/cifs/cifs_unicode.c | 33 +++++++++++++++++++++++++++++---- fs/cifs/cifs_unicode.h | 2 ++ 2 files changed, 31 insertions(+), 4 deletions(-)
fs/cifs/cifs_unicode.c +29 -4
@@ -101,6 +101,12 @@ convert_sfm_char(const __u16 src_char, ccase SFM_SLASH : *target ='\\' ;break ; +case SFM_SPACE : + *target =' ' ; +break ; +case SFM_PERIOD : + *target ='.' ; +break ;default :return false; }
@@ -404,7 +410,7 @@ static __le16 convert_to_sfu_char(char sreturn dest_char; } -static __le16 convert_to_sfm_char (char src_char) +static __le16 convert_to_sfm_char (char src_char,bool end_of_string) {__le16 dest_char;
@@ -427,6 +433,18 @@ static __le16 convert_to_sfm_char(char scase '|' : dest_char =cpu_to_le16 (SFM_PIPE );break ; +case '.' : +if (end_of_string) + dest_char =cpu_to_le16 (SFM_PERIOD ); +else + dest_char =0 ; +break ; +case ' ' : +if (end_of_string) + dest_char =cpu_to_le16 (SFM_SPACE ); +else + dest_char =0 ; +break ;default : dest_char =0 ; }
@@ -469,9 +487,16 @@ cifsConvertToUTF16(__le16 *target, const/* see if we must remap this char */ if (map_chars ==SFU_MAP_UNI_RSVD ) dst_char =convert_to_sfu_char (src_char); -else if (map_chars ==SFM_MAP_UNI_RSVD ) - dst_char =convert_to_sfm_char (src_char); -else +else if (map_chars ==SFM_MAP_UNI_RSVD ) { +bool end_of_string; + +if (i == srclen -1 ) + end_of_string = true; +else + end_of_string = false; + + dst_char =convert_to_sfm_char (src_char, end_of_string); + }else dst_char =0 ;/* * FIXME: We can not handle remapping backslash (UNI_SLASH)
fs/cifs/cifs_unicode.h +2 -0
@@ -64,6 +64,8 @@#define SFM_LESSTHAN ((__u16) 0xF023)#define SFM_PIPE ((__u16) 0xF027)#define SFM_SLASH ((__u16) 0xF026) +#define SFM_PERIOD ((__u16) 0xF028) +#define SFM_SPACE ((__u16) 0xF029)/* * Mapping mechanism to use when one of the seven reserved characters is
Greg Kroah-Hartman
maintainerPATCH 143/203 memory: omap-gpmc: Fix omap gpmc EXTRADELAY timing
In reply to Greg Kroah-Hartman4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ocquidant, Sebastien <[email protected]>
commit 8f50b8e57442d28e41bb736c173d8a2490549a82 upstream.
In the omap gpmc driver it can be noticed that GPMC_CONFIG4_OEEXTRADELAY is overwritten by the WEEXTRADELAY value from the device tree and GPMC_CONFIG4_WEEXTRADELAY is not updated by the value from the device tree.
As a consequence, the memory accesses cannot be configured properly when the extra delay are needed for OE and WE.
Fix the update of GPMC_CONFIG4_WEEXTRADELAY with the value from the device tree file and prevents GPMC_CONFIG4_OEXTRADELAY being overwritten by the WEXTRADELAY value from the device tree.
--- drivers/memory/omap-gpmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/memory/omap-gpmc.c +1 -1
@@ -394,7 +394,7 @@ static void gpmc_cs_bool_timings(int cs,gpmc_cs_modify_reg (cs,GPMC_CS_CONFIG4 ,GPMC_CONFIG4_OEEXTRADELAY , p->oe_extra_delay);gpmc_cs_modify_reg (cs,GPMC_CS_CONFIG4 , -GPMC_CONFIG4_OEEXTRADELAY , p->we_extra_delay); +GPMC_CONFIG4_WEEXTRADELAY , p->we_extra_delay);gpmc_cs_modify_reg (cs,GPMC_CS_CONFIG6 ,GPMC_CONFIG6_CYCLE2CYCLESAMECSEN , p->cycle2cyclesamecsen);
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.6.5 release. There are 203 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.
Quoted 9 lines
Responses should be made by Wed Jul 27 20:33:38 UTC 2016. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.6.5-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.6.y
and the diffstat can be found below.
Compiled and booted on my test system. No dmesg regressions,
thanks,
-- Shuah
Greg Kroah-Hartman
maintainerQuoted 9 lines · Shuah Khan
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.6.5 release. There are 203 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 Wed Jul 27 20:33:38 UTC 2016. Anything received after that time might be too late.
Quoted 7 lines
Quoted 6 lines
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.6.5-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.6.y
and the diffstat can be found below.Compiled and booted on my test system. No dmesg regressions,
Great, thanks for testing all of these and letting me know.
greg k-h
RE: [PATCH 4.6 143/203] memory: omap-gpmc: Fix omap gpmc EXTRADELAY timing
In reply to Greg Kroah-Hartman
-----------------------------
Eaton Industries (France) S.A.S ~ Siège social: 110 Rue Blaise Pascal, Immeuble Le Viséo - Bâtiment A Innovallée, 38330, Montbonnot-St.-Martin, France ~ Lieu d'enregistrement au registre du commerce: Grenoble ~ Numéro d'enregistrement: 509 653 176 ~ Capital social souscrit et liberé:€ 16215441 ~ Numéro de TVA: FR47509653176
-----------------------------
-----Message d'origine-----
De : Greg Kroah-Hartman [mailto:[email protected]]
Envoyé : lundi 25 juillet 2016 22:56
À : [email protected]
Cc : Greg Kroah-Hartman; [email protected]; Ocquidant, Sebastien; Roger Quadros Objet : [PATCH 4.6 143/203] memory: omap-gpmc: Fix omap gpmc EXTRADELAY timing
4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ocquidant, Sebastien <[email protected]>
commit 8f50b8e57442d28e41bb736c173d8a2490549a82 upstream.
In the omap gpmc driver it can be noticed that GPMC_CONFIG4_OEEXTRADELAY is overwritten by the WEEXTRADELAY value from the device tree and GPMC_CONFIG4_WEEXTRADELAY is not updated by the value from the device tree.
As a consequence, the memory accesses cannot be configured properly when the extra delay are needed for OE and WE.
Fix the update of GPMC_CONFIG4_WEEXTRADELAY with the value from the device tree file and prevents GPMC_CONFIG4_OEXTRADELAY being overwritten by the WEXTRADELAY value from the device tree.
--- drivers/memory/omap-gpmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/memory/omap-gpmc.c +1 -1
@@ -394,7 +394,7 @@ static void gpmc_cs_bool_timings(int cs,gpmc_cs_modify_reg (cs,GPMC_CS_CONFIG4 ,GPMC_CONFIG4_OEEXTRADELAY , p->oe_extra_delay);gpmc_cs_modify_reg (cs,GPMC_CS_CONFIG4 , -GPMC_CONFIG4_OEEXTRADELAY , p->we_extra_delay); +GPMC_CONFIG4_WEEXTRADELAY , p->we_extra_delay);gpmc_cs_modify_reg (cs,GPMC_CS_CONFIG6 ,GPMC_CONFIG6_CYCLE2CYCLESAMECSEN , p->cycle2cyclesamecsen);
========================================================================================
Hi Greg,
OK for me
Sébastien Ocquidant
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.6.5 release. There are 203 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 Wed Jul 27 20:33:38 UTC 2016. Anything received after that time might be too late.
Build results:
total: 148 pass: 146 fail: 2
Failed builds:
unicore32:defconfig
unicore32:allnoconfig
Qemu test results:
total: 107 pass: 107 fail: 0
unicore32 is still not fixed in mainline.
Details are available at http://kerneltests.org/builders.
Guenter
Greg Kroah-Hartman
maintainerQuoted 12 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.6.5 release. There are 203 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 Wed Jul 27 20:33:38 UTC 2016. Anything received after that time might be too late.
Build results:
total: 148 pass: 146 fail: 2
Quoted 8 lines
Failed builds:
unicore32:defconfig
unicore32:allnoconfigQemu test results:
total: 107 pass: 107 fail: 0unicore32 is still not fixed in mainline.
Does no one care about it?
Anyway, thanks for all of the testing results, much appreciated.
greg k-h
Quoted 17 lines · Greg Kroah-Hartman
Quoted 16 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.6.5 release. There are 203 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 Wed Jul 27 20:33:38 UTC 2016. Anything received after that time might be too late.
Build results:
total: 148 pass: 146 fail: 2Failed builds:
unicore32:defconfig
unicore32:allnoconfig
Quoted 7 lines
Quoted 4 lines
Qemu test results:
total: 107 pass: 107 fail: 0unicore32 is still not fixed in mainline.
Does no one care about it?
Good question. The fix has been in -next for a while.
Guenter
Greg Kroah-Hartman
maintainerQuoted 26 lines · Kevin Hilman
Quoted 12 lines · kernelci.org bot
stable-rc boot: 670 boots: 4 failed, 662 passed with 3 offline, 1 conflict (v4.6.4-204-g02256e5f7d73)
Full Boot Summary: https://kernelci.org/boot/all/job/stable-rc/kernel/v4.6.4-204-g02256e5f7d73/
Full Build Summary: https://kernelci.org/build/stable-rc/kernel/v4.6.4-204-g02256e5f7d73/Tree: stable-rc
Branch: local/linux-4.6.y
Git Describe: v4.6.4-204-g02256e5f7d73
Git Commit:02256e5f7d734c5aa48de4310ca72f1887aea3d4
Git URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Tested: 106 unique boards, 25 SoC families, 36 builds out of 140Quoted 9 lines
Boot Failures Detected: https://kernelci.org/boot/?v4.6.4-204-g02256e5f7d73&fail
arm64:
defconfig:
apm-mustang-kvm-guest: 1 failed lab
apm-mustang-kvm-uefi-guest: 1 failed lab
juno-kvm-uefi-guest: 1 failed labCan be ignored: ongoing KVM issues with qemu on the rootfs here.
Quoted 8 lines
Quoted 4 lines
arm:
multi_v7_defconfig+CONFIG_EFI=y:
am335x-bone: 1 failed labAfter retry: PASS
I re-ran this one a few times and it's OK, not sure what happend.
Thanks for letting me know.
greg k-h