mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Kernel

Threads by month
  • ----- 2025 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
kernel@openeuler.org

May 2021

  • 9 participants
  • 79 discussions
Re: Fwd: 网迅万兆网卡驱动合入openeuler-4.19内核申请
by Xie XiuQi 25 May '21

25 May '21
On 2021/5/21 9:27, zhenpengzheng(a)net-swift.com wrote: > 谢工, > >     您好,我最近忙另外的项目,没有协调到鲲鹏平台,刚跟测试协商,等他们用完了借给我,预计要下周了,如果改完了我提个patch给您。 好的。 另外,如果你协调到环境,建议也一起把驱动提交到 openEuler 5.10 版本。 5.10 版本是 openEuler 下一个长期维护版本。 > > regards, > zhenpeng > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > > **************************************************************** > > 郑振鹏(zheng zhenpeng) > > 北京网迅科技有限公司杭州分公司 软件工程师 > > 浙江省杭州市西湖区文三路478号华星时代广场A座507室 310013 > > Beijing WangXun Technology Co., Ltd. Software Engineer. > > Room A507, HuaXing Times Square, No.478 West Wensan Road. > > West Lake District, Hangzhou City, 310013 ZHEJIANG, P.R.CHINA. > >   > > Office: +86(0571)89807901-8014 > > Mobile: +86-13656681762 > > E-Mail: z <mailto:jianwang@trustnetic.com>henpengzheng(a)net-swift.com > > **************************************************************** > >   > *发件人:* Xie XiuQi <mailto:xiexiuqi@huawei.com> > *发送时间:* 2021-05-19 21:36 > *收件人:* zhenpengzheng(a)net-swift.com <mailto:zhenpengzheng@net-swift.com> > *抄送:* Leizhen (ThunderTown) <mailto:thunder.leizhen@huawei.com>; liuyuan36 <mailto:liuyuan36@huawei.com>; Cheng Jian <mailto:cj.chengjian@huawei.com>; Libin (Huawei) <mailto:huawei.libin@huawei.com>; Yang Yingliang <mailto:yangyingliang@huawei.com>; Dukaitian, Intelligent Computing, <mailto:dukaitian@huawei.com>; " neil.yao"@huawei.com <mailto:@huawei.com>; neil.yao(a)huawei.com <mailto:neil.yao@huawei.com>; kernel\" <mailto:kernel@openeuler.org> > *主题:* Re: Fwd: 网迅万兆网卡驱动合入openeuler-4.19内核申请 > Hi zhenpeng, >   > >     On 2021/3/8 11:12, zhenpengzheng(a)net-swift.com wrote: > >     > 适用arm64,但这份驱动我只在x86指令集的机器上测试过,我先改好,稍后安排ARM的适配测试。 >   > 问下,网讯网卡驱动,之前说 ARM64 环境上会做测试,现在怎么样了, > ARM64 上可以 enable 了吗? >   > 谢谢 >   > On 2021/3/25 22:12, Xie XiuQi wrote: > > Hi, > > > > On 2021/3/25 9:43, zhenpengzheng(a)net-swift.com wrote: > >> > >> to Leizhen, > >> > >>     have these two patches been merged into kernel-4.19 and openEuler-1.0-LTS branches? > > > > This patch is in my queue and under testing, which would be merged before April 15. > > > > Thanks. > > > >> > >> regards, > >> zhenpeng > >> > >> > >> > >> > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > >> > >> **************************************************************** > >> > >> 郑振鹏(zheng zhenpeng) > >> > >> 北京网迅科技有限公司杭州分公司 软件工程师 > >> > >> 浙江省杭州市西湖区文三路478号华星时代广场A座507室 310013 > >> > >> Beijing WangXun Technology Co., Ltd. Software Engineer. > >> > >> Room A507, HuaXing Times Square, No.478 West Wensan Road. > >> > >> West Lake District, Hangzhou City, 310013 ZHEJIANG, P.R.CHINA. > >> > >>   > >> > >> Office: +86(0571)89807901-8014 > >> > >> Mobile: +86-13656681762 > >> > >> E-Mail: z <mailto:jianwang@trustnetic.com>henpengzheng(a)net-swift.com > >> > >> **************************************************************** > >> > >>       > >>     *发件人:* Xie XiuQi <mailto:xiexiuqi@huawei.com> > >>     *发送时间:* 2021-03-12 16:22 > >>     *收件人:* zhenpengzheng(a)net-swift.com <mailto:zhenpengzheng@net-swift.com>; Leizhen (ThunderTown) <mailto:thunder.leizhen@huawei.com> > >>     *抄送:* liuyuan36 <mailto:liuyuan36@huawei.com>; Cheng Jian <mailto:cj.chengjian@huawei.com>; Libin (Huawei) <mailto:huawei.libin@huawei.com>; Yang Yingliang <mailto:yangyingliang@huawei.com>; Dukaitian (Dukaitian, Intelligent Computing R&D) <mailto:dukaitian@huawei.com>; neil.yao(a)huawei.com <mailto:neil.yao@huawei.com>; kernel(a)openeuler.org <mailto:kernel@openeuler.org> > >>     *主题:* Re: Fwd: 网迅万兆网卡驱动合入openeuler-4.19内核申请 > >>     For this series, > >>     Acked-by: Xie XiuQi <xiexiuqi(a)huawei.com> > >>       > >>     @Leizhen, > >>       > >>     Please help to apply this two patches to kernel-4.19 & openEuler-1.0-LTS branches. > >>     Thanks. > >>       > >>     On 2021/3/9 19:13, zhenpengzheng(a)net-swift.com wrote: > >>     > to谢工, > >>     >     已清理所有提交文件中“huawei” “intel” “HiNIC”等字样与本次提交无关的注释。 > >>     > > >>     > toLei工, > >>     >     已删除所有提交文件末尾空行。 > >>     > > >>     > 谢谢大家的意见,附件为改动后最新的patch。 > >>     > > >>     > 振鹏 > >>     > > >>     > > >>     > > >>     > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > >>     > > >>     > **************************************************************** > >>     > > >>     > 郑振鹏(zheng zhenpeng) > >>     > > >>     > 北京网迅科技有限公司杭州分公司 软件工程师 > >>     > > >>     > 浙江省杭州市西湖区文三路478号华星时代广场A座507室 310013 > >>     > > >>     > Beijing WangXun Technology Co., Ltd. Software Engineer. > >>     > > >>     > Room A507, HuaXing Times Square, No.478 West Wensan Road. > >>     > > >>     > West Lake District, Hangzhou City, 310013 ZHEJIANG, P.R.CHINA. > >>     > > >>     >   > >>     > > >>     > Office: +86(0571)89807901-8014 > >>     > > >>     > Mobile: +86-13656681762 > >>     > > >>     > E-Mail: z <mailto:jianwang@trustnetic.com>henpengzheng(a)net-swift.com > >>     > > >>     > **************************************************************** > >>     > > >>     >       > >>     >     *发件人:* Leizhen (ThunderTown) <mailto:thunder.leizhen@huawei.com> > >>     >     *发送时间:* 2021-03-09 17:59 > >>     >     *收件人:* zhenpengzheng(a)net-swift.com <mailto:zhenpengzheng@net-swift.com>; Xie XiuQi <mailto:xiexiuqi@huawei.com> > >>     >     *抄送:* liuyuan36 <mailto:liuyuan36@huawei.com>; Cheng Jian <mailto:cj.chengjian@huawei.com>; Libin (Huawei) <mailto:huawei.libin@huawei.com>; Yang Yingliang <mailto:yangyingliang@huawei.com>; Dukaitian (Dukaitian, Intelligent Computing R&D) <mailto:dukaitian@huawei.com>; neil.yao(a)huawei.com <mailto:neil.yao@huawei.com> > >>     >     *主题:* Re: Fwd: 网迅万兆网卡驱动合入openeuler-4.19内核申请 > >>     >       > >>     >       > >>     >     On 2021/3/9 16:38, zhenpengzheng(a)net-swift.com wrote: > >>     >     > 谢工,lei工 > >>     >     >     您好,附件是我按照社区要求整改的patch,第一份较大的patch是不包含openeuler_config(x86)文件修改的驱动主代码,第二份patch仅含openeuler_config(x86)文件修改,arm的配置暂未修改,后续我尽快测完再发patch开启arm配置。 > >>     >     > > >>     >     >     针对社区反馈的问题1,我查过patch中确实存在一处告警所说明的违规(即指向patch90行那处),其余违规处对照后未发现异常,我检查过代码本身应无段尾出现空白的情况,不知道如何进一步确认patch是否合规,请在邮件中告知,谢谢。 > >>     >     drivers/net/ethernet/netswift/txgbe/txgbe_bp.h > >>     >     drivers/net/ethernet/netswift/txgbe/txgbe_ethtool.c > >>     >     drivers/net/ethernet/netswift/txgbe/txgbe_hw.c > >>     >     drivers/net/ethernet/netswift/txgbe/txgbe_lib.c > >>     >     drivers/net/ethernet/netswift/txgbe/txgbe_main.c > >>     >     drivers/net/ethernet/netswift/txgbe/txgbe_mtd.c > >>     >     drivers/net/ethernet/netswift/txgbe/txgbe_mtd.h > >>     >       > >>     >     这个告警是文件末尾有空行。每个文件打开一下,shift+G到末尾check下就好了。 > >>     >       > >>     >     > > >>     >     > 振鹏 > >>     >     > > >>     >     > > >>     >     > > >>     >     > > >>     >     > >>     > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > >>     >     > > >>     >     > **************************************************************** > >>     >     > > >>     >     > 郑振鹏(zheng zhenpeng) > >>     >     > > >>     >     > 北京网迅科技有限公司杭州分公司 软件工程师 > >>     >     > > >>     >     > 浙江省杭州市西湖区文三路478号华星时代广场A座507室 310013 > >>     >     > > >>     >     > Beijing WangXun Technology Co., Ltd. Software Engineer. > >>     >     > > >>     >     > Room A507, HuaXing Times Square, No.478 West Wensan Road. > >>     >     > > >>     >     > West Lake District, Hangzhou City, 310013 ZHEJIANG, P.R.CHINA. > >>     >     > > >>     >     >   > >>     >     > > >>     >     > Office: +86(0571)89807901-8014 > >>     >     > > >>     >     > Mobile: +86-13656681762 > >>     >     > > >>     >     > E-Mail: z <mailto:jianwang@trustnetic.com>henpengzheng(a)net-swift.com > >>     >     > > >>     >     > **************************************************************** > >>     >     > > >>     >     >       > >>     >     >     *发件人:* Xie XiuQi <mailto:xiexiuqi@huawei.com> > >>     >     >     *发送时间:* 2021-03-08 16:29 > >>     >     >     *收件人:* zhenpengzheng(a)net-swift.com <mailto:zhenpengzheng@net-swift.com>; Leizhen (ThunderTown) <mailto:thunder.leizhen@huawei.com> > >>     >     >     *抄送:* liuyuan36 <mailto:liuyuan36@huawei.com>; Cheng Jian <mailto:cj.chengjian@huawei.com>; Libin (Huawei) <mailto:huawei.libin@huawei.com>; Yang Yingliang <mailto:yangyingliang@huawei.com>; Dukaitian (Dukaitian, Intelligent Computing R&D) <mailto:dukaitian@huawei.com>; neil.yao(a)huawei.com <mailto:neil.yao@huawei.com> > >>     >     >     *主题:* Re: Fwd: 网迅万兆网卡驱动合入openeuler-4.19内核申请 > >>     >     >     Hi, > >>     >     >       > >>     >     >     On 2021/3/8 11:12, zhenpengzheng(a)net-swift.com wrote: > >>     >     >     > 适用arm64,但这份驱动我只在x86指令集的机器上测试过,我先改好,稍后安排ARM的适配测试。 > >>     >     >       > >>     >     >     好的,在 x86 上测试过,就先在 x86 上 enable 吧。 > >>     >     >     ARM64 的测试过之后,可以再 enable。 > >>     >     >       > >>     >     >     > > >>     >     >     > > >>     >     >     > >>     >     > >>     > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > >>     >     >     > > >>     >     >     > **************************************************************** > >>     >     >     > > >>     >     >     > 郑振鹏(zheng zhenpeng) > >>     >     >     > > >>     >     >     > 北京网迅科技有限公司杭州分公司 软件工程师 > >>     >     >     > > >>     >     >     > 浙江省杭州市西湖区文三路478号华星时代广场A座507室 310013 > >>     >     >     > > >>     >     >     > Beijing WangXun Technology Co., Ltd. Software Engineer. > >>     >     >     > > >>     >     >     > Room A507, HuaXing Times Square, No.478 West Wensan Road. > >>     >     >     > > >>     >     >     > West Lake District, Hangzhou City, 310013 ZHEJIANG, P.R.CHINA. > >>     >     >     > > >>     >     >     >   > >>     >     >     > > >>     >     >     > Office: +86(0571)89807901-8014 > >>     >     >     > > >>     >     >     > Mobile: +86-13656681762 > >>     >     >     > > >>     >     >     > E-Mail: z <mailto:jianwang@trustnetic.com>henpengzheng(a)net-swift.com > >>     >     >     > > >>     >     >     > **************************************************************** > >>     >     >     > > >>     >     >     >       > >>     >     >     >     *发件人:* Xie XiuQi <mailto:xiexiuqi@huawei.com> > >>     >     >     >     *发送时间:* 2021-03-08 10:30 > >>     >     >     >     *收件人:* zhenpengzheng(a)net-swift.com <mailto:zhenpengzheng@net-swift.com>; Leizhen (ThunderTown) <mailto:thunder.leizhen@huawei.com> > >>     >     >     >     *抄送:* liuyuan36 <mailto:liuyuan36@huawei.com>; Cheng Jian <mailto:cj.chengjian@huawei.com>; Libin (Huawei) <mailto:huawei.libin@huawei.com>; Yang Yingliang <mailto:yangyingliang@huawei.com>; Dukaitian (Dukaitian, Intelligent Computing R&D) <mailto:dukaitian@huawei.com>; neil.yao(a)huawei.com <mailto:neil.yao@huawei.com> > >>     >     >     >     *主题:* Re: Fwd: 网迅万兆网卡驱动合入openeuler-4.19内核申请 > >>     >     >     >     Hi, > >>     >     >     >       > >>     >     >     >     网讯网卡驱动在 arm64 上也是适用的吧? > >>     >     >     >     是的话,arm64 的config,也打开吧。 > >>     >     >     >       > >>     >     >     >     arch/arm64/configs/openeuler_defconfig > >>     >     >     >       > >>     >     >     >       > >>     >     >     >       > >>     >     >     >     On 2021/3/8 9:42, zhenpengzheng(a)net-swift.com wrote: > >>     >     >     >     > 好的,对于问题2,我分割成两个patch再发一次,谢谢。 > >>     >     >     >     > > >>     >     >     >     > > >>     >     >     >     > >>     >     >     > >>     >     > >>     > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > >>     >     >     >     > > >>     >     >     >     > **************************************************************** > >>     >     >     >     > > >>     >     >     >     > 郑振鹏(zheng zhenpeng) > >>     >     >     >     > > >>     >     >     >     > 北京网迅科技有限公司杭州分公司 软件工程师 > >>     >     >     >     > > >>     >     >     >     > 浙江省杭州市西湖区文三路478号华星时代广场A座507室 310013 > >>     >     >     >     > > >>     >     >     >     > Beijing WangXun Technology Co., Ltd. Software Engineer. > >>     >     >     >     > > >>     >     >     >     > Room A507, HuaXing Times Square, No.478 West Wensan Road. > >>     >     >     >     > > >>     >     >     >     > West Lake District, Hangzhou City, 310013 ZHEJIANG, P.R.CHINA. > >>     >     >     >     > > >>     >     >     >     >   > >>     >     >     >     > > >>     >     >     >     > Office: +86(0571)89807901-8014 > >>     >     >     >     > > >>     >     >     >     > Mobile: +86-13656681762 > >>     >     >     >     > > >>     >     >     >     > E-Mail: z <mailto:jianwang@trustnetic.com>henpengzheng(a)net-swift.com > >>     >     >     >     > > >>     >     >     >     > **************************************************************** > >>     >     >     >     > > >>     >     >     >     >       > >>     >     >     >     >     *发件人:* Leizhen (ThunderTown) <mailto:thunder.leizhen@huawei.com> > >>     >     >     >     >     *发送时间:* 2021-03-06 15:05 > >>     >     >     >     >     *收件人:* Xie XiuQi <mailto:xiexiuqi@huawei.com>; 郑振鹏 <mailto:zhenpengzheng@net-swift.com> > >>     >     >     >     >     *抄送:* Liuyuan (Compatibility, Cloud Infrastructure Service Product Dept.) <mailto:liuyuan36@huawei.com>; Cheng Jian <mailto:cj.chengjian@huawei.com>; Libin (Huawei) <mailto:huawei.libin@huawei.com>; Yang Yingliang <mailto:yangyingliang@huawei.com>; Dukaitian (Dukaitian, Intelligent Computing R&D) <mailto:dukaitian@huawei.com>; neil.yao(a)huawei.com <mailto:neil.yao@huawei.com> > >>     >     >     >     >     *主题:* Re: Fwd: 网迅万兆网卡驱动合入openeuler-4.19内核申请 > >>     >     >     >     >     Hi 振鹏, > >>     >     >     >     >         我review了一下补丁,有几个地方需要改进下: > >>     >     >     >     >       > >>     >     >     >     >     1. git am补丁的时候会报几个warning,需要消除一下; > >>     >     >     >     >        git am 0001-add-WangXun-XGIG-NIC-driver-for-EulerOS.patch > >>��    >     >     >     >     Applying: add WangXun XGIG NIC driver for EulerOS > >>     >     >     >     >     .git/rebase-apply/patch:90: new blank line at EOF. > >>     >     >     >     >     + > >>     >     >     >     >     .git/rebase-apply/patch:2331: new blank line at EOF. > >>     >     >     >     >     + > >>     >     >     >     >     .git/rebase-apply/patch:5755: new blank line at EOF. > >>     >     >     >     >     + > >>     >     >     >     >     .git/rebase-apply/patch:12891: new blank line at EOF. > >>     >     >     >     >     + > >>     >     >     >     >     .git/rebase-apply/patch:14134: new blank line at EOF. > >>     >     >     >     >     + > >>     >     >     >     >     warning: squelched 3 whitespace errors > >>     >     >     >     >     warning: 8 lines add whitespace errors. > >>     >     >     >     >     2. 对arch/x86/configs/openeuler_defconfig文件的修改,最好能拆分到一个独立的补丁中去。 > >>     >     >     >     >     3. txgbe_bp.c没有添加版权声明。 > >>     >     >     >     >     4. 其它#if 0、//注释掉的代码,最好能清掉。 > >>     >     >     >     >       > >>     >     >     >     >       > >>     >     >     >     >       > >>     >     >     >     >     On 2021/3/1 16:32, Xie XiuQi wrote: > >>     >     >     >     >     > Hi 振鹏, > >>     >     >     >     >     > > >>     >     >     >     >     > Thanks for your patch, we'll review this patch, and give a feedback soon. > >>     >     >     >     >     > > >>     >     >     >     >     > --- > >>     >     >     >     >     > Thanks, > >>     >     >     >     >     > Xie XiuQi > >>     >     >     >     >     > > >>     >     >     >     >     > > >>     >     >     >     >     > -------- Forwarded Message -------- > >>     >     >     >     >     > Subject: 网迅万兆网卡驱动合入openeuler-4.19内核申请 > >>     >     >     >     >     > Date: Mon, 1 Mar 2021 15:41:09 +0800 > >>     >     >     >     >     > From: zhenpengzheng(a)net-swift.com <zhenpengzheng(a)net-swift.com> > >>     >     >     >     >     > To: xiexiuqi <xiexiuqi(a)huawei.com>, liuyuan36 <liuyuan36(a)huawei.com> > >>     >     >     >     >     > > >>     >     >     >     >     > > >>     >     >     >     >     > > >>     >     >     >     >     > > >>     >     >     >     >     > 谢工,刘工: > >>     >     >     >     >     > > >>     >     >     >     >     >     您好,我已准备好patch,见附件,patch已按照社区要求做checkpatch,报告的错误已消除,commit信息已更新。 > >>     >     >     >     >     > > >>     >     >     >     >     > 振鹏 > >>     >     >     >     >     > > >>     >     >     >     >     > > >>     >     >     >     >     > >>     >     >     >     > >>     >     >     > >>     >     > >>     > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ > >>     >     >     >     >     > > >>     >     >     >     >     > **************************************************************** > >>     >     >     >     >     > > >>     >     >     >     >     > 郑振鹏(zheng zhenpeng) > >>     >     >     >     >     > > >>     >     >     >     >     > 北京网迅科技有限公司杭州分公司 软件工程师 > >>     >     >     >     >     > > >>     >     >     >     >     > 浙江省杭州市西湖区文三路478号华星时代广场A座507室 310013 > >>     >     >     >     >     > > >>     >     >     >     >     > Beijing WangXun Technology Co., Ltd. Software Engineer. > >>     >     >     >     >     > > >>     >     >     >     >     > Room A507, HuaXing Times Square, No.478 West Wensan Road. > >>     >     >     >     >     > > >>     >     >     >     >     > West Lake District, Hangzhou City, 310013 ZHEJIANG, P.R.CHINA. > >>     >     >     >     >     > > >>     >     >     >     >     >   > >>     >     >     >     >     > > >>     >     >     >     >     > Office: +86(0571)89807901-8014 > >>     >     >     >     >     > > >>     >     >     >     >     > Mobile: +86-13656681762 > >>     >     >     >     >     > > >>     >     >     >     >     > E-Mail: z <mailto:jianwang@trustnetic.com>henpengzheng(a)net-swift.com > >>     >     >     >     >     > > >>     >     >     >     >     > **************************************************************** > >>     >     >     >     >     > > >>     >     >     >     > > >>     >     >     > > >>     >     > > >>     > > >> > > _______________________________________________ > > Kernel mailing list -- kernel(a)openeuler.org > > To unsubscribe send an email to kernel-leave(a)openeuler.org > > >
1 0
0 0
[PATCH kernel-4.19 1/2] NFSv4.1: Don't rebind to the same source port when reconnecting to the server
by Yang Yingliang 25 May '21

25 May '21
From: Trond Myklebust <trond.myklebust(a)hammerspace.com> mainline inclusion from mainline-v5.5-rc1 commit e6237b6feb37582fbd6bd7a8336d1256a6b4b4f9 category: bugfix bugzilla: NA CVE: NA -------------------------------- NFSv2, v3 and NFSv4 servers often have duplicate replay caches that look at the source port when deciding whether or not an RPC call is a replay of a previous call. This requires clients to perform strange TCP gymnastics in order to ensure that when they reconnect to the server, they bind to the same source port. NFSv4.1 and NFSv4.2 have sessions that provide proper replay semantics, that do not look at the source port of the connection. This patch therefore ensures they can ignore the rebind requirement. Signed-off-by: Trond Myklebust <trond.myklebust(a)hammerspace.com> Conflicts: fs/lockd/host.c fs/nfs/client.c fs/nfs/nfs4client.c include/linux/nfs_fs_sb.h include/linux/sunrpc/clnt.h Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5(a)huawei.com> Reviewed-by: Yue Haibing <yuehaibing(a)huawei.com> Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com> --- fs/lockd/host.c | 3 ++- fs/nfs/client.c | 3 +++ fs/nfs/nfs4client.c | 3 +++ include/linux/nfs_fs_sb.h | 1 + include/linux/sunrpc/clnt.h | 1 + include/linux/sunrpc/xprt.h | 3 ++- net/sunrpc/clnt.c | 7 ++++++- net/sunrpc/xprtsock.c | 2 +- 8 files changed, 19 insertions(+), 4 deletions(-) diff --git a/fs/lockd/host.c b/fs/lockd/host.c index 3f6ba0cd2bd9c..6d58f53555893 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c @@ -452,7 +452,8 @@ nlm_bind_host(struct nlm_host *host) .version = host->h_version, .authflavor = RPC_AUTH_UNIX, .flags = (RPC_CLNT_CREATE_NOPING | - RPC_CLNT_CREATE_AUTOBIND), + RPC_CLNT_CREATE_AUTOBIND | + RPC_CLNT_CREATE_REUSEPORT), }; /* diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 07c5ddd5d6d50..d25230de31364 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -522,6 +522,8 @@ int nfs_create_rpc_client(struct nfs_client *clp, args.flags |= RPC_CLNT_CREATE_NONPRIVPORT; if (test_bit(NFS_CS_INFINITE_SLOTS, &clp->cl_flags)) args.flags |= RPC_CLNT_CREATE_INFINITE_SLOTS; + if (test_bit(NFS_CS_REUSEPORT, &clp->cl_flags)) + args.flags |= RPC_CLNT_CREATE_REUSEPORT; if (!IS_ERR(clp->cl_rpcclient)) return 0; @@ -663,6 +665,7 @@ static int nfs_init_server(struct nfs_server *server, .proto = data->nfs_server.protocol, .net = data->net, .timeparms = &timeparms, + .init_flags = (1UL << NFS_CS_REUSEPORT), }; struct nfs_client *clp; int error; diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c index faaabbedc891d..48a1892f05854 100644 --- a/fs/nfs/nfs4client.c +++ b/fs/nfs/nfs4client.c @@ -872,6 +872,9 @@ static int nfs4_set_client(struct nfs_server *server, }; struct nfs_client *clp; + if (minorversion == 0) + __set_bit(NFS_CS_REUSEPORT, &cl_init.init_flags); + if (server->flags & NFS_MOUNT_NORESVPORT) set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags); if (server->options & NFS_OPTION_MIGRATION) diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index bf39d9c92201f..7023ae64e3d7c 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h @@ -45,6 +45,7 @@ struct nfs_client { #define NFS_CS_INFINITE_SLOTS 3 /* - don't limit TCP slots */ #define NFS_CS_NO_RETRANS_TIMEOUT 4 /* - Disable retransmit timeouts */ #define NFS_CS_TSM_POSSIBLE 5 /* - Maybe state migration */ +#define NFS_CS_REUSEPORT 8 /* - reuse src port on reconnect */ struct sockaddr_storage cl_addr; /* server identifier */ size_t cl_addrlen; char * cl_hostname; /* hostname of server */ diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 73d5c4a870fae..60b6489e5ac1b 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h @@ -143,6 +143,7 @@ struct rpc_add_xprt_test { #define RPC_CLNT_CREATE_INFINITE_SLOTS (1UL << 7) #define RPC_CLNT_CREATE_NO_IDLE_TIMEOUT (1UL << 8) #define RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT (1UL << 9) +#define RPC_CLNT_CREATE_REUSEPORT (1UL << 11) struct rpc_clnt *rpc_create(struct rpc_create_args *args); struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 69fed13e633b7..36a944dda1957 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h @@ -200,7 +200,8 @@ struct rpc_xprt { unsigned int min_reqs; /* min number of slots */ unsigned int num_reqs; /* total slots */ unsigned long state; /* transport state */ - unsigned char resvport : 1; /* use a reserved port */ + unsigned char resvport : 1, /* use a reserved port */ + reuseport : 1; /* reuse port on reconnect */ atomic_t swapper; /* we're swapping over this transport */ unsigned int bind_index; /* bind function index */ diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 227bf32f2476b..9ac94c774335e 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -583,6 +583,9 @@ struct rpc_clnt *rpc_create(struct rpc_create_args *args) xprt->resvport = 1; if (args->flags & RPC_CLNT_CREATE_NONPRIVPORT) xprt->resvport = 0; + xprt->reuseport = 0; + if (args->flags & RPC_CLNT_CREATE_REUSEPORT) + xprt->reuseport = 1; return rpc_create_xprt(args, xprt); } @@ -2730,7 +2733,7 @@ int rpc_clnt_add_xprt(struct rpc_clnt *clnt, struct rpc_xprt *xprt; unsigned long connect_timeout; unsigned long reconnect_timeout; - unsigned char resvport; + unsigned char resvport, reuseport; int ret = 0; rcu_read_lock(); @@ -2742,6 +2745,7 @@ int rpc_clnt_add_xprt(struct rpc_clnt *clnt, return -EAGAIN; } resvport = xprt->resvport; + reuseport = xprt->reuseport; connect_timeout = xprt->connect_timeout; reconnect_timeout = xprt->max_reconnect_timeout; rcu_read_unlock(); @@ -2752,6 +2756,7 @@ int rpc_clnt_add_xprt(struct rpc_clnt *clnt, goto out_put_switch; } xprt->resvport = resvport; + xprt->reuseport = reuseport; if (xprt->ops->set_connect_timeout != NULL) xprt->ops->set_connect_timeout(xprt, connect_timeout, diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 60ebb402ba61f..f93d386ae9232 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -1839,7 +1839,7 @@ static void xs_set_port(struct rpc_xprt *xprt, unsigned short port) static void xs_set_srcport(struct sock_xprt *transport, struct socket *sock) { - if (transport->srcport == 0) + if (transport->srcport == 0 && transport->xprt.reuseport) transport->srcport = xs_sock_getport(sock); } -- 2.25.1
1 1
0 0
[PATCH openEuler-1.0-LTS 1/5] genirq: Add protection against unsafe usage of generic_handle_irq()
by Yang Yingliang 24 May '21

