Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2370196rdb; Tue, 10 Oct 2023 01:39:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG8boCtntWXDkJudupz40yyA1Q2U68AvIUUdpGyxrQRRaRAFwbhciSvFBwmjTB5gGwCKhKc X-Received: by 2002:a05:6871:79c:b0:1c0:1424:5e6c with SMTP id o28-20020a056871079c00b001c014245e6cmr17010193oap.17.1696927189429; Tue, 10 Oct 2023 01:39:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696927189; cv=none; d=google.com; s=arc-20160816; b=WfKkwgY1Y/6OczyJwma2Y8HEwRMgR9YgtoU0JTLKqwqVCyIuaia2SXkYhHoJnL8pWH fcY4dygtre/R+0obUtJdOPoUnGScDExjhV0btobVwjqtiL021H5UzWpo+Uk/he6EVmf1 8Ig1tvhVOHJk61Isp8XGKddFV5dy5X706EPOn6Q/X+cPRZKIeqr5MuAsnoifwjlqD/uO Q2BwAIBKcJ2QKVEjY0axBooVel3oLR39hLH8jpdcjV4+iNJLZJRXZ8tcRbsyFYrdQg0e urM5RJv9/rlaaZ/3bI2Atpsivh7HhJ41TaBtoU0SeK5AM6XPRMiC8J89CZYML9hhUbUN 2z/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=bM0cR+jHfOI2qILAaNh+9FecRjTICMAQmR3rcDSCM5s=; fh=SlSXyJvLU1fv5U3btislCesRqjVWPlBZ4pVt1IDJ6o0=; b=kVYu9B8knlG7tZvKl4Ejrpd7RyIbUV2qoSMrW+mDZglTqsMmOzS1zGRMsZy1V7p7xP 8/Yd/IZ9h1tHyQNdyfdvdk0iUFAgIN50HG+2kicf7j4vVI0kWY+e4aecqClljH8pdaJu WeyTRMKx+8fKwGi3xfET96kyXxUofQdLoCU/h6saa84s9Sg/rRKcOapmSL1Ca/wEKi3k /fa81pNGWTwM9Lsi8ENiVLUWZsnnCwprBClRUNtaoFhw675r//YznD7SX/jdxyZcA0xd KCn/4njFqP9XmPXPMSZ9mEyxk0nrqvc0GvaG/nsXDB+y28VTzgjRLb5G77kn1N0urLxc Fmeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ziMYtP6X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id b4-20020a056a000cc400b0068fc9c6eafasi9400624pfv.357.2023.10.10.01.39.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 01:39:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ziMYtP6X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 89C3280238A0; Tue, 10 Oct 2023 01:39:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377833AbjJJIjT (ORCPT + 99 others); Tue, 10 Oct 2023 04:39:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234051AbjJJIiv (ORCPT ); Tue, 10 Oct 2023 04:38:51 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 315EA10D7 for ; Tue, 10 Oct 2023 01:37:55 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-31c5cac3ae2so4904796f8f.3 for ; Tue, 10 Oct 2023 01:37:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696927073; x=1697531873; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:date:message-id:subject :references:in-reply-to:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bM0cR+jHfOI2qILAaNh+9FecRjTICMAQmR3rcDSCM5s=; b=ziMYtP6XnI5X/X6u8l48fDfTYxSLpHEFDr2dB9HbzIKq7cXqaLwKgdxFBl4ybt8QOW 10fefAIih7+o8LMm7Sz/kCzKGEvHkpxj53+n2ubkbi1TNtwSX1qWqdJl9LkSrrhdCipu TvSJdVxRQ5nFm/kDIl/vPbOIlWsCoIudxboJFMY3ig4arnA6OZAc9eArWpmRwSG3ob2p dejqCdCtacNZFQUi46NL2IPtPBJMlmUb+KIFZjkv6gihpgSH31z2nhn2nYXf272aN4e0 yP9DnVvScFtB+DFnGew3hBeSrdljBgyUemBCBGMKOby2WHLZ+yUTfT3DmclCH5fFWyOC /vhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696927073; x=1697531873; h=content-transfer-encoding:mime-version:date:message-id:subject :references:in-reply-to:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bM0cR+jHfOI2qILAaNh+9FecRjTICMAQmR3rcDSCM5s=; b=qyx06W6dHYCdzblGxwtHa8oaHXfJJ7Np0GJIH4q/v+qKedXOTD9TM3tYkS0MDmr95c G+bzCkPhGDgqlhTN76Xm9u/YXDYEn5m11rFyChJI/gbMpq2PSIItQ+INd8tnRR/3L0Yu 9cVDKMk6BwuImI1Gb+6iyRF6OYzP74LryoaAqh7YrUIopsbJNih+0ZoNVCvjyKGh+8yd koqJQ0VDmGcKmRCpzUrp3sYBLtuF2fa9rQeGzmgqSKxShbbt1j5ww7vFYqwxBnCx4Dvs vqwGmejrvNJ4k/NNnRmNl6kYMSTTQgxjEIw/dLGE9MQN16UJPzUddybZNItCuD3T0zlJ ie8A== X-Gm-Message-State: AOJu0YwZ6Ol+kuNLtDdg0z1Ws4V+cVzNmD/vbVlKZaLmndDovC8Nlf4W Cmy8q2wrNoFQNLnCU1fEQq193g== X-Received: by 2002:adf:d1cf:0:b0:32c:d0e0:3e71 with SMTP id b15-20020adfd1cf000000b0032cd0e03e71mr1289947wrd.38.1696927073358; Tue, 10 Oct 2023 01:37:53 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id s4-20020a5d6a84000000b00327bf4f2f14sm11983147wru.88.2023.10.10.01.37.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 01:37:53 -0700 (PDT) From: Neil Armstrong To: linus.walleij@linaro.org, sam@ravnborg.org, airlied@gmail.com, daniel@ffwll.ch, Ma Ke Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org In-Reply-To: <20231009090446.4043798-1-make_ruc2021@163.com> References: <20231009090446.4043798-1-make_ruc2021@163.com> Subject: Re: [PATCH v2] drm/panel/panel-tpo-tpg110: fix a possible null pointer dereference Message-Id: <169692707268.2632460.16120897194118078768.b4-ty@linaro.org> Date: Tue, 10 Oct 2023 10:37:52 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.12.3 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 10 Oct 2023 01:39:33 -0700 (PDT) X-Spam-Level: ** Hi, On Mon, 09 Oct 2023 17:04:46 +0800, Ma Ke wrote: > In tpg110_get_modes(), the return value of drm_mode_duplicate() is > assigned to mode, which will lead to a NULL pointer dereference on > failure of drm_mode_duplicate(). Add a check to avoid npd. > > Thanks, Applied to https://anongit.freedesktop.org/git/drm/drm-misc.git (drm-misc-next) [1/1] drm/panel/panel-tpo-tpg110: fix a possible null pointer dereference https://cgit.freedesktop.org/drm/drm-misc/commit/?id=f22def5970c423ea7f87d5247bd0ef91416b0658 -- Neil