Received: with ECARTIS (v1.0.0; list netdev); Thu, 30 Dec 2004 05:13:29 -0800 (PST) Received: from mx02.cybersurf.com (mx02.cybersurf.com [209.197.145.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id iBUDCwqf030250 for ; Thu, 30 Dec 2004 05:13:19 -0800 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1Ck0B4-0008LF-Hl for netdev@oss.sgi.com; Thu, 30 Dec 2004 08:17:18 -0500 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1Ck0B2-0006dj-IL; Thu, 30 Dec 2004 08:17:16 -0500 Subject: Re: [PATCH PKT_SCHED 17/17]: Disable broken override bits in pedit action From: jamal Reply-To: hadi@cyberus.ca To: Patrick McHardy Cc: Maillist netdev In-Reply-To: <41D378FF.3080205@trash.net> References: <41D378FF.3080205@trash.net> Content-Type: text/plain Organization: jamalopolous Message-Id: <1104412634.1048.106.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 30 Dec 2004 08:17:14 -0500 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.80/638/Tue Dec 21 14:41:34 2004 clamav-milter version 0.80j on 127.0.0.1 X-Virus-Status: Clean X-archive-position: 13236 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev On Wed, 2004-12-29 at 22:41, Patrick McHardy wrote: > Disable broken override bits in pedit action. It misses > locking and needs to allocate new memory if nkeys increases. > Also disable it for now. > There are a couple of these that you have (ipt being other). Could you just add a check for size before returning -EOPNOTSUPP? Example: if (ovr) if (p->nkeys != parm->nkeys) return -EOPNOTSUPP; This way if they are of the same size then things should work as is and my testcases dont break. Now if you feel more gracious, go ahead and fix them ;-> > ret = -EEXIST; > if (ovr) { > + /* FIXME: no locking, larger memory area might be required */ > + return -EOPNOTSUPP; > ret = 0; > override: > p->flags = parm->flags; cheers, jamal