Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935073AbbKTJSZ (ORCPT ); Fri, 20 Nov 2015 04:18:25 -0500 Received: from mail.bmw-carit.de ([62.245.222.98]:53334 "EHLO mail.bmw-carit.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934928AbbKTJSV (ORCPT ); Fri, 20 Nov 2015 04:18:21 -0500 X-CTCH-RefID: str=0001.0A0C0205.564EE558.00D5,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 Subject: Re: [PATCH 4/7] netprio_cgroup: limit the maximum css->id to USHRT_MAX To: Tejun Heo , , , , , , References: <1447959171-20749-1-git-send-email-tj@kernel.org> <1447959171-20749-5-git-send-email-tj@kernel.org> CC: , , , , , , , From: Daniel Wagner Message-ID: <564EE556.5070907@bmw-carit.de> Date: Fri, 20 Nov 2015 10:18:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1447959171-20749-5-git-send-email-tj@kernel.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1043 Lines: 22 On 11/19/2015 07:52 PM, Tejun Heo wrote: > netprio builds per-netdev contiguous priomap array which is indexed by > css->id. The array is allocated using kzalloc() effectively limiting > the maximum ID supported to some thousand range. This patch caps the > maximum supported css->id to USHRT_MAX which should be way above what > is actually useable. > > This allows reducing sock->sk_cgrp_prioidx to u16 from u32. The freed > up part will be used to overload the cgroup related fields. > sock->sk_cgrp_prioidx's position is swapped with sk_mark so that the > two cgroup related fields are adjacent. > > Signed-off-by: Tejun Heo > Cc: Daniel Borkmann > Cc: Daniel Wagner Acked-by: Daniel Wagner -- 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/