Patch "9p/fd: Use P9_HDRSZ for header size" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    9p/fd: Use P9_HDRSZ for header size

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     9p-fd-use-p9_hdrsz-for-header-size.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 70550d9a74bbdba512f073c52544ddb38caa9bb9
Author: GUO Zihua <guozihua@xxxxxxxxxx>
Date:   Thu Nov 17 17:11:59 2022 +0800

    9p/fd: Use P9_HDRSZ for header size
    
    [ Upstream commit 6854fadbeee10891ed74246bdc05031906b6c8cf ]
    
    Cleanup hardcoded header sizes to use P9_HDRSZ instead of '7'
    
    Link: https://lkml.kernel.org/r/20221117091159.31533-4-guozihua@xxxxxxxxxx
    Signed-off-by: GUO Zihua <guozihua@xxxxxxxxxx>
    Reviewed-by: Christian Schoenebeck <linux_oss@xxxxxxxxxxxxx>
    [Dominique: commit message adjusted to make sense after offset size
    adjustment got removed]
    Signed-off-by: Dominique Martinet <asmadeus@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index e1c2c9242ce2..f359cfdc1858 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -122,7 +122,7 @@ struct p9_conn {
 	struct list_head unsent_req_list;
 	struct p9_req_t *rreq;
 	struct p9_req_t *wreq;
-	char tmp_buf[7];
+	char tmp_buf[P9_HDRSZ];
 	struct p9_fcall rc;
 	int wpos;
 	int wsize;
@@ -295,7 +295,7 @@ static void p9_read_work(struct work_struct *work)
 	if (!m->rc.sdata) {
 		m->rc.sdata = m->tmp_buf;
 		m->rc.offset = 0;
-		m->rc.capacity = 7; /* start by reading header */
+		m->rc.capacity = P9_HDRSZ; /* start by reading header */
 	}
 
 	clear_bit(Rpending, &m->wsched);
@@ -318,7 +318,7 @@ static void p9_read_work(struct work_struct *work)
 		p9_debug(P9_DEBUG_TRANS, "got new header\n");
 
 		/* Header size */
-		m->rc.size = 7;
+		m->rc.size = P9_HDRSZ;
 		err = p9_parse_header(&m->rc, &m->rc.size, NULL, NULL, 0);
 		if (err) {
 			p9_debug(P9_DEBUG_ERROR,



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux