From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id CBBD83B2A4 for ; Thu, 10 Jan 2019 13:16:13 -0500 (EST) Received: by mail-pg1-x543.google.com with SMTP id m1so5150704pgq.8 for ; Thu, 10 Jan 2019 10:16:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=oEsp/hZTAw/RuVTuKXnjWINMexc5CX85u5rzmS5zSV0=; b=VcXx8fRgYW8DjDLiEAAVuPTjx61dvvFiVpSf2sGzjXUGevTCX82kwhBn3k0ru83bXW V4x3C+gKLkgm+mDjo74NeGN9KheioZniGx5pXbHr+PwyJkmt+mM3bNU6uvynmBHVkfk3 ikuXxRbBHdi1gdaE/UtOl/Vgb6iQGa/wxlZBU9f0uX/g3uonQznjLTpITfK6Eq1UxboX kJ56ZJrT4IseoGKS8SpzHB9/uLrmRnjuOqye4t86e8sTovj/Y7AzcPeWU5RAezUVzZqm hFJ1RqSbLFXaih0Bm+a2yNupR/yJtu0iatIzHTaPruTsNHDVAsjNLcCF5AAXjkMuCSVz EpzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=oEsp/hZTAw/RuVTuKXnjWINMexc5CX85u5rzmS5zSV0=; b=JFlQnQUC9s5oV5C8PHRoXDB+4ZUAKSAIzFFRk7Sy5SGgESgELqE+FWxw0KJTzA71TA qb7uITgjULr8P0akePEshpHQbI/pl++Mql0vaaC5fJfcT4SC+AKvvMLlfZs+vvFmOIte cFoSMFrsFPpRTPTVGsW853vssEnK8N70cQ7erEjVFeJfr46c+z6/Vi57nJFiAMcRdl4a 4Un0bICT7hS0691Gv3//ctflXEUx0B9KJh5wiActI0PbSHTK6cd/fsNgnUz0Z2LSg3xL URLWFfvHvZDWE9JSyFq8b+tZ1YzvrLRwt11fCDLzDbS5d4oLHYSJd8NLJqG+RAtYgb9w 49sQ== X-Gm-Message-State: AJcUuke7CFqDYAZJvJVEQI9wdLpNy7VTxhx5PnL7bgvLAc08J4HujwnQ APplX6Gpb0fVnzpWBgyxsdVgI4Rd8zqJ87J48P0= X-Google-Smtp-Source: ALg8bN6+usvSmjQinr5z0iRLbUasu+ARucJx7JwNn2yoyT7BxWKYnrZtULqoqXpcVVPoFqexclocGF5HQ9V3Fq7Vjn0= X-Received: by 2002:a62:c505:: with SMTP id j5mr11201036pfg.149.1547144172919; Thu, 10 Jan 2019 10:16:12 -0800 (PST) MIME-Version: 1.0 References: <20190107194733.31138-1-toke@toke.dk> <20190107194733.31138-2-toke@toke.dk> <871s5muu25.fsf@toke.dk> In-Reply-To: <871s5muu25.fsf@toke.dk> From: Cong Wang Date: Thu, 10 Jan 2019 10:16:01 -0800 Message-ID: To: =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= Cc: Linux Kernel Network Developers , Cake List , =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Thu, 10 Jan 2019 15:44:52 -0500 Subject: Re: [Cake] [PATCH 1/4] sched: Avoid dereferencing skb pointer after child enqueue X-BeenThere: cake@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Cake - FQ_codel the next generation List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 18:16:14 -0000 On Wed, Jan 9, 2019 at 12:14 AM Toke H=C3=B8iland-J=C3=B8rgensen wrote: > > Cong Wang writes: > > > On Mon, Jan 7, 2019 at 11:50 AM Toke H=C3=B8iland-J=C3=B8rgensen wrote: > >> @@ -1254,7 +1256,7 @@ static int qfq_enqueue(struct sk_buff *skb, stru= ct Qdisc *sch, > >> if (cl->qdisc->q.qlen !=3D 1) { > >> if (unlikely(skb =3D=3D cl->qdisc->ops->peek(cl->qdisc= )) && > > > > > > Isn't this comparison problematic too? While you are on it... > > Well, I was only looking at safety issues, and since it's not > dereferencing the pointer, that's not really an issue here. The check is > just going to always fail if GSO splitting is enabled. Which I'm not > actually sure is an error in this case? Yeah, I knew you only fix defereferences. The comparison is used to check if the enqueued packet is the head of the queue, which is incorrect to me for GSO splitting case. Don't worry, we can fix it later= .