Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261411AbUKSOEP (ORCPT ); Fri, 19 Nov 2004 09:04:15 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261412AbUKSOEP (ORCPT ); Fri, 19 Nov 2004 09:04:15 -0500 Received: from orion.netbank.com.br ([200.203.199.90]:32275 "EHLO orion.netbank.com.br") by vger.kernel.org with ESMTP id S261411AbUKSOEL (ORCPT ); Fri, 19 Nov 2004 09:04:11 -0500 Message-ID: <419DEF98.9040303@conectiva.com.br> Date: Fri, 19 Nov 2004 11:05:28 -0200 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.9 (X11/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Chris Wright Cc: Ross Kendall Axe , James Morris , netdev@oss.sgi.com, Stephen Smalley , lkml , "David S. Miller" Subject: Re: [PATCH] linux 2.9.10-rc1: Fix oops in unix_dgram_sendmsg when using SELinux and SOCK_SEQPACKET References: <20041118084449.Z14339@build.pdx.osdl.net> <419D6746.2020603@blueyonder.co.uk> <20041118231943.B14339@build.pdx.osdl.net> In-Reply-To: <20041118231943.B14339@build.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1394 Lines: 35 Chris Wright wrote: > * Ross Kendall Axe (ross.axe@blueyonder.co.uk) wrote: > >>Taking this idea further, couldn't we split unix_dgram_sendmsg into 2 >>functions, do_unix_dgram_sendmsg and do_unix_connectionless_sendmsg (and >>similarly for unix_stream_sendmsg), then all we'd need is: >> >> >>static int do_unix_dgram_sendmsg(...); >>static int do_unix_stream_sendmsg(...); >>static int do_unix_connectionless_sendmsg(...); >>static int do_unix_connectional_sendmsg(...); > > > We could probably break it down to better functions and helpers, but I'm > not sure that's quite the breakdown. That looks to me like an indirect > way to pass a flag which is already encoded in the ops and sk_type. > At anyrate, for 2.6.10 the changes should be small and obvious. > Better refactoring should be left for 2.6.11. Hey, go ahead, do the split and please, please use sk->sk_prot, that is the way to do the proper split and will allow us to nuke several pointers in struct sock (sk_slab, sk_owner for now) :-) I have a friend doing this for X.25, will submit his patches as soon as we do some more testing and 2.6.10 is out. - Arnaldo - 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/