linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Grigory Vasilyev <h0tc0d3@gmail.com>, Simon Ser <contact@emersion.fr>
Cc: "Bas Nieuwenhuizen" <bas@basnieuwenhuizen.nl>,
	"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
	"Melissa Wen" <mwen@igalia.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Pan, Xinhui" <Xinhui.Pan@amd.com>,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Michel Dänzer" <mdaenzer@redhat.com>,
	"Evan Quan" <evan.quan@amd.com>,
	"Sean Paul" <seanpaul@chromium.org>,
	"Qingqing Zhuo" <qingqing.zhuo@amd.com>,
	"amd-gfx mailing list" <amd-gfx@lists.freedesktop.org>,
	"ML dri-devel" <dri-devel@lists.freedesktop.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/amdgpu: Fix NULL pointer dereference
Date: Fri, 8 Apr 2022 16:30:06 +0200	[thread overview]
Message-ID: <436116c9-6ce4-87cc-b1cd-f44b72fcfb35@amd.com> (raw)
In-Reply-To: <CAD5ugGD6QzCUqk7_EVwH9Cc6PQtx_VfjVRWzzP9uKR5tkGh1RQ@mail.gmail.com>

Am 08.04.22 um 15:21 schrieb Grigory Vasilyev:
> Simon Ser and Bas Nieuwenhuizen, do you understand that you are
> proposing to make the code less safe in the future? In the future,
> someone might rewrite the code and we'll get an error.

Which is perfectly fine.

See error handling is to handle userspace or hardware errors and *not* 
coding errors.

Testing all pointers for NULL without any reason is not defensive, but 
rather the exactly opposite since it helps hiding real bugs.

Regards,
Christian.

>
> пт, 8 апр. 2022 г. в 14:48, Simon Ser <contact@emersion.fr>:
>> On Friday, April 8th, 2022 at 13:28, Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> wrote:
>>
>>> On Fri, Apr 8, 2022 at 12:01 PM Simon Ser contact@emersion.fr wrote:
>>>
>>>> Is amdgpu_display_get_fb_info ever called with NULL tiling_flags/tmz_surface?
>>>> If not, there's no point in adding NULL checks.
>>> It isn't called with NULL anywhere, the NULL checks that already exist
>>> seem redundant.
>> Grigory, would be be willing to submit a v2 which removes the unnecessary
>> NULL checks?


  parent reply	other threads:[~2022-04-08 14:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-08  9:28 [PATCH] drm/amdgpu: Fix NULL pointer dereference Grigory Vasilyev
2022-04-08 10:01 ` Simon Ser
2022-04-08 11:28   ` Bas Nieuwenhuizen
2022-04-08 11:48     ` Simon Ser
2022-04-08 13:21       ` Grigory Vasilyev
2022-04-08 13:26         ` Simon Ser
2022-04-08 14:30         ` Christian König [this message]
2022-04-10  0:51           ` Grigory Vasilyev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=436116c9-6ce4-87cc-b1cd-f44b72fcfb35@amd.com \
    --to=christian.koenig@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=bas@basnieuwenhuizen.nl \
    --cc=contact@emersion.fr \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=evan.quan@amd.com \
    --cc=h0tc0d3@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mdaenzer@redhat.com \
    --cc=mwen@igalia.com \
    --cc=qingqing.zhuo@amd.com \
    --cc=seanpaul@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).