[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/2] x86: Check return values from early_memremap calls
- To: Dave Hansen <dave.hansen@xxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx
- From: Ross Philipson <ross.philipson@xxxxxxxxxx>
- Date: Thu, 10 Nov 2022 14:30:26 -0500
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=O8ZQBeQ4uz997ZkYw7OOdLDUfFU9LYeBcDcBTLN/pnA=; b=JXCutMoB0lgZkhtMUUZxi0/oftunNQvs4kf4qhbZJvad840JWb342zq6c18COwiUdIpOUELhz0Imxy7/+ETBp9OO1MWpKAiRhV2wLnMKut7lHhLvGDrLcraROxXJYAWU21Za7EnoZJ/okLPg/rQgSlHymtwucJkG+Q8ga5JeWyUkYYkivo2waVRFs/L77tCzEOSXevOIdKf05XWg/BzF7tJZ1qkxkfL1ctfAX2qVOCYF9L7yWvYn2H/nCOEaG2XQeF4QlEQdkZE+Ub3/VAoO21CR8UZkDjxLSaeGy6hHeU0sAT0g+Hp2tsQt1CYH77LKR9O7FzXGbzwzn/+DKVyHSA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NcX7SPicFWGGLjP8I8YWtsQzk2UmytGdrMlunr8n/hEPkRxARoOiNxWYvZN8aH4odJGouzoUra1tMEeYuhpzLI2mBeJPQxhMNhG6HnKs4a01M0XvLkn5mpCABuww3IigLBlTN2mOAvd499hjYoV8aqFnA8vK3Cw6KNRCRz1GWo4HcUNXQxBgDbZnuSJpg31YNSz8vKkGhrkXPciIyr/iuyLhI690Lxnj6R6/ABHEEy16I9OUqG9MA/FxfohHtVSd9D41Lbb+C3BzdCeRTBl9E2Ilm8USIcMnMalzvOs2QGWz4BGlzdFzCCW/UKlzEJ6MNV0iJbj6VjU32ewOP/GklQ==
- Cc: dpsmith@xxxxxxxxxxxxxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, bp@xxxxxxxxx, hpa@xxxxxxxxx, luto@xxxxxxxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, kanth.ghatraju@xxxxxxxxxx, trenchboot-devel@xxxxxxxxxxxxxxxx, jailhouse-dev@xxxxxxxxxxxxxxxx, jan.kiszka@xxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, jgross@xxxxxxxx, boris.ostrovsky@xxxxxxxxxx, andrew.cooper3@xxxxxxxxxx
- Delivery-date: Thu, 10 Nov 2022 20:11:12 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 11/10/22 11:07, Dave Hansen wrote:
On 11/10/22 07:45, Ross Philipson wrote:
dt = early_memremap(initial_dtb, map_len);
+ if (!dt) {
+ pr_warn("failed to memremap initial dtb\n");
+ return;
+ }
Are all of these new pr_warn/err()'s really adding much value? They all
look pretty generic. It makes me wonder if we should just spit out a
generic message in early_memremap() and save all the callers the trouble.
These changes were prompted by some comments on an earlier patch set I
sent. It was requested that I fix the other missing checks for NULL
returns from these functions but I thought that was out of scope for
that patch set. So I agreed to submit this set and add the checks making
things consistent.
Oh, and don't we try to refer to functions() with parenthesis?
Yes I can fix that.
Thanks
Ross
|