From patchwork Wed Dec 22 14:20:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 79636 Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1n02UH-00DUKF-Pv; Wed, 22 Dec 2021 14:21:02 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245698AbhLVOU6 (ORCPT + 1 other); Wed, 22 Dec 2021 09:20:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245664AbhLVOUy (ORCPT ); Wed, 22 Dec 2021 09:20:54 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC526C061401; Wed, 22 Dec 2021 06:20:54 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8248AB81CF1; Wed, 22 Dec 2021 14:20:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DAB9C36AEB; Wed, 22 Dec 2021 14:20:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1640182852; bh=VgxL4j+yOUkkk/vgfENOj/oZDG5YSOK8ngjyMZDyut8=; h=From:To:Cc:Subject:Date:From; b=Jr81o+Pbylb9Zl6RTIzCV+ueTnDPnNKOSiIFSoJwUrvNawpwHWZf61w9IUTvECZZa yFogu82GASsZQKJ/rupRax/B5p2rFJBcmFhmIx/74ZixZq9OZBIAC9raQsKLWYM9W+ T14V0zufJmY6hraNzalXYQDv+Hl0+llPQnLYpZEERwF8NOxuEwoBbXRNRmit8Ia4Ph 0juFIbpsXh664ZvM1jtZItdQWhJjLqxU9ofxWA2vl3k2VbeLtzWKoRLpp3f5adWtT0 93N+WjY2rC9OH1MyArFS/d6W2fxmao5IJvVgRv1D5P8v/XNqVSRAxl2QBzSbAWRY3Z W1xZocEqi5r7g== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1n02Tz-0007uh-TY; Wed, 22 Dec 2021 15:20:44 +0100 From: Johan Hovold To: "Lad, Prabhakar" Cc: Mauro Carvalho Chehab , Hans Verkuil , Kevin Hilman , Greg Kroah-Hartman , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 0/4] media: davinci: vpif: fix use-after-free on driver unbind Date: Wed, 22 Dec 2021 15:20:21 +0100 Message-Id: <20211222142025.30364-1-johan@kernel.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -3.1 (---) X-LSpam-Report: No, score=-3.1 required=5.0 tests=BAYES_00=-1.9,DKIMWL_WL_HIGH=0.001,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,DKIM_VALID_EF=-0.1,MAILING_LIST_MULTI=-1 autolearn=ham autolearn_force=no When scanning the tree for drivers that did not handle platform-device registration failures properly I stumbled upon this driver, which also failed to deregister device structures before freeing them. Included are also some related runtime PM imbalance fixes and a printk clean up. Johan Johan Hovold (4): media: davinci: vpif: fix unbalanced runtime PM get media: davinci: vpif: fix unbalanced runtime PM enable media: davinci: vpif: fix use-after-free on driver unbind media: davinci: vpif: drop probe printk drivers/media/platform/davinci/vpif.c | 111 +++++++++++++++++++------- 1 file changed, 81 insertions(+), 30 deletions(-)