From mboxrd@z Thu Jan 1 00:00:00 1970 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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 73D73C433ED for ; Fri, 9 Apr 2021 14:03:55 +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 B73C261108 for ; Fri, 9 Apr 2021 14:03:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B73C261108 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=users.sourceforge.jp Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUrjl-0005ir-Px for qemu-devel@archiver.kernel.org; Fri, 09 Apr 2021 10:03:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUriT-0004mZ-Ih for qemu-devel@nongnu.org; Fri, 09 Apr 2021 10:02:33 -0400 Received: from mail01.asahi-net.or.jp ([202.224.55.13]:33192) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUrhz-0000i6-E1 for qemu-devel@nongnu.org; Fri, 09 Apr 2021 10:02:33 -0400 Received: from sakura.ysato.name (ik1-413-38519.vs.sakura.ne.jp [153.127.30.23]) (Authenticated sender: PQ4Y-STU) by mail01.asahi-net.or.jp (Postfix) with ESMTPA id A857A33237; Fri, 9 Apr 2021 23:01:58 +0900 (JST) Received: from localhost.ysato.ml (ZM005235.ppp.dion.ne.jp [222.8.5.235]) by sakura.ysato.name (Postfix) with ESMTPSA id D23851C0376; Fri, 9 Apr 2021 23:01:57 +0900 (JST) Date: Fri, 09 Apr 2021 23:01:54 +0900 Message-ID: From: Yoshinori Sato To: Philippe =?ISO-8859-1?Q?Mathieu-Daud=E9?= Subject: Re: [PATCH-for-6.0?] hw/rx/rx-gdbsim: Do not accept invalid memory size In-Reply-To: <20210407223056.1870497-1-f4bug@amsat.org> References: <20210407223056.1870497-1-f4bug@amsat.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (arm-unknown-linux-androideabi) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Received-SPF: softfail client-ip=202.224.55.13; envelope-from=ysato@users.sourceforge.jp; helo=mail01.asahi-net.or.jp X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no 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-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Thu, 08 Apr 2021 07:30:56 +0900, Philippe Mathieu-Daud=E9 wrote: >=20 > We check the amount of RAM is enough, warn when it is > not, but if so we neglect to bail out. Fix that by > adding the missing exit() call. >=20 > Fixes: bda19d7bb56 ("hw/rx: Add RX GDB simulator") > Signed-off-by: Philippe Mathieu-Daud=E9 > --- > hw/rx/rx-gdbsim.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c > index b1d7c2488ff..4e4ececae4b 100644 > --- a/hw/rx/rx-gdbsim.c > +++ b/hw/rx/rx-gdbsim.c > @@ -93,6 +93,7 @@ static void rx_gdbsim_init(MachineState *machine) > char *sz =3D size_to_str(mc->default_ram_size); > error_report("Invalid RAM size, should be more than %s", sz); > g_free(sz); > + exit(1); > } > =20 > /* Allocate memory space */ > --=20 > 2.26.3 >=20 Reviewed-by: Yoshinori Sato --=20 Yoshinori Sato