Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8238147ybn; Tue, 1 Oct 2019 05:26:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWY32f/hMsRoB/fPz/+f3VdBKIMu9ujFC/+76QnNVuNF9AMkoniN/4xNuD3PaWq/pm48QA X-Received: by 2002:a17:906:fad6:: with SMTP id lu22mr23008302ejb.98.1569932769955; Tue, 01 Oct 2019 05:26:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569932769; cv=none; d=google.com; s=arc-20160816; b=Z+N7ZRswJi+0hIl8Tx5zvcQv+Mop8FyCYMjCHTlE7Xea6dboUPdTJ4+zWRtndtZ8xN QUll37CrCJZ7u3x6yKOQ7n/EJHUJPFyZ7Jrnf2fBsJ231ovnW12WF2AV0QBRCAkYtqcO a50vWVnxSVRW8PQZczoytQrPCVPETWY2RDQZ0qRY+Sep5wGrizk7r81LYWsiGyWIW2gO iTaIfL4agXz5VwXBaq91+29hkRrF0G5a0481p1/g5KDWAvvkhO9wEU7/MdQv/ZGarDAP /6yZHd243LJ0XQ71XJ1WWclddkn2lB3lClklJ2r9YIrpD+1U5yPiPgKI65zY5QOqYUs3 ayZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:dmarc-filter :dkim-signature:dkim-signature; bh=nxIOnJFZ3sO4S/E6rLY5w/RSNmak9oUpsqgeRbnJNb4=; b=izfXb4ipP6nkkJCb4BJxRqnupVJnYYrESk53maaeV+X7TO//mmteiOtZUpF09en/Lk qS4ASM5Eajvr1PHjwCiOzyUyJh0+siPrajp19aXouXbEoCJ8jh3XaTv1LrWb58DyAvaj O5LyPGpRyTMSYZxQDCA3U2qFreDC4acVvOzdshHCEjApbj/gLbloYrEyO5rZOCHNn6cc YwQrViI4Hq+jULTK59kn0BDBAhTTwrCF1fx8cnXDvUtk7W7szcnLgq+qKmAVGwUCk4SN i89ERXiNAWAzAgF5tSdCLozYG4ANlifffab7VSX39MaCTIEbHYQsFxZB1HsSZQSEcwkH wlQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=ChlGfm7u; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZMjJ22rk; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z42si9002664edz.23.2019.10.01.05.25.45; Tue, 01 Oct 2019 05:26:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=ChlGfm7u; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZMjJ22rk; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726371AbfJAMW5 (ORCPT + 99 others); Tue, 1 Oct 2019 08:22:57 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:34750 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726185AbfJAMW5 (ORCPT ); Tue, 1 Oct 2019 08:22:57 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 3711D6119F; Tue, 1 Oct 2019 12:22:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1569932576; bh=+GW/X3g8lJp7cIRJtrReo6a69n6wrENFhuWCZ3R57II=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ChlGfm7uveBPlBGyQrDupViQzXRS4UdzcI4PKzNxExAzJ05CmPyhk8a6SXp6ZjTFl uwaIvFxf/0/O2W2A/j2STPRG8pY5gV6oVQTHrxnZ8zd6mzBLaPwPxpd76r0B2FVpDW r8TO5fqB4yvQqtyDZNXPWOGAxxto3CdLY6EHpCGU= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from potku.adurom.net (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id AF59F608CE; Tue, 1 Oct 2019 12:22:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1569932575; bh=+GW/X3g8lJp7cIRJtrReo6a69n6wrENFhuWCZ3R57II=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ZMjJ22rk0vo4oQ3NcyIGt8V3T6BMP2sv5G/nA9h76dOVk3GaV3LnfSyD44BOTmeAU lQgGZLckH7yW3oLTMG6WSUiJwFfmwtiQaLT66KwiqWHu4q7cvjsny31e/0UxJgbEEr +TUwijpe5soTvi2w0lixFlZirG18dVZyNYY6vEnM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org AF59F608CE Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: Erik Stromdahl Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org Subject: Re: [PATCH v2 5/5] ath10k: sdio: remove skb_trim in TX path References: <20190417191503.18814-1-erik.stromdahl@gmail.com> <20190417191503.18814-6-erik.stromdahl@gmail.com> Date: Tue, 01 Oct 2019 15:22:52 +0300 In-Reply-To: <20190417191503.18814-6-erik.stromdahl@gmail.com> (Erik Stromdahl's message of "Wed, 17 Apr 2019 21:15:03 +0200") Message-ID: <871rvw64f7.fsf@kamboji.qca.qualcomm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Erik Stromdahl writes: > This patch fixes a bug with padding of the skb data buffer. > Since skb_trim can only be used to reduce the skb len, it is useless when > we pad (increase the length of) the skb. Instead we allocate a new > buffer with enough space to contain both the TX data and padding. > > Since some skb's have multiple references, we can't use skb_put_padto() > to extend and pad skb->data (since it causes a panic if there is more > than one reference). > > Also, in order to avoid the following possible deadlock issue (reported by > lockdep): > > [ 26.508508] Possible interrupt unsafe locking scenario: > [ 26.508508] > [ 26.515314] CPU0 CPU1 > [ 26.519862] ---- ---- > [ 26.524408] lock(fs_reclaim); > [ 26.527573] local_irq_disable(); > [ 26.533508] lock(_xmit_ETHER#2); > [ 26.539453] lock(fs_reclaim); > [ 26.545135] > [ 26.547769] lock(_xmit_ETHER#2); > [ 26.551370] > [ 26.551370] *** DEADLOCK *** > > ... we use the GFP_NOFS flag with kzalloc() > > Signed-off-by: Erik Stromdahl I replied to v1 about using skb_pad(), let's discuss more there: https://patchwork.kernel.org/patch/10891949/ -- https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches