From patchwork Fri Apr 16 07:47:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Hartmayer X-Patchwork-Id: 12206831 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83D28C433B4 for ; Fri, 16 Apr 2021 07:49:47 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DA6DC6113D for ; Fri, 16 Apr 2021 07:49:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA6DC6113D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:52896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXJEX-0003Ef-Qu for qemu-devel@archiver.kernel.org; Fri, 16 Apr 2021 03:49:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXJCu-0001zu-NW; Fri, 16 Apr 2021 03:48:04 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:62726 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXJCr-0003ED-FO; Fri, 16 Apr 2021 03:48:04 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13G7Y09r027624; Fri, 16 Apr 2021 03:47:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=nhnLJfk998j4jXJX2GUEMtkLv35fQTvL+7aylhHCdVU=; b=ImZqXGy/po9PtyxPddfEy7DhlHMJvOJZSN06HPl/W+EABcjRLO0Sj8keOXUddy4//Wvz X0XSGex9Ov/Q5a7TVdGY8UTMvaHGF19YY90+urca01lbKfKC/bHEUlrrMbTPtxRgXTiO iRJ6qqSYyeZ9ast98rAALKRaC5kxI1mNNVdludjaFF7n8r5Y/r2acAbVOMBQP7aQVuP+ mTzQ+wm/X2cQh6mJTcQ5hKDOjronIxLgWH8HvshwAai8P+0koisKKK1Lyg2q4GH/Cv3X sAwT5h7+/z3+pK3REnAOp9WEL60a92TjkLR108ktR6TxYtcSIBL+7XDBTAB7/iYbdMHo wA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 37xbpu772b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Apr 2021 03:47:58 -0400 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 13G7YovJ030007; Fri, 16 Apr 2021 03:47:58 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 37xbpu771x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Apr 2021 03:47:57 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 13G7gR2e012662; Fri, 16 Apr 2021 07:47:56 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma04ams.nl.ibm.com with ESMTP id 37u3n8var2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Apr 2021 07:47:56 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 13G7lVND28049878 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 16 Apr 2021 07:47:31 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C557C4C046; Fri, 16 Apr 2021 07:47:53 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 746324C044; Fri, 16 Apr 2021 07:47:53 +0000 (GMT) Received: from marcibm.fritz.box (unknown [9.171.61.175]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 16 Apr 2021 07:47:53 +0000 (GMT) From: Marc Hartmayer To: Subject: [PATCH] pc-bios/s390-ccw: don't try to read the next block if end of chunk is reached Date: Fri, 16 Apr 2021 09:47:36 +0200 Message-Id: <20210416074736.17409-1-mhartmay@linux.ibm.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: -oRsTP-OofabORSkwz7Q5tWjE1CWmYoD X-Proofpoint-GUID: NMrLPP7jzjZihAZB_d4Cnabr8gEYK2d4 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-04-15_11:2021-04-15, 2021-04-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxlogscore=827 clxscore=1011 suspectscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 bulkscore=0 mlxscore=0 spamscore=0 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2104160056 Received-SPF: pass client-ip=148.163.158.5; envelope-from=mhartmay@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-s390x , Thomas Huth , "Collin L. Walling" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Don't read the block if a null block number is reached, because this means that the end of chunk is reached. Reviewed-by: Collin Walling Signed-off-by: Marc Hartmayer Acked-by: Thomas Huth --- pc-bios/s390-ccw/bootmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c index 44df7d16afca..b46997c0b7c1 100644 --- a/pc-bios/s390-ccw/bootmap.c +++ b/pc-bios/s390-ccw/bootmap.c @@ -213,7 +213,7 @@ static int eckd_get_boot_menu_index(block_number_t s1b_block_nr) next_block_nr = eckd_block_num(&s1b->seek[i + 1].chs); } - if (next_block_nr) { + if (next_block_nr && !is_null_block_number(next_block_nr)) { read_block(next_block_nr, s2_next_blk, "Cannot read stage2 boot loader"); }