From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752114AbdEDVBM (ORCPT ); Thu, 4 May 2017 17:01:12 -0400 Received: from canardo.mork.no ([148.122.252.1]:45357 "EHLO canardo.mork.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751453AbdEDVBK (ORCPT ); Thu, 4 May 2017 17:01:10 -0400 From: =?utf-8?Q?Bj=C3=B8rn_Mork?= To: Jim Baxter Cc: , , Oliver Neukum Subject: Re: [PATCH V1 1/1] net: cdc_ncm: Fix TX zero padding Organization: m References: <1493926895-14556-1-git-send-email-jim_baxter@mentor.com> <1493926895-14556-2-git-send-email-jim_baxter@mentor.com> Date: Thu, 04 May 2017 23:01:01 +0200 In-Reply-To: <1493926895-14556-2-git-send-email-jim_baxter@mentor.com> (Jim Baxter's message of "Thu, 4 May 2017 20:41:35 +0100") Message-ID: <87fugkfib6.fsf@miraculix.mork.no> User-Agent: Gnus/5.130015 (Ma Gnus v0.15) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 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-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v44L1FkF007853 Jim Baxter writes: > The zero padding that is added to NTB's does > not zero the memory correctly. > This is because the skb_put modifies the value > of skb_out->len which results in the memset > command not setting any memory to zero as > (ctx->tx_max - skb_out->len) == 0. > > I have resolved this by storing the size of > the memory to be zeroed before the skb_put > and using this in the memset call. > > Signed-off-by: Jim Baxter Ouch! Thanks for finding this. This should go to the stable queue as well. Reviewed-by: Bjørn Mork