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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 6A2C5C432BE for ; Wed, 18 Aug 2021 12:09:36 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (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 113606103A for ; Wed, 18 Aug 2021 12:09:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 113606103A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kroah.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1mGKNU-0003vy-M1; Wed, 18 Aug 2021 08:09:04 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mGKNP-0003v9-6O for kernelnewbies@kernelnewbies.org; Wed, 18 Aug 2021 08:08:59 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 8AAE65C0045; Wed, 18 Aug 2021 08:08:56 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 18 Aug 2021 08:08:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=6ZPmjOKWgI4Q8oqUgZ3TCQSwUC8 BVp/yDqJLqont0SA=; b=KFIUYmNpA5A3uw1FUPz3pe6Ecg5UeImNkgnsJL02XIc jW4rt3pQCaeiwzYiUikoPgHljzhLtnkAYx8ku1XnRW9mJLk7NJECG9BslnMp5Luv +nnvqaS5N/daE4cLk3NnijI6MQ5MguLY/r7bODC13/ye4lmmSQwupwW8+a2a1UM7 aHFNWWenVwlMDA4rco0KJe3a18gDmrTO2Idox/yxswqC2MLX+tbJgIeJJhpX2t8h QAuQF8M7ZZ3ptDU+XjXqgMTSQVfW8/yPFqpzjuhHhu8Bx5GKuhXXa08oD2CU7iAR n6wjPi+Br2fHIYj8ORh80C38JA3zRml5/QyT+Rz1/6Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=6ZPmjO KWgI4Q8oqUgZ3TCQSwUC8BVp/yDqJLqont0SA=; b=RTRRLsGbNRkcmJGBkviih9 5kiFkkNdmibYeNwh6Jk/uZZ05Z+fnUmFrWV6mcYNo/d8Q8735gjX4IuxdpDWWx38 +gcfJ+pw6SO2wTOOkeDzrShhfCbcZpu7fOpQd/giw6jK7r03odVuD+2ccwVtRiYB KS4DLfx9V6NHwPIhH1bbVCDuDlrdI69VszMPbQ9iB9ZzcnqAG2LNEo+wBUS43I+k fHHd/I/ZSbWpUkqzdw8Ccm5vgWq+3VdM5lR2E6RPXL+NjiC3kt9SQ4EryQpINpYw D1vdnvq/LlRe4PUfYwuDdqRGzixO0CEdv8qSxfNlLlXP8nsxhi5cJn1H1O/qKJdA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrleehgdeglecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtuggjsehttdertd dttddvnecuhfhrohhmpefirhgvghcumffjuceoghhrvghgsehkrhhorghhrdgtohhmqeen ucggtffrrghtthgvrhhnpeevueehjefgfffgiedvudekvdektdelleelgefhleejieeuge egveeuuddukedvteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehgrhgvgheskhhrohgrhhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 18 Aug 2021 08:08:55 -0400 (EDT) Date: Wed, 18 Aug 2021 14:08:52 +0200 From: Greg KH To: Lloyd Subject: Re: kmalloc - Crashing Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Cc: kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Wed, Aug 18, 2021 at 05:03:07PM +0530, Lloyd wrote: > Hi, > > I am starting to write linux kernel mode code. I am on Ubuntu 20.04. I have > written the following code > > The line DynPage[i]=0; //CRASH causes a crash. Can you please guide on > the reason for the crash? > > Thanks a lot in advance, > Lloyd > > #pragma GCC push_options > #pragma GCC optimize("O0") Why are you using these options? Try removing them and see what happens. _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies