Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 22 Mar 2003 14:20:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 22 Mar 2003 14:20:16 -0500 Received: from pc2-cwma1-4-cust86.swan.cable.ntl.com ([213.105.254.86]:23707 "EHLO irongate.swansea.linux.org.uk") by vger.kernel.org with ESMTP id ; Sat, 22 Mar 2003 14:20:15 -0500 Subject: Re: [PATCH] reduce stack in cdrom/optcd.c From: Alan Cox To: "Randy.Dunlap" Cc: Linux Kernel Mailing List , Linus Torvalds , leo@netlabs.net In-Reply-To: <3E7C0808.75B95FB7@verizon.net> References: <3E7C0808.75B95FB7@verizon.net> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: Message-Id: <1048365798.9221.35.camel@irongate.swansea.linux.org.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 22 Mar 2003 20:43:19 +0000 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 685 Lines: 20 On Sat, 2003-03-22 at 06:51, Randy.Dunlap wrote: > Hi, > > This reduces stack usage in drivers/cdrom/optcd.c by > dynamically allocating a large (> 2 KB) buffer. > > Patch is to 2.5.65. Please apply. This loosk broken. You are using GFP_KERNEL memory allocations on the read path of a block device. What happens if the allocation fails because we need memory Surely that buffer needs to be allocated once at open and freed on close ? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/