linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Pierre Moreau <pierre.morrow@free.fr>,
	Lukas Wunner <lukas@wunner.de>, Ben Skeggs <bskeggs@redhat.com>
Subject: [PATCH 4.14 17/41] drm/nouveau/bl: Fix oops on driver unbind
Date: Mon, 19 Mar 2018 19:08:17 +0100	[thread overview]
Message-ID: <20180319180733.382875577@linuxfoundation.org> (raw)
In-Reply-To: <20180319180732.195217948@linuxfoundation.org>

4.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Lukas Wunner <lukas@wunner.de>

commit 76f2e2bc627f7d08360ac731b6277d744d4eb599 upstream.

Unbinding nouveau on a dual GPU MacBook Pro oopses because we iterate
over the bl_connectors list in nouveau_backlight_exit() but skipped
initializing it in nouveau_backlight_init().  Stacktrace for posterity:

    BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
    IP: nouveau_backlight_exit+0x2b/0x70 [nouveau]
    nouveau_display_destroy+0x29/0x80 [nouveau]
    nouveau_drm_unload+0x65/0xe0 [nouveau]
    drm_dev_unregister+0x3c/0xe0 [drm]
    drm_put_dev+0x2e/0x60 [drm]
    nouveau_drm_device_remove+0x47/0x70 [nouveau]
    pci_device_remove+0x36/0xb0
    device_release_driver_internal+0x157/0x220
    driver_detach+0x39/0x70
    bus_remove_driver+0x51/0xd0
    pci_unregister_driver+0x2a/0xa0
    nouveau_drm_exit+0x15/0xfb0 [nouveau]
    SyS_delete_module+0x18c/0x290
    system_call_fast_compare_end+0xc/0x6f

Fixes: b53ac1ee12a3 ("drm/nouveau/bl: Do not register interface if Apple GMUX detected")
Cc: stable@vger.kernel.org # v4.10+
Cc: Pierre Moreau <pierre.morrow@free.fr>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/nouveau/nouveau_backlight.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
+++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
@@ -268,13 +268,13 @@ nouveau_backlight_init(struct drm_device
 	struct nvif_device *device = &drm->client.device;
 	struct drm_connector *connector;
 
+	INIT_LIST_HEAD(&drm->bl_connectors);
+
 	if (apple_gmux_present()) {
 		NV_INFO(drm, "Apple GMUX detected: not registering Nouveau backlight interface\n");
 		return 0;
 	}
 
-	INIT_LIST_HEAD(&drm->bl_connectors);
-
 	list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
 		if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS &&
 		    connector->connector_type != DRM_MODE_CONNECTOR_eDP)

  parent reply	other threads:[~2018-03-19 18:08 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-19 18:08 [PATCH 4.14 00/41] 4.14.29-stable review Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 01/41] x86/cpufeatures: Add Intel Total Memory Encryption cpufeature Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 02/41] x86/cpufeatures: Add Intel PCONFIG cpufeature Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 03/41] selftests/x86/entry_from_vm86: Exit with 1 if we fail Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 04/41] selftests/x86: Add tests for User-Mode Instruction Prevention Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 05/41] selftests/x86: Add tests for the STR and SLDT instructions Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 06/41] selftests/x86/entry_from_vm86: Add test cases for POPF Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 07/41] x86/vm86/32: Fix POPF emulation Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 08/41] x86/speculation, objtool: Annotate indirect calls/jumps for objtool on 32-bit kernels Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 09/41] x86/speculation: Remove Skylake C2 from Speculation Control microcode blacklist Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 10/41] KVM: x86: Fix device passthrough when SME is active Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 11/41] x86/mm: Fix vmalloc_fault to use pXd_large Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 12/41] parisc: Handle case where flush_cache_range is called with no context Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 13/41] ALSA: pcm: Fix UAF in snd_pcm_oss_get_formats() Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 14/41] ALSA: hda - Revert power_save option default value Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 15/41] ALSA: seq: Fix possible UAF in snd_seq_check_queue() Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 16/41] ALSA: seq: Clear client entry before deleting else at closing Greg Kroah-Hartman
2018-03-19 18:08 ` Greg Kroah-Hartman [this message]
2018-03-19 18:08 ` [PATCH 4.14 18/41] drm/amdgpu: fix prime teardown order Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 19/41] drm/radeon: " Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 20/41] drm/amdgpu/dce: Dont turn off DP sink when disconnected Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 21/41] fs: Teach path_connected to handle nfs filesystems with multiple roots Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 22/41] KVM: arm/arm64: Reduce verbosity of KVM init log Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 23/41] kvm: arm/arm64: vgic-v3: Tighten synchronization for guests using v2 on v3 Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 24/41] KVM: arm/arm64: vgic: Dont populate multiple LRs with the same vintid Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 25/41] lock_parent() needs to recheck if dentry got __dentry_killed under it Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 26/41] fs/aio: Add explicit RCU grace period when freeing kioctx Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 27/41] fs/aio: Use RCU accessors for kioctx_table->table[] Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 28/41] RDMAVT: Fix synchronization around percpu_ref Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 29/41] irqchip/gic-v3-its: Ensure nr_ites >= nr_lpis Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 30/41] btrfs: Fix NULL pointer exception in find_bio_stripe Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 31/41] btrfs: add missing initialization in btrfs_check_shared Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 32/41] btrfs: alloc_chunk: fix DUP stripe size handling Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 33/41] btrfs: Fix use-after-free when cleaning up fs_devs with a single stale device Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 34/41] btrfs: remove spurious WARN_ON(ref->count < 0) in find_parent_nodes Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 35/41] btrfs: Fix memory barriers usage with device stats counters Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 36/41] scsi: qla2xxx: Fix smatch warning in qla25xx_delete_{rsp|req}_que Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 37/41] scsi: qla2xxx: Fix NULL pointer access for fcport structure Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 38/41] scsi: qla2xxx: Fix logo flag for qlt_free_session_done() Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 39/41] scsi: qla2xxx: Fix crashes in qla2x00_probe_one on probe failure Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 40/41] USB: gadget: udc: Add missing platform_device_put() on error in bdc_pci_probe() Greg Kroah-Hartman
2018-03-19 18:08 ` [PATCH 4.14 41/41] usb: dwc3: Fix GDBGFIFOSPACE_TYPE values Greg Kroah-Hartman
2018-03-19 23:40 ` [PATCH 4.14 00/41] 4.14.29-stable review kernelci.org bot
2018-03-20  7:01 ` Naresh Kamboju
2018-03-20 16:10 ` Guenter Roeck
2018-03-20 16:31 ` 王金浦
2018-03-21 11:08   ` Greg Kroah-Hartman
2018-03-20 20:12 ` Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180319180733.382875577@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=bskeggs@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=pierre.morrow@free.fr \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).