24 May '21
From: Thomas Gleixner <tglx(a)linutronix.de> mainline inclusion from mainline-5.7 commit c16816acd08697b02a53f56f8936497a9f6f6e7a category: bugfix bugzilla: NA CVE: NA ------------------------------------------------- In general calling generic_handle_irq() with interrupts disabled from non interrupt context is harmless. For some interrupt controllers like the x86 trainwrecks this is outright dangerous as it might corrupt state if an interrupt affinity change is pending. Add infrastructure which allows to mark interrupts as unsafe and catch such usage in generic_handle_irq(). Reported-by: sathyanarayanan.kuppuswamy(a)linux.intel.com Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de> Acked-by: Marc Zyngier <maz(a)kernel.org> Link: https://lkml.kernel.org/r/20200306130623.590923677@linutronix.de Signed-off-by: Liao Chang <liaochang1(a)huawei.com> Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com> --- include/linux/irq.h | 13 +++++++++++++ kernel/irq/internals.h | 8 ++++++++ kernel/irq/irqdesc.c | 6 ++++++ kernel/irq/resend.c | 5 +++-- 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/include/linux/irq.h b/include/linux/irq.h index 014d5804c1b59..ca367d98a991e 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -210,6 +210,8 @@ struct irq_data { * IRQD_CAN_RESERVE - Can use reservation mode * IRQD_MSI_NOMASK_QUIRK - Non-maskable MSI quirk for affinity change * required + * IRQD_HANDLE_ENFORCE_IRQCTX - Enforce that handle_irq_*() is only invoked + * from actual interrupt context. * IRQD_AFFINITY_ON_ACTIVATE - Affinity is set on activation. Don't call * irq_chip::irq_set_affinity() when deactivated. */ @@ -235,6 +237,7 @@ enum { IRQD_DEFAULT_TRIGGER_SET = (1 << 25), IRQD_CAN_RESERVE = (1 << 26), IRQD_MSI_NOMASK_QUIRK = (1 << 27), + IRQD_HANDLE_ENFORCE_IRQCTX = (1 << 28), IRQD_AFFINITY_ON_ACTIVATE = (1 << 29), }; @@ -305,6 +308,16 @@ static inline bool irqd_is_single_target(struct irq_data *d) return __irqd_to_state(d) & IRQD_SINGLE_TARGET; } +static inline void irqd_set_handle_enforce_irqctx(struct irq_data *d) +{ + __irqd_to_state(d) |= IRQD_HANDLE_ENFORCE_IRQCTX; +} + +static inline bool irqd_is_handle_enforce_irqctx(struct irq_data *d) +{ + return __irqd_to_state(d) & IRQD_HANDLE_ENFORCE_IRQCTX; +} + static inline bool irqd_is_wakeup_set(struct irq_data *d) { return __irqd_to_state(d) & IRQD_WAKEUP_STATE; diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h index ed4843df6220c..207bac6ad4c30 100644 --- a/kernel/irq/internals.h +++ b/kernel/irq/internals.h @@ -422,6 +422,10 @@ static inline struct cpumask *irq_desc_get_pending_mask(struct irq_desc *desc) { return desc->pending_mask; } +static inline bool handle_enforce_irqctx(struct irq_data *data) +{ + return irqd_is_handle_enforce_irqctx(data); +} bool irq_fixup_move_pending(struct irq_desc *desc, bool force_clear); #else /* CONFIG_GENERIC_PENDING_IRQ */ static inline bool irq_can_move_pcntxt(struct irq_data *data) @@ -448,6 +452,10 @@ static inline bool irq_fixup_move_pending(struct irq_desc *desc, bool fclear) { return false; } +static inline bool handle_enforce_irqctx(struct irq_data *data) +{ + return false; +} #endif /* !CONFIG_GENERIC_PENDING_IRQ */ #if !defined(CONFIG_IRQ_DOMAIN) || !defined(CONFIG_IRQ_DOMAIN_HIERARCHY) diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index dc4549fc71f95..ffdf02b01d816 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -633,9 +633,15 @@ void irq_init_desc(unsigned int irq) int generic_handle_irq(unsigned int irq) { struct irq_desc *desc = irq_to_desc(irq); + struct irq_data *data; if (!desc) return -EINVAL; + + data = irq_desc_get_irq_data(desc); + if (WARN_ON_ONCE(!in_irq() && handle_enforce_irqctx(data))) + return -EPERM; + generic_handle_irq_desc(desc); return 0; } diff --git a/kernel/irq/resend.c b/kernel/irq/resend.c index 98c04ca5fa43d..5064b13b80d60 100644 --- a/kernel/irq/resend.c +++ b/kernel/irq/resend.c @@ -72,8 +72,9 @@ void check_irq_resend(struct irq_desc *desc) desc->istate &= ~IRQS_PENDING; desc->istate |= IRQS_REPLAY; - if (!desc->irq_data.chip->irq_retrigger || - !desc->irq_data.chip->irq_retrigger(&desc->irq_data)) { + if ((!desc->irq_data.chip->irq_retrigger || + !desc->irq_data.chip->irq_retrigger(&desc->irq_data)) && + !handle_enforce_irqctx(&desc->irq_data)) { #ifdef CONFIG_HARDIRQS_SW_RESEND unsigned int irq = irq_desc_get_irq(desc); -- 2.25.1
1 4
0 0
[PATCH openEuler-1.0-LTS 1/5] genirq: Add protection against unsafe usage of generic_handle_irq()
by Yang Yingliang 24 May '21

