Skip to content
Commit a31b3cff authored by Christian Schoenebeck's avatar Christian Schoenebeck Committed by Dominique Martinet
Browse files

net/9p: fix response size check in p9_check_errors()

Since commit 60ece083 ("net/9p: allocate appropriate reduced message
buffers") it is no longer appropriate to check server's response size
against msize. Check against the previously allocated buffer capacity
instead.

- Omit this size check entirely for zero-copy messages, as those always
  allocate 4k (P9_ZC_HDR_SZ) linear buffers which are not used for actual
  payload and can be much bigger than 4k.

- Replace p9_debug() by pr_err() to make sure this message is always
  printed in case this error is triggered.

- Add 9p message type to error message to ease investigation.

Link: https://lkml.kernel.org/r/e0edec84b1c80119ae937ce854b4f5f6dbe2d08c.1669144861.git.linux_oss@crudebyte.com


Signed-off-by: default avatarChristian Schoenebeck <linux_oss@crudebyte.com>
Tested-by: default avatarStefano Stabellini <sstabellini@kernel.org>
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarDominique Martinet <asmadeus@codewreck.org>
parent 8e4c2eee
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment