From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eduardo Valentin Subject: Re: [PATCHv4 1/4] procfs: Introduce socinfo under /proc Date: Mon, 10 May 2010 16:08:09 +0300 Message-ID: <20100510130809.GC11804@besouro.research.nokia.com> References: <1273487857-32281-1-git-send-email-eduardo.valentin@nokia.com> <1273487857-32281-3-git-send-email-eduardo.valentin@nokia.com> <1273487857-32281-1-git-send-email-eduardo.valentin@nokia.com> <1273487857-32281-2-git-send-email-eduardo.valentin@nokia.com> <20100510111259.GA14680@linux-sh.org> <20100510125440.GA31721@nokia.com> Reply-To: eduardo.valentin@nokia.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from smtp.nokia.com ([192.100.105.134]:22289 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752011Ab0EJNE7 (ORCPT ); Mon, 10 May 2010 09:04:59 -0400 Content-Disposition: inline In-Reply-To: <20100510125440.GA31721@nokia.com> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: "Balbi Felipe (Nokia-D/Helsinki)" Cc: ext Paul Mundt , "Valentin Eduardo (Nokia-D/Helsinki)" , LKML , "linux-arm-kernel@lists.infradead.org" , Linux-OMAP , Russell King , Andrew Morton , ext Tony Lindgren , ext Kevin Hilman , "De-Schrijver Peter (Nokia-D/Helsinki)" , "santosh.shilimkar@ti.com" , Ambresh On Mon, May 10, 2010 at 02:54:40PM +0200, Balbi Felipe (Nokia-D/Helsinki) wrote: > On Mon, May 10, 2010 at 01:13:00PM +0200, ext Paul Mundt wrote: > >You'll still need the show function, but all of the rest of this is just > >duplicating what single_open() already does. If the socinfo string is > >static you may also want to rework this a bit so you can just stash the > >string in the proc_dir_entry private data. Combine this with something > >like kstrdup() and you'll save yourself a bit of stack while you're at > >it. > > doesn't ksrtdup() cause memleak ?? Or is it only when used with > module parameters ?? I'm not aware of the module parameter stuff.. but the leak might be other thing than kstrdup? > > -- > balbi > > DefectiveByDesign.org