Go to file
Menglong Dong 0c6de0c943 net: tipc: fix FB_MTU eat two pages
FB_MTU is used in 'tipc_msg_build()' to alloc smaller skb when memory
allocation fails, which can avoid unnecessary sending failures.

The value of FB_MTU now is 3744, and the data size will be:

  (3744 + SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) + \
    SKB_DATA_ALIGN(BUF_HEADROOM + BUF_TAILROOM + 3))

which is larger than one page(4096), and two pages will be allocated.

To avoid it, replace '3744' with a calculation:

  (PAGE_SIZE - SKB_DATA_ALIGN(BUF_OVERHEAD) - \
    SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))

What's more, alloc_skb_fclone() will call SKB_DATA_ALIGN for data size,
and it's not necessary to make alignment for buf_size in
tipc_buf_acquire(). So, just remove it.

Fixes: 4c94cc2d3d ("tipc: fall back to smaller MTU if allocation of local send skb fails")
Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>
Acked-by: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-06-28 13:31:57 -07:00
Documentation sctp: send the next probe immediately once the last one is acked 2021-06-24 12:58:03 -07:00
LICENSES
arch arm64: dts: sparx5: Add the Sparx5 switch node 2021-06-24 11:28:13 -07:00
block
certs
crypto
drivers Lots of changes: 2021-06-28 13:06:12 -07:00
fs
include Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git 2021-06-28 13:17:16 -07:00
init
ipc
kernel
lib
mm
net net: tipc: fix FB_MTU eat two pages 2021-06-28 13:31:57 -07:00
samples
scripts
security
sound
tools tools/testing: add a selftest for SO_NETNS_COOKIE 2021-06-24 11:13:05 -07:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.