From patchwork Fri Dec 20 14:24:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 3389281 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D114EC0D4A for ; Fri, 20 Dec 2013 14:24:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B604820623 for ; Fri, 20 Dec 2013 14:24:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 75DA42054C for ; Fri, 20 Dec 2013 14:24:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422666Ab3LTOYX (ORCPT ); Fri, 20 Dec 2013 09:24:23 -0500 Received: from www.linutronix.de ([62.245.132.108]:33026 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422664Ab3LTOYX (ORCPT ); Fri, 20 Dec 2013 09:24:23 -0500 Received: from localhost ([127.0.0.1] helo=bazinga.breakpoint.cc) by Galois.linutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1Vu102-0004Ju-3x; Fri, 20 Dec 2013 15:24:22 +0100 From: Sebastian Andrzej Siewior To: linux-fbdev@vger.kernel.org Cc: Tomi Valkeinen , Jean-Christophe Plagniol-Villard , Sebastian Andrzej Siewior Subject: [PATCH] video/logo: don't look for the logo after system boot Date: Fri, 20 Dec 2013 15:24:20 +0100 Message-Id: <1387549460-18501-1-git-send-email-bigeasy@linutronix.de> X-Mailer: git-send-email 1.8.5.1 X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1, SHORTCIRCUIT=-0.0001, URIBL_BLOCKED=0.001 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If the primary GPU driver has been loaded _after_ system as a module then this logo memory is no longer valid. Managed to crash the system by booting a box without a GPU and then hotpluggin => BOOM. Signed-off-by: Sebastian Andrzej Siewior --- drivers/video/logo/logo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/video/logo/logo.c b/drivers/video/logo/logo.c index 080c35b..a26bb16 100644 --- a/drivers/video/logo/logo.c +++ b/drivers/video/logo/logo.c @@ -36,6 +36,9 @@ const struct linux_logo * __init_refok fb_find_logo(int depth) if (nologo) return NULL; + if (system_state != SYSTEM_BOOTING) + return NULL; + if (depth >= 1) { #ifdef CONFIG_LOGO_LINUX_MONO /* Generic Linux logo */