Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2224589pxb; Wed, 30 Mar 2022 19:54:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQ4lAb/I7a3Dg7vZfU4Ec/JqxWxJSapHs6TMMcv7Cbt+BJ3zAfNiGJDhIibikw0aqtMVmE X-Received: by 2002:a63:dc42:0:b0:382:6aff:3f17 with SMTP id f2-20020a63dc42000000b003826aff3f17mr8826472pgj.5.1648695249014; Wed, 30 Mar 2022 19:54:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648695249; cv=none; d=google.com; s=arc-20160816; b=QvwQ9MWEwEI+HsjrnqIvHq74/5seyTTk74i3rzKQ6LgNiHvvONzoBuezvLJM0n2P// xQW+UVcJQoPNbkJFehiMQ1zYxbyV+d49iIpcdoCUn8aPAr4g5c7vqG8khom6ukQrBgpr YzauB3n1NHqXaLoSTBHa1u+HErqjZJyHMRxfe7Dpc/cbqsW37k9/cg2ginsuOHNjxZgh cu00mKJHo4fyhKSOY3HuIfJ4TEUKp5VPs2ocSdsZ1rYl3rJwvXXLzwDqv0W0EP9hw14G bz9XnizuDgD9u4H+h+5BBSBGueFDC9/DCYBbUa26ZU95ll1tjUnk9aA8x7f0/2nPpEhC TjHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=YRGPlvIToKb562p6jpcqMiBroPwvCRRHSOk7/6UpeLc=; b=lr1JUxcfmfLTfR4S1xTb4wFgIHe2ibj10jSyNuxXgo6tK4/mLbaaXMHY6Jq1l0JGhN 75vgVnp6dKnMTM3AOR9ACMLyLN67Y11ATbb726MH3X3boWG95VVrfUbhJ4FTi4efXpR3 43VpKKvq2dujGOjIGdOtfkw8G/+V1H0JaKjWrBm3xeSpS6bGZBZt6C+RIUv7oQVBMJXt LCCok2wdkoX9mqCplEU/Lxm73wxQIc66UDEaFc3/E5iltbb2rKDiObNWvqvFYXkzHeI8 XtCxesQ6FPK2GJJqJbhATyMgS4aWtE+qtw9KsQs+WJ2fDdmPgGj1SBq5u2sdpAj1NL1n 35VQ== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id y10-20020a655b4a000000b003816043f175si23099368pgr.874.2022.03.30.19.54.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 19:54:09 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0029C3BA63; Wed, 30 Mar 2022 19:39:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239774AbiC2QnY (ORCPT + 99 others); Tue, 29 Mar 2022 12:43:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239748AbiC2QnI (ORCPT ); Tue, 29 Mar 2022 12:43:08 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18A6F2498B5 for ; Tue, 29 Mar 2022 09:41:25 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZEuB-0005gu-6Z; Tue, 29 Mar 2022 18:41:15 +0200 Received: from [2a0a:edc0:0:900:1d::4e] (helo=lupine) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1nZEu5-003pAm-UL; Tue, 29 Mar 2022 18:41:12 +0200 Received: from pza by lupine with local (Exim 4.94.2) (envelope-from ) id 1nZEu7-000Ak7-W4; Tue, 29 Mar 2022 18:41:12 +0200 Message-ID: Subject: Re: [PATCH] drm/imx: imx-ldb: Check for null pointer after calling kmemdup From: Philipp Zabel To: Jiasheng Jiang , airlied@linux.ie, daniel@ffwll.ch, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Date: Tue, 29 Mar 2022 18:41:11 +0200 In-Reply-To: <20220105074729.2363657-1-jiasheng@iscas.ac.cn> References: <20220105074729.2363657-1-jiasheng@iscas.ac.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Preced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