aboutsummaryrefslogtreecommitdiffstats
path: root/net/ax25/ax25_out.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2021-09-11 00:38:47 +0200
committerThomas Gleixner <tglx@linutronix.de>2021-09-11 00:38:47 +0200
commitc2f4954c2d3fc4f77b46c67585e17a58df4ba8e4 (patch)
tree533a2077028e02a851e51ad509a0aa3a9107999f /net/ax25/ax25_out.c
parentdrivers: base: cacheinfo: Get rid of DEFINE_SMP_CALL_CACHE_FUNCTION() (diff)
parentMerge tag 'acpi-5.15-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm (diff)
downloadlinux-dev-c2f4954c2d3fc4f77b46c67585e17a58df4ba8e4.tar.xz
linux-dev-c2f4954c2d3fc4f77b46c67585e17a58df4ba8e4.zip
Merge branch 'linus' into smp/urgent
Ensure that all usage sites of get/put_online_cpus() except for the struggler in drivers/thermal are gone. So the last user and the deprecated inlines can be removed.
Diffstat (limited to 'net/ax25/ax25_out.c')
-rw-r--r--net/ax25/ax25_out.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/net/ax25/ax25_out.c b/net/ax25/ax25_out.c
index f53751ba81b3..22f2f66c6e0a 100644
--- a/net/ax25/ax25_out.c
+++ b/net/ax25/ax25_out.c
@@ -325,7 +325,6 @@ void ax25_kick(ax25_cb *ax25)
void ax25_transmit_buffer(ax25_cb *ax25, struct sk_buff *skb, int type)
{
- struct sk_buff *skbn;
unsigned char *ptr;
int headroom;
@@ -336,18 +335,12 @@ void ax25_transmit_buffer(ax25_cb *ax25, struct sk_buff *skb, int type)
headroom = ax25_addr_size(ax25->digipeat);
- if (skb_headroom(skb) < headroom) {
- if ((skbn = skb_realloc_headroom(skb, headroom)) == NULL) {
+ if (unlikely(skb_headroom(skb) < headroom)) {
+ skb = skb_expand_head(skb, headroom);
+ if (!skb) {
printk(KERN_CRIT "AX.25: ax25_transmit_buffer - out of memory\n");
- kfree_skb(skb);
return;
}
-
- if (skb->sk != NULL)
- skb_set_owner_w(skbn, skb->sk);
-
- consume_skb(skb);
- skb = skbn;
}
ptr = skb_push(skb, headroom);