Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3828390ybp; Sun, 6 Oct 2019 21:27:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZz0gyHj/TXeheoPl9X7Xv3h0bWfh+hggDk6pwXivrxo5k5GRofNM1TlHGuf+AUNLdHxPD X-Received: by 2002:a17:906:3486:: with SMTP id g6mr12378271ejb.262.1570422424156; Sun, 06 Oct 2019 21:27:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570422424; cv=none; d=google.com; s=arc-20160816; b=mj8sjQBG3NDJiyo0eTm9SGQ92g+8etNA3uKpZiC/2RyOA9oVssZnv9Jvym5D0cNClR Z375Q3isah6ZwHH6k2nf4bv4Ra3iIgBp9UbcqXJNYhq+zCwX720hEOzo0O2KFuIrN2y6 EXzxI58F/BeB7JxoxVO1YvThiN4dAuQD6BZYwXzfVX6VM7/gc5e6bCEz4cdJvQL/Cq5r Yq8tSxaoqm6XaR60o93vXynDQcnfgr5rwdR4Hm3gx8W/hMpIrjINmIjFLbM+0o+NXldj Bo7+lLFdAmpiPF7ie717xiLz4AC/O2HJRJnwHBMyPXfD3D6AMbwtj8AK7rdQXyq0FtTh Gx0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=9cn7hWNDSYfp5yXqFFW958D3/KZM4oLb6q2uNhX0rvU=; b=NpXTljeMOdyVOy6rSonXv5MxRaAPzX04pv/QE59fttIAE7aQy+Zue12sfHKpV+2WZ3 LRcoQ+30eZlkQx2AcWxuktaQi6pJ0N7Dt4SgKmopIWk0S73MyNlTQZdQG4vq7dx34swZ ew0pIsguSB608jzhZ7zTtgap4pQJMk6JodtF7hrekRPo12KusvmRJkT0mD6GenjLsl2Y hjSzbxSQJB/ZZ408IPUDfYd0AIUV1jrwzw9/LrY1LZ6KX70LGkUbA07SOnWjyXreGmso oYowDsm6uv7YV70LMHwEylWuTH0fSRAifz1SvgofJ7rh2K6/zFSVNsNhSFaC3xV5oekE oIAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SUkPcE54; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si6425083ejb.348.2019.10.06.21.26.30; Sun, 06 Oct 2019 21:27:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SUkPcE54; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727059AbfJGE00 (ORCPT + 99 others); Mon, 7 Oct 2019 00:26:26 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:45107 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726889AbfJGE00 (ORCPT ); Mon, 7 Oct 2019 00:26:26 -0400 Received: by mail-io1-f66.google.com with SMTP id c25so25565702iot.12; Sun, 06 Oct 2019 21:26:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=9cn7hWNDSYfp5yXqFFW958D3/KZM4oLb6q2uNhX0rvU=; b=SUkPcE54QuOqWOsnTUJ9OupBTtoc/62vjs+pcRhRlW91ahBSnrBEF2wJljxoPdk46O GQNGPESN0Ff1RrPM/aD2eDoqVXb+yyUkqzRTseS2sSq2nQQwQqXYcdkqHqgpVj9DePe8 tM9olm3uxcRFSegXNDygnKTMAuMofJXZ3P2N1WakZ6wdpqOh3yfXAI14bWRts8LxVczv XF8H7QDA1WLazodSRkecb3uBVrzIfNoErB7x0n+nImaKizevHEHlyp7pcZAZcbrqPrl2 Jqe1KFZLSRNlUOZ2kuG5LaDeSZ4tMyZAc8YmsHCc2YMoeJY0aERGwrVx0T75kbkLfzFI +vgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=9cn7hWNDSYfp5yXqFFW958D3/KZM4oLb6q2uNhX0rvU=; b=OqoofVKhenVt9fHFEWWjwvjH0zytajUPXipp+Uqu/e6rl6CY0Dv6AgFZoCCThWEvev Nmcb1tbksbQsG2VRWmYIPnlQRJhz/TC9Kx1dkRxD4R4YVB9v9yAwjmNBWjOC4wJzFA7P WNuIZj4Z+Av9Cl04aC8EqHd15KFS5nrFXDYKZ16PzUUBpKDwHdpPoABnprvjA1UtKH0O /7jO6jY/C2VzpaRrVzC4JmdO0gpWeMLOFVFULzqJXdiWCAYOJ/E+5RxbRahK+WiHhbEM kJN6lWll1rEIR/8/+1hZXZ4cgf2HT2syZ3mTYyL6JYjgQlKIs60Vi3jZonprEpaVuWAk Qw1w== X-Gm-Message-State: APjAAAXdHfqjXKc1sMsTyxktqAI+ogFUYreA7ISYMWPSQemciTJHAuO9 wf70lJ6bioMYyhYckyXVgQBy5Aj13AsA16Mzguo= X-Received: by 2002:a92:a80c:: with SMTP id o12mr25789967ilh.190.1570422383586; Sun, 06 Oct 2019 21:26:23 -0700 (PDT) MIME-Version: 1.0 References: <20191004190938.15353-1-navid.emamdoost@gmail.com> <540321eb-7699-1d51-59d5-dde5ffcb8fc4@web.de> In-Reply-To: <540321eb-7699-1d51-59d5-dde5ffcb8fc4@web.de> From: Navid Emamdoost Date: Sun, 6 Oct 2019 23:26:12 -0500 Message-ID: Subject: Re: drm/imx: Checking a kmemdup() call in imx_pd_bind() To: Markus Elfring Cc: dri-devel@lists.freedesktop.org, Pengutronix Kernel Team , linux-arm-kernel@lists.infradead.org, NXP Linux Team , Navid Emamdoost , Kangjie Lu , Stephen McCamant , Daniel Vetter , David Airlie , Fabio Estevam , Philipp Zabel , Sascha Hauer , Shawn Guo , LKML , kernel-janitors@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Markus, I agree with you, kmemdup may fail so a null check seems necessary there. On Sun, Oct 6, 2019 at 4:33 AM Markus Elfring wrote= : > > I have taken another look also at the implementation of the function =E2= =80=9Cimx_pd_bind=E2=80=9D. > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/d= rivers/gpu/drm/imx/parallel-display.c?id=3D43b815c6a8e7dbccb5b8bd9c4b099c24= bc22d135#n197 > https://elixir.bootlin.com/linux/v5.4-rc1/source/drivers/gpu/drm/imx/para= llel-display.c#L197 > > Now I find an unchecked call of the function =E2=80=9Ckmemdup=E2=80=9D su= spicious. > Will this detail trigger further software development considerations? > > Regards, > Markus --=20 Navid.