24 May '21
From: Liao Chang <liaochang1(a)huawei.com> mainline inclusion from mainline-5.7 commit c16816acd08697b02a53f56f8936497a9f6f6e7a category: bugfix bugzilla: NA CVE: NA ------------------------------------------------- In general calling generic_handle_irq() with interrupts disabled from non interrupt context is harmless. For some interrupt controllers like the x86 trainwrecks this is outright dangerous as it might corrupt state if an interrupt affinity change is pending. Add infrastructure which allows to mark interrupts as unsafe and catch such usage in generic_handle_irq(). Reported-by: sathyanarayanan.kuppuswamy(a)linux.intel.com Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de> Acked-by: Marc Zyngier <maz(a)kernel.org> Link: https://lkml.kernel.org/r/20200306130623.590923677@linutronix.de Signed-off-by: Liao Chang <liaochang1(a)huawei.com> Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com> --- include/linux/irq.h | 13 +++++++++++++ kernel/irq/internals.h | 8 ++++++++ kernel/irq/irqdesc.c | 6 ++++++ kernel/irq/resend.c | 5 +++-- 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/include/linux/irq.h b/include/linux/irq.h index 014d5804c1b59..ca367d98a991e 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -210,6 +210,8 @@ struct irq_data { * IRQD_CAN_RESERVE - Can use reservation mode * IRQD_MSI_NOMASK_QUIRK - Non-maskable MSI quirk for affinity change * required + * IRQD_HANDLE_ENFORCE_IRQCTX - Enforce that handle_irq_*() is only invoked + * from actual interrupt context. * IRQD_AFFINITY_ON_ACTIVATE - Affinity is set on activation. Don't call * irq_chip::irq_set_affinity() when deactivated. */ @@ -235,6 +237,7 @@ enum { IRQD_DEFAULT_TRIGGER_SET = (1 << 25), IRQD_CAN_RESERVE = (1 << 26), IRQD_MSI_NOMASK_QUIRK = (1 << 27), + IRQD_HANDLE_ENFORCE_IRQCTX = (1 << 28), IRQD_AFFINITY_ON_ACTIVATE = (1 << 29), }; @@ -305,6 +308,16 @@ static inline bool irqd_is_single_target(struct irq_data *d) return __irqd_to_state(d) & IRQD_SINGLE_TARGET; } +static inline void irqd_set_handle_enforce_irqctx(struct irq_data *d) +{ + __irqd_to_state(d) |= IRQD_HANDLE_ENFORCE_IRQCTX; +} + +static inline bool irqd_is_handle_enforce_irqctx(struct irq_data *d) +{ + return __irqd_to_state(d) & IRQD_HANDLE_ENFORCE_IRQCTX; +} + static inline bool irqd_is_wakeup_set(struct irq_data *d) { return __irqd_to_state(d) & IRQD_WAKEUP_STATE; diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h index ed4843df6220c..207bac6ad4c30 100644 --- a/kernel/irq/internals.h +++ b/kernel/irq/internals.h @@ -422,6 +422,10 @@ static inline struct cpumask *irq_desc_get_pending_mask(struct irq_desc *desc) { return desc->pending_mask; } +static inline bool handle_enforce_irqctx(struct irq_data *data) +{ + return irqd_is_handle_enforce_irqctx(data); +} bool irq_fixup_move_pending(struct irq_desc *desc, bool force_clear); #else /* CONFIG_GENERIC_PENDING_IRQ */ static inline bool irq_can_move_pcntxt(struct irq_data *data) @@ -448,6 +452,10 @@ static inline bool irq_fixup_move_pending(struct irq_desc *desc, bool fclear) { return false; } +static inline bool handle_enforce_irqctx(struct irq_data *data) +{ + return false; +} #endif /* !CONFIG_GENERIC_PENDING_IRQ */ #if !defined(CONFIG_IRQ_DOMAIN) || !defined(CONFIG_IRQ_DOMAIN_HIERARCHY) diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index dc4549fc71f95..ffdf02b01d816 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -633,9 +633,15 @@ void irq_init_desc(unsigned int irq) int generic_handle_irq(unsigned int irq) { struct irq_desc *desc = irq_to_desc(irq); + struct irq_data *data; if (!desc) return -EINVAL; + + data = irq_desc_get_irq_data(desc); + if (WARN_ON_ONCE(!in_irq() && handle_enforce_irqctx(data))) + return -EPERM; + generic_handle_irq_desc(desc); return 0; } diff --git a/kernel/irq/resend.c b/kernel/irq/resend.c index 98c04ca5fa43d..5064b13b80d60 100644 --- a/kernel/irq/resend.c +++ b/kernel/irq/resend.c @@ -72,8 +72,9 @@ void check_irq_resend(struct irq_desc *desc) desc->istate &= ~IRQS_PENDING; desc->istate |= IRQS_REPLAY; - if (!desc->irq_data.chip->irq_retrigger || - !desc->irq_data.chip->irq_retrigger(&desc->irq_data)) { + if ((!desc->irq_data.chip->irq_retrigger || + !desc->irq_data.chip->irq_retrigger(&desc->irq_data)) && + !handle_enforce_irqctx(&desc->irq_data)) { #ifdef CONFIG_HARDIRQS_SW_RESEND unsigned int irq = irq_desc_get_irq(desc); -- 2.25.1
1 4
0 0
[PATCH openEuler-1.0-LTS 1/3] jbd2: remove the out label in __jbd2_journal_remove_checkpoint()
by Yang Yingliang 24 May '21

