From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Wagner Subject: Re: [PATCH 4/7] netprio_cgroup: limit the maximum css->id to USHRT_MAX Date: Fri, 20 Nov 2015 10:18:14 +0100 Message-ID: <564EE556.5070907@bmw-carit.de> References: <1447959171-20749-1-git-send-email-tj@kernel.org> <1447959171-20749-5-git-send-email-tj@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Cc: , , , , , , , To: Tejun Heo , , , , , , Return-path: In-Reply-To: <1447959171-20749-5-git-send-email-tj@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org 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