From: Kalle Valo <kvalo@codeaurora.org>
To: Erik Stromdahl <erik.stromdahl@gmail.com>
Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Subject: Re: [PATCH v2 5/5] ath10k: sdio: remove skb_trim in TX path
Date: Tue, 01 Oct 2019 15:22:52 +0300 [thread overview]
Message-ID: <871rvw64f7.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <20190417191503.18814-6-erik.stromdahl@gmail.com> (Erik Stromdahl's message of "Wed, 17 Apr 2019 21:15:03 +0200")
Erik Stromdahl <erik.stromdahl@gmail.com> 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] <Interrupt>
> [ 26.547769] lock(_xmit_ETHER#2);
> [ 26.551370]
> [ 26.551370] *** DEADLOCK ***
>
> ... we use the GFP_NOFS flag with kzalloc()
>
> Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
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
prev parent reply other threads:[~2019-10-01 12:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-17 19:14 [PATCH v2 0/5] ath10k: SDIO and high latency patches from Silex Erik Stromdahl
2019-04-17 19:14 ` [PATCH v2 1/5] ath10k: add initialization of HTC header Erik Stromdahl
2019-04-23 13:26 ` Kalle Valo
2019-04-17 19:15 ` [PATCH v2 2/5] ath10k: high latency fixes for beacon buffer Erik Stromdahl
2019-04-17 19:15 ` [PATCH v2 3/5] ath10k: sdio: read RX packets in bundles Erik Stromdahl
[not found] ` <20190925054517.11D3E611FA@smtp.codeaurora.org>
2019-09-25 5:51 ` Kalle Valo
2019-04-17 19:15 ` [PATCH v2 4/5] ath10k: sdio: add missing error check Erik Stromdahl
2019-04-17 19:15 ` [PATCH v2 5/5] ath10k: sdio: remove skb_trim in TX path Erik Stromdahl
2019-10-01 12:22 ` Kalle Valo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871rvw64f7.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@codeaurora.org \
--cc=ath10k@lists.infradead.org \
--cc=erik.stromdahl@gmail.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).