Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755449AbbGEJDN (ORCPT ); Sun, 5 Jul 2015 05:03:13 -0400 Received: from mail-la0-f50.google.com ([209.85.215.50]:33679 "EHLO mail-la0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751014AbbGEJDH (ORCPT ); Sun, 5 Jul 2015 05:03:07 -0400 MIME-Version: 1.0 In-Reply-To: <20150702174725.GV17917@localhost.localdomain> References: <1435497454-10464-1-git-send-email-sergei@s15v.net> <1435497454-10464-6-git-send-email-sergei@s15v.net> <20150702134500.GS17917@localhost.localdomain> <20150702141341.GA5452@dztty> <20150702174725.GV17917@localhost.localdomain> Date: Sat, 4 Jul 2015 13:48:06 +0200 Message-ID: Subject: Re: [PATCH RFC 5/5] kdbus: improve tests on incrementing quota From: David Herrmann To: Sergei Zviagintsev Cc: Djalal Harouni , Greg Kroah-Hartman , Daniel Mack , David Herrmann , linux-kernel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1423 Lines: 33 Hi On Thu, Jul 2, 2015 at 7:47 PM, Sergei Zviagintsev wrote: > Hi Djalal, > > On Thu, Jul 02, 2015 at 03:13:41PM +0100, Djalal Harouni wrote: > [...] >> > My journey with this piece of code began from spotting and immediately >> > "fixing" the overflow issue :) Then I decided to dig into the >> > out-of-tree repo to find the origin of this line. What I found were >> > commits af8e2f750985 and ac5c385cc67a in which Djalal "fixed" it as >> > well, but then reverted back to the original code. >> > >> > Surely we can drop this explanation, but if one of kdbus maintainers >> > experienced difficulties in understanding this piece of code, wouldn't >> > one who sees this code in the first time have the same issues? >> Yes there was lot of work in this area to make sure that the quota >> accounting is correct! the previous commits the one that tried to clean >> things up and the revert were both correct :-) , > > I cannot agree that commit af8e2f750985 in out-of-tree repo was correct. Exactly, that's why the commit got reverted. The U32_MAX check is *not* about overflows of pool-memory, but rather about overflows in quota-accounting. Thanks David -- 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/