24 May '21
From: Zhang Yi <yi.zhang(a)huawei.com> hulk inclusion category: bugfix bugzilla: 50788 CVE: NA --------------------------- The 'out' lable just return the 'ret' value and seems not required, so remove this label and switch to return appropriate value immediately. This patch also do some minor cleanup, no logical change. Signed-off-by: Zhang Yi <yi.zhang(a)huawei.com> Reviewed-by: Jan Kara <jack(a)suse.cz> Reviewed-by: Zhang Xiaoxu <zhangxiaoxu5(a)huawei.com> Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com> --- fs/jbd2/checkpoint.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/fs/jbd2/checkpoint.c b/fs/jbd2/checkpoint.c index 96bf33986d030..61de87fbf5ec3 100644 --- a/fs/jbd2/checkpoint.c +++ b/fs/jbd2/checkpoint.c @@ -562,13 +562,13 @@ int __jbd2_journal_remove_checkpoint(struct journal_head *jh) struct transaction_chp_stats_s *stats; transaction_t *transaction; journal_t *journal; - int ret = 0; JBUFFER_TRACE(jh, "entry"); - if ((transaction = jh->b_cp_transaction) == NULL) { + transaction = jh->b_cp_transaction; + if (!transaction) { JBUFFER_TRACE(jh, "not on transaction"); - goto out; + return 0; } journal = transaction->t_journal; @@ -577,9 +577,9 @@ int __jbd2_journal_remove_checkpoint(struct journal_head *jh) jh->b_cp_transaction = NULL; jbd2_journal_put_journal_head(jh); - if (transaction->t_checkpoint_list != NULL || - transaction->t_checkpoint_io_list != NULL) - goto out; + /* Is this transaction empty? */ + if (transaction->t_checkpoint_list || transaction->t_checkpoint_io_list) + return 0; /* * There is one special case to worry about: if we have just pulled the @@ -591,10 +591,12 @@ int __jbd2_journal_remove_checkpoint(struct journal_head *jh) * See the comment at the end of jbd2_journal_commit_transaction(). */ if (transaction->t_state != T_FINISHED) - goto out; + return 0; - /* OK, that was the last buffer for the transaction: we can now - safely remove this transaction from the log */ + /* + * OK, that was the last buffer for the transaction, we can now + * safely remove this transaction from the log. + */ stats = &transaction->t_chp_stats; if (stats->cs_chp_time) stats->cs_chp_time = jbd2_time_diff(stats->cs_chp_time, @@ -604,9 +606,7 @@ int __jbd2_journal_remove_checkpoint(struct journal_head *jh) __jbd2_journal_drop_transaction(journal, transaction); jbd2_journal_free_transaction(transaction); - ret = 1; -out: - return ret; + return 1; } /* -- 2.25.1
1 2
0 0
[PATCH kernel-4.19 1/3] jbd2: remove the out label in __jbd2_journal_remove_checkpoint()
by Yang Yingliang 24 May '21

24 May '21
From: Zhang Yi <yi.zhang(a)huawei.com> hulk inclusion category: bugfix bugzilla: 50788 CVE: NA --------------------------- The 'out' lable just return the 'ret' value and seems not required, so remove this label and switch to return appropriate value immediately. This patch also do some minor cleanup, no logical change. Signed-off-by: Zhang Yi <yi.zhang(a)huawei.com> Reviewed-by: Jan Kara <jack(a)suse.cz> Reviewed-by: Zhang Xiaoxu <zhangxiaoxu5(a)huawei.com> Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com> --- fs/jbd2/checkpoint.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/fs/jbd2/checkpoint.c b/fs/jbd2/checkpoint.c index 96bf33986d030..61de87fbf5ec3 100644 --- a/fs/jbd2/checkpoint.c +++ b/fs/jbd2/checkpoint.c @@ -562,13 +562,13 @@ int __jbd2_journal_remove_checkpoint(struct journal_head *jh) struct transaction_chp_stats_s *stats; transaction_t *transaction; journal_t *journal; - int ret = 0; JBUFFER_TRACE(jh, "entry"); - if ((transaction = jh->b_cp_transaction) == NULL) { + transaction = jh->b_cp_transaction; + if (!transaction) { JBUFFER_TRACE(jh, "not on transaction"); - goto out; + return 0; } journal = transaction->t_journal; @@ -577,9 +577,9 @@ int __jbd2_journal_remove_checkpoint(struct journal_head *jh) jh->b_cp_transaction = NULL; jbd2_journal_put_journal_head(jh); - if (transaction->t_checkpoint_list != NULL || - transaction->t_checkpoint_io_list != NULL) - goto out; + /* Is this transaction empty? */ + if (transaction->t_checkpoint_list || transaction->t_checkpoint_io_list) + return 0; /* * There is one special case to worry about: if we have just pulled the @@ -591,10 +591,12 @@ int __jbd2_journal_remove_checkpoint(struct journal_head *jh) * See the comment at the end of jbd2_journal_commit_transaction(). */ if (transaction->t_state != T_FINISHED) - goto out; + return 0; - /* OK, that was the last buffer for the transaction: we can now - safely remove this transaction from the log */ + /* + * OK, that was the last buffer for the transaction, we can now + * safely remove this transaction from the log. + */ stats = &transaction->t_chp_stats; if (stats->cs_chp_time) stats->cs_chp_time = jbd2_time_diff(stats->cs_chp_time, @@ -604,9 +606,7 @@ int __jbd2_journal_remove_checkpoint(struct journal_head *jh) __jbd2_journal_drop_transaction(journal, transaction); jbd2_journal_free_transaction(transaction); - ret = 1; -out: - return ret; + return 1; } /* -- 2.25.1
1 2
0 0
[PATCH openEuler-1.0-LTS 1/8] treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 378
by Yang Yingliang 22 May '21

22 May '21
From: Thomas Gleixner <tglx(a)linutronix.de> mainline inclusion from mainline-v5.2-rc4 commit 4317cf95ca02411cf788d10c1972a38582e8c34d category: feature bugzilla: NA CVE: NA ------------------------------------------------- Based on 1 normalized pattern(s): licensed under the gnu general public license version 2 gplv2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 5 file(s). Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de> Reviewed-by: Kate Stewart <kstewart(a)linuxfoundation.org> Reviewed-by: Armijn Hemel <armijn(a)tjaldur.nl> Reviewed-by: Allison Randal <allison(a)lohutok.net> Cc: linux-spdx(a)vger.kernel.org Link: https://lkml.kernel.org/r/20190531081036.993848054@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com> Reviewed-by: Jian Cheng <cj.chengjian(a)huawei.com> Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com> --- scripts/extract-vmlinux | 2 +- scripts/recordmcount.c | 2 +- scripts/recordmcount.h | 3 +-- scripts/sortextable.c | 2 +- scripts/sortextable.h | 4 +--- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/scripts/extract-vmlinux b/scripts/extract-vmlinux index e6239f39abadd..5731a6845a9e8 100755 --- a/scripts/extract-vmlinux +++ b/scripts/extract-vmlinux @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-only # ---------------------------------------------------------------------- # extract-vmlinux - Extract uncompressed vmlinux from a kernel image # @@ -7,7 +8,6 @@ # # (c) 2011 Corentin Chary <corentin.chary(a)gmail.com> # -# Licensed under the GNU General Public License, version 2 (GPLv2). # ---------------------------------------------------------------------- check_vmlinux() diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c index 895c40e8679f7..4182274a5ab28 100644 --- a/scripts/recordmcount.c +++ b/scripts/recordmcount.c @@ -1,8 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * recordmcount.c: construct a table of the locations of calls to 'mcount' * so that ftrace can find them quickly. * Copyright 2009 John F. Reiser <jreiser(a)BitWagon.com>. All rights reserved. - * Licensed under the GNU General Public License, version 2 (GPLv2). * * Restructured to fit Linux format, as well as other updates: * Copyright 2010 Steven Rostedt <srostedt(a)redhat.com>, Red Hat Inc. diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h index ccfbfde615563..47fca2c69a73e 100644 --- a/scripts/recordmcount.h +++ b/scripts/recordmcount.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * recordmcount.h * @@ -15,8 +16,6 @@ * * This conversion to macros was done by: * Copyright 2010 Steven Rostedt <srostedt(a)redhat.com>, Red Hat Inc. - * - * Licensed under the GNU General Public License, version 2 (GPLv2). */ #undef append_func #undef is_fake_mcount diff --git a/scripts/sortextable.c b/scripts/sortextable.c index 365a907f98b3d..55768654e3c6a 100644 --- a/scripts/sortextable.c +++ b/scripts/sortextable.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * sortextable.c: Sort the kernel's exception table * @@ -6,7 +7,6 @@ * Based on code taken from recortmcount.c which is: * * Copyright 2009 John F. Reiser <jreiser(a)BitWagon.com>. All rights reserved. - * Licensed under the GNU General Public License, version 2 (GPLv2). * * Restructured to fit Linux format, as well as other updates: * Copyright 2010 Steven Rostedt <srostedt(a)redhat.com>, Red Hat Inc. diff --git a/scripts/sortextable.h b/scripts/sortextable.h index ba8700428e21d..d4b3f6c40f027 100644 --- a/scripts/sortextable.h +++ b/scripts/sortextable.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * sortextable.h * @@ -7,9 +8,6 @@ * * Copyright 2009 John F. Reiser <jreiser(a)BitWagon.com>. All rights reserved. * Copyright 2010 Steven Rostedt <srostedt(a)redhat.com>, Red Hat Inc. - * - * - * Licensed under the GNU General Public License, version 2 (GPLv2). */ #undef extable_ent_size -- 2.25.1
1 7
0 0
[PATCH kernel-4.19 1/8] treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 378
by Yang Yingliang 22 May '21

22 May '21
From: Thomas Gleixner <tglx(a)linutronix.de> mainline inclusion from mainline-v5.2-rc4 commit 4317cf95ca02411cf788d10c1972a38582e8c34d category: feature bugzilla: NA CVE: NA ------------------------------------------------- Based on 1 normalized pattern(s): licensed under the gnu general public license version 2 gplv2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 5 file(s). Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de> Reviewed-by: Kate Stewart <kstewart(a)linuxfoundation.org> Reviewed-by: Armijn Hemel <armijn(a)tjaldur.nl> Reviewed-by: Allison Randal <allison(a)lohutok.net> Cc: linux-spdx(a)vger.kernel.org Link: https://lkml.kernel.org/r/20190531081036.993848054@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com> Reviewed-by: Jian Cheng <cj.chengjian(a)huawei.com> Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com> --- scripts/extract-vmlinux | 2 +- scripts/recordmcount.c | 2 +- scripts/recordmcount.h | 3 +-- scripts/sortextable.c | 2 +- scripts/sortextable.h | 4 +--- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/scripts/extract-vmlinux b/scripts/extract-vmlinux index e6239f39abadd..5731a6845a9e8 100755 --- a/scripts/extract-vmlinux +++ b/scripts/extract-vmlinux @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-only # ---------------------------------------------------------------------- # extract-vmlinux - Extract uncompressed vmlinux from a kernel image # @@ -7,7 +8,6 @@ # # (c) 2011 Corentin Chary <corentin.chary(a)gmail.com> # -# Licensed under the GNU General Public License, version 2 (GPLv2). # ---------------------------------------------------------------------- check_vmlinux() diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c index d3e61dcc61295..9660dc632b54f 100644 --- a/scripts/recordmcount.c +++ b/scripts/recordmcount.c @@ -1,8 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * recordmcount.c: construct a table of the locations of calls to 'mcount' * so that ftrace can find them quickly. * Copyright 2009 John F. Reiser <jreiser(a)BitWagon.com>. All rights reserved. - * Licensed under the GNU General Public License, version 2 (GPLv2). * * Restructured to fit Linux format, as well as other updates: * Copyright 2010 Steven Rostedt <srostedt(a)redhat.com>, Red Hat Inc. diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h index ccfbfde615563..47fca2c69a73e 100644 --- a/scripts/recordmcount.h +++ b/scripts/recordmcount.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * recordmcount.h * @@ -15,8 +16,6 @@ * * This conversion to macros was done by: * Copyright 2010 Steven Rostedt <srostedt(a)redhat.com>, Red Hat Inc. - * - * Licensed under the GNU General Public License, version 2 (GPLv2). */ #undef append_func #undef is_fake_mcount diff --git a/scripts/sortextable.c b/scripts/sortextable.c index 365a907f98b3d..55768654e3c6a 100644 --- a/scripts/sortextable.c +++ b/scripts/sortextable.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * sortextable.c: Sort the kernel's exception table * @@ -6,7 +7,6 @@ * Based on code taken from recortmcount.c which is: * * Copyright 2009 John F. Reiser <jreiser(a)BitWagon.com>. All rights reserved. - * Licensed under the GNU General Public License, version 2 (GPLv2). * * Restructured to fit Linux format, as well as other updates: * Copyright 2010 Steven Rostedt <srostedt(a)redhat.com>, Red Hat Inc. diff --git a/scripts/sortextable.h b/scripts/sortextable.h index ba8700428e21d..d4b3f6c40f027 100644 --- a/scripts/sortextable.h +++ b/scripts/sortextable.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * sortextable.h * @@ -7,9 +8,6 @@ * * Copyright 2009 John F. Reiser <jreiser(a)BitWagon.com>. All rights reserved. * Copyright 2010 Steven Rostedt <srostedt(a)redhat.com>, Red Hat Inc. - * - * - * Licensed under the GNU General Public License, version 2 (GPLv2). */ #undef extable_ent_size -- 2.25.1
1 7
0 0
[PATCH kernel-4.19 1/2] Revert "ext4: Fix bug on in ext4_es_cache_extent as ext4_split_extent_at failed"
by Yang Yingliang 22 May '21

22 May '21
From: Ye Bin <yebin10(a)huawei.com> hulk inclusion category: bugfix bugzilla: 51854 CVE: NA ------------------------------------------------- This reverts commit 5446b76c34ed8875ba05a61fccfe838a98193791. Signed-off-by: Ye Bin <yebin10(a)huawei.com> Reviewed-by: Zhang Xiaoxu <zhangxiaoxu5(a)huawei.com> Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com> --- fs/ext4/extents.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 584c1ffc9a0c2..251c18fc74636 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -3330,7 +3330,7 @@ static int ext4_split_extent_at(handle_t *handle, goto out; } else if (err) - goto err; + goto fix_extent_len; out: ext4_ext_show_leaf(inode, path); @@ -3338,7 +3338,6 @@ static int ext4_split_extent_at(handle_t *handle, fix_extent_len: ex->ee_len = orig_ex.ee_len; -err: ext4_ext_dirty(handle, inode, path + path->p_depth); return err; } -- 2.25.1
1 1
0 0
[PATCH kernel-4.19 1/4] nfs: Fix copy-and-paste error in debug message
by Yang Yingliang 22 May '21

22 May '21
From: Donald Buczek <buczek(a)molgen.mpg.de> mainline inclusion from mainline-v5.3-rc1 commit 2eaf426debdce566df9302b218307483903ac534 category: bugfix bugzilla: NA CVE: NA -------------------------------- The debug message of decode_attr_lease_time incorrectly says "file size". Fix it to "lease time". Signed-off-by: Donald Buczek <buczek(a)molgen.mpg.de> Signed-off-by: Trond Myklebust <trond.myklebust(a)hammerspace.com> Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5(a)huawei.com> Reviewed-by: Zhang Yi <yi.zhang(a)huawei.com> Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com> --- fs/nfs/nfs4xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 6236daec4cc6c..45a437b21408b 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -3471,7 +3471,7 @@ static int decode_attr_lease_time(struct xdr_stream *xdr, uint32_t *bitmap, uint *res = be32_to_cpup(p); bitmap[0] &= ~FATTR4_WORD0_LEASE_TIME; } - dprintk("%s: file size=%u\n", __func__, (unsigned int)*res); + dprintk("%s: lease time=%u\n", __func__, (unsigned int)*res); return 0; out_overflow: print_overflow_msg(__func__, xdr); -- 2.25.1
1 3
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • Older →

HyperKitty Powered by HyperKitty