Hi:
Alex Shi wrote:
> One of my VM guest has a swapon issue:
> root #swapon -v -f /swap1
> swapon /swap1
> swapon: /swap1: found swap signature: version 1, page-size 4, same byte order
> swapon: /swap1: pagesize=4096, swapsize=1607467008, devsize=1607467008
> swapon: /swap1: swapon failed: Invalid
Andrew Morton wrote:
> On Mon, 21 Sep 2020 08:22:24 -0400 Miaohe Lin wrote:
>
>> We could use helper memset to fill the swap_map with SWAP_HAS_CACHE
>> instead of a direct loop here to simplify the code. Also we can remove
>> the local variable i and map this way.
>> *slot = swp_entry(si->
Andrew Morton wrote:
> On Fri, 9 Oct 2020 09:30:59 -0400 Miaohe Lin wrote:
>
>> swap_ra_info() may leave ra_info untouched in non_swap_entry() case as
>> page table lock is not held. In this case, we have ra_info.nr_pte == 0
>> and it is meaningless to continue with swap cache readahead. Skip s
Matthew Wilcox wrote:
> On Mon, Oct 12, 2020 at 02:00:17PM +0000, linmiaohe wrote:
>> Hi all:
>>
>> Many thanks for brilliant z3fold code. I am reading it and have some
>> questions about it. It's very nice of you if you can explain it for me.
>>
Hi all:
Many thanks for brilliant z3fold code. I am reading it and have some
questions about it. It's very nice of you if you can explain it for me.
1.page->private is used in z3fold but PagePrivate flag is never set,
should we SetPagePrivate for it?
2.Since PagePrivate f
Hi Vitaly:
Many thanks for your brilliant z3fold code. I am reading it and have
some questions about it. It's very nice of you if you can explain it for me.
1.page->private is used in z3fold but PagePrivate flag is never set,
should we SetPagePrivate for it?
2.Since PageP
David Hildenbrand wrote:
>> Am 10.10.2020 um 03:53 schrieb linmiaohe :
>>
>> David Hildenbrand wrote:
>>>> On 09.10.20 15:59, Miaohe Lin wrote:
>>>> They are unused anymore.
>>>
>>> -EINVAL, sentence does not make sense :
Michal Hocko wrote:
> On Fri 09-10-20 09:51:04, Miaohe Lin wrote:
>> The mz->usage_in_excess >= mz_node->usage_in_excess check is exactly
>> the else case of mz->usage_in_excess < mz_node->usage_in_excess. So we
>> could replace else if (mz->usage_in_excess >=
>> mz_node->usage_in_excess) with
David Hildenbrand wrote:
> On 09.10.20 15:59, Miaohe Lin wrote:
>> They are unused anymore.
>
>-EINVAL, sentence does not make sense :)
>
>"They are not used anymore."
>"They are unused ."
My poor English. ;) Will change it in v2 soon. Many Thanks.
>
>Reviewed-by: David Hildenbrand
>
Jason Gunthorpe wrote:
> On Fri, Oct 09, 2020 at 03:04:20PM -0700, Andrew Morton wrote:
>> On Fri, 9 Oct 2020 17:03:37 +0200 "Christian König"
>> wrote:
>>
>> > Patch "495c10cc1c0c CHROMIUM: dma-buf: restore args..."
>> > adds a workaround for a bug in mmap_region.
>> >
>> > As the comment st
Andrew Morton wrote:
> On Thu, 8 Oct 2020 07:17:18 +0000 linmiaohe wrote:
>
>> Andrew Morton wrote:
>> > On Wed, 16 Sep 2020 05:07:33 -0400 Miaohe Lin wrote:
>> >
>> >> The syzbot reported the below general protection fault:
>>
>> >
Andrew Morton wrote:
> On Wed, 16 Sep 2020 05:07:33 -0400 Miaohe Lin wrote:
>
>> The syzbot reported the below general protection fault:
>>
>> general protection fault, probably for non-canonical address
>> 0xe00eeaee003b: [#1] PREEMPT SMP KASAN
>> KASAN: maybe wild-memory-access in ran
Friendly ping.
> The syzbot reported the below general protection fault:
>
> general protection fault, probably for non-canonical address
> 0xe00eeaee003b: [#1] PREEMPT SMP KASAN
> KASAN: maybe wild-memory-access in range
> [0x007001d8-0x007001df]
> CPU: 1 PID: 10488 Comm:
Friendly ping.
> We could use helper memset to fill the swap_map with SWAP_HAS_CACHE instead
> of a direct loop here to simplify the code. Also we can remove the local
> variable i and map this way.
>
> Signed-off-by: Miaohe Lin
> ---
> mm/swapfile.c | 7 ++-
> 1 file changed, 2 insertions
Friendly ping :)
> Correct the wrong param name @addr to @p.
>
> Signed-off-by: Miaohe Lin
> ---
> include/asm-generic/bitops/lock.h | 8
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/include/asm-generic/bitops/lock.h
> b/include/asm-generic/bitops/lock.h
Friendly ping :)
> When bio_add_hw_page() failed, we left page reference still held in pages
> from iov_iter_get_pages(). Release these references and also advance the
> iov_iter according to what we have done successfully yet.
>
> Fixes: 0512a75b98f8 ("block: Introduce REQ_OP_ZONE_APPEND")
> Re
Michal Hocko wrote:
> On Thu 17-09-20 06:59:00, Miaohe Lin wrote:
>> Since commit 79dfdaccd1d5 ("memcg: make oom_lock 0 and 1 based rather
>> than counter"), the mem_cgroup_unmark_under_oom() is added and the
>> comment of the mem_cgroup_oom_unlock() is moved here. But this comment
>> make no s
Andrew Morton wrote:
> On Thu, 24 Sep 2020 07:16:41 -0400 Miaohe Lin wrote:
>
>> Add else to split mutually exclusive case and avoid some unnecessary check.
>> It doesn't seem to change code generation (compiler is smart), but I
>> think it helps readability.
>
> OK, I guess. But the comments a
Friend ping :)
> Use helper function blk_mq_hctx_stopped() to check if hardware queue stopped
> in blk_mq_run_work_fn().
>
> Signed-off-by: Miaohe Lin
> ---
> block/blk-mq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Friendly ping :)
>
> Use helper function blk_mq_sched_needs_restart() to check if hardware queue
> needs restart.
>
> Signed-off-by: Miaohe Lin
> ---
> block/blk-mq-sched.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Friendly ping :)
> Fix various comments including wrong function names, global variable name and
> so on.
>
> Signed-off-by: Miaohe Lin
> ---
> block/bio.c | 2 +-
> block/blk-cgroup.c | 2 +-
> block/blk-mq.c | 4 ++--
> block/blk-throttle.c | 2 +-
> 4 files changed, 5 insert
Friendly ping. :)
> Since commit dfa50b605c2a ("sched: Make finish_task_switch() return 'struct
> rq *'"), prev == current is incorrect in finish_task_switch(). Also fix a
> typo in the comment of struct dl_bandwidth.
>
> Signed-off-by: Miaohe Lin
> ---
> kernel/sched/core.c | 4 ++--
> kerne
Will Deacon wrote:
> On Mon, Sep 21, 2020 at 07:23:58AM -0400, Miaohe Lin wrote:
>> The description of arg flags is incomplete. The flags is saved
>> IRQ-flags when the @lock is acquired.
>>
>> + * @flags: saved IRQ-flags if the is @lock acquired
>
>This still isn't quite right. If we go with:
>
Matthew Wilcox wrote:
> On Thu, Sep 17, 2020 at 07:44:49AM -0400, Miaohe Lin wrote:
>> Cache the swap_node() in a local variable to avoid possible multiple
>> call to swap_node(), though compiler may do this for us.
>
>Why don't you find out? Compare the assembly before and after, see what the
Nick Desaulniers wrote:
> There is no case after the default from which to fallthrough to. Clang will
> error in this case (unhelpfully without context, see link below) and GCC will
> with -Wswitch-unreachable.
>
>The previous commit should have just replaced the comment with a break
>statement
Michal Hocko wrote:
> On Wed 16-09-20 09:19:27, Miaohe Lin wrote:
>> Since commit fb2a6fc56be6 ("mm: memcg: rework and document OOM waiting
>> and wakeup"), we have renamed mem_cgroup_oom_lock to
>> mem_cgroup_oom_trylock. So replace mem_cgroup_oom_lock with
>> mem_cgroup_oom_trylock in comment
1506f0
>DR0: 0000 DR1: DR2:
>DR3: DR6: fffe0ff0 DR7: 0400
>
>
>Tested on:
>
>commit: 152d246f mmap: revert mm-mmap-merge-vma-after-call_mmap-if..
>git tree: https://github.com/Linmiaoh
R1: DR2:
>DR3: DR6: fffe0ff0 DR7: 0400 Kernel panic
>- not syncing: Fatal exception Kernel Offset: disabled
>
>
>Tested on:
>
>commit: 8f79400b fix vma_merge gpf
>git tree: https
293 R12: 0118cf40
> R13: 0118d940 R14: R15: 0118cfec Kernel
> Offset: disabled Rebooting in 86400 seconds..
>
>
> Tested on:
>
> commit: 796cd8f4 fix gpf
> git tree: https://github.com/Linmiaohe/linux/
>
Christian Brauner wrote:
> On Sun, Sep 13, 2020 at 05:24:15AM -0400, Miaohe Lin wrote:
>> Use helper function mapping_allow_writable() to atomic_inc i_mmap_writable.
>>
>> Signed-off-by: Miaohe Lin
>> ---
>
>Hey Miaohe,
>
>Thanks for the patch!
>Per se there's nothing against using a proper help
00293 R12: 0118cf40
>R13: 0118d940 R14: R15: 0118cfec Kernel
>Offset: disabled Rebooting in 86400 seconds..
>
>
>Tested on:
>
>commit: 796cd8f4 fix gpf
>git tree: https://github.com/Linmiaohe/linux/
>console output:
Eric W. Biederman wrote:
> linmiaohe writes:
>> Eric W. Biederman wrote:
>>> Miaohe Lin writes:
>>>
>>>> Use helper function mapping_allow_writable() to atomic_inc
>>>> i_mmap_writable.
>>>
>>>Why?
>>>
>>
>
Michal Hocko wrote:
> On Sun 13-09-20 05:41:29, Miaohe Lin wrote:
>> Since commit bbec2e15170a ("mm: rename page_counter's count/limit into
>> usage/max"), the arg @reclaim has no priority field anymore.
>
>The priority field has been removed by 9da83f3fc74b ("mm, memcg: clean up
>reclaim iter a
arch_do_signal+0x82/0x2520 arch/x86/kernel/signal.c:811
> exit_to_user_mode_loop kernel/entry/common.c:136 [inline]
> exit_to_user_mode_prepare+0x1ae/0x200 kernel/entry/common.c:167
> syscall_exit_to_user_mode+0x7e/0x2e0 kernel/entry/common.c:242
> entry_SYSCALL_64_after_hwframe+0x44/0xa9
#syz test: https://github.com/Linmiaohe/linux/
796cd8f497d5b62b00667229375326381c32bdb3
Hillf Danton wrote:
> On Sun, 13 Sep 2020 09:17:26 +0000 linmiaohe wrote:
>>
>> I reviewed the code carefully these days and I found vma_merge() do only
>> fput() the vm_file of the linked vma in remove_next cases.
>> This gpf is much likely because the ->mmap
Eric W. Biederman wrote:
> Miaohe Lin writes:
>
>> Use helper function mapping_allow_writable() to atomic_inc
>> i_mmap_writable.
>
>Why?
>
Because I think it's better to use the wrapper function instead of the open
hard code.
Thanks.
Hi:
Hillf Danton wrote:
> Tue, 08 Sep 2020 17:19:17 -0700
>> syzbot found the following issue on:
>> general protection fault, probably for non-canonical address
>> 0xe00eeaee003b: [#1] PREEMPT SMP KASAN
>> KASAN: maybe wild-memory-access in range
>> [0x007001d8-0x007001
Hillf Danton wrote:
>> On Thu, 10 Sep 2020 07:43:41 +0530 Souptick Joarder wrote:
>> On Wed, Sep 9, 2020 at 9:45 AM Hillf Danton wrote:
>> > Tue, 08 Sep 2020 17:19:17 -0700
>> > > syzbot found the following issue on:
>> > >
>> > > HEAD commit:59126901 Merge tag
>> > > 'perf-tools-fixes-for-v5.
Johannes Thumshirn wrote:
>On 05/09/2020 11:41, Miaohe Lin wrote:
>> When bio_add_hw_page() failed, we left page reference still held in pages.
>
>I'd add "from iov_iter_get_pages()" to the above sentence.
>
Sounds good. Will add it in v2.
>Otherwise
>Reviewed-by: Johannes Thumshirn
Many Thank
Jakub Kicinski wrote:
>On Sat, 5 Sep 2020 05:14:48 -0400 Miaohe Lin wrote:
>> Since commit 8d7017fd621d ("blackhole_netdev: use blackhole_netdev to
>> invalidate dst entries"), we use blackhole_netdev to invalidate dst
>> entries instead of loopback device anymore. Also fix broken NETIF_F_HW_CSU
Christian Brauner wrote:
>On Wed, Sep 02, 2020 at 01:34:59AM +0000, linmiaohe wrote:
>> Christian Brauner wrote:
>> >On Tue, Sep 01, 2020 at 06:39:05PM +0200, Oleg Nesterov wrote:
>> >> On 09/01, Christian Brauner wrote:
>> >Christian
>>
>&g
Eric Biggers wrote:
>On Tue, Sep 01, 2020 at 07:59:21AM -0400, Miaohe Lin wrote:
>> mempool_alloc() may return NULL if __GFP_DIRECT_RECLAIM is not set in
>> gfp_mask under memory pressure. So we should check the return value of
>> mempool_alloc() against NULL before dereference.
>>
>> Fixes: a89
Christoph Hellwig wrote:
>On Tue, Sep 01, 2020 at 08:00:06AM -0400, Miaohe Lin wrote:
>> When bio is full, __bio_iov_iter_get_pages() would return error
>> directly while left page reference still held in pages. Release these
>> references.
>> Also advance the iov_iter according to what we have
Christian Brauner wrote:
>On Tue, Sep 01, 2020 at 06:39:05PM +0200, Oleg Nesterov wrote:
>> On 09/01, Christian Brauner wrote:
>> >
>> > On Tue, Sep 01, 2020 at 07:58:00AM -0400, Miaohe Lin wrote:
>> > > No functional change intended.
>> >
>> > Hey Miaohe,
>> >
>> > Thank you for the patch.
>> > I
Christian Brauner wrote:
> On Tue, Sep 01, 2020 at 07:58:00AM -0400, Miaohe Lin wrote:
> No functional change intended.
>Hey Miaohe,
>
>Thank you for the patch.
>I'm sure this is well-intended but afaict the whole file has more or less a
>consistent style already where e.g. sig-1 without spaces
Jens Axboe wrote:
>On 8/29/20 3:37 AM, Miaohe Lin wrote:
>> Trim bio to sensible size in bio_trim() or something bad may happen.
>
>This really needs a LOT more detail. What is "something bad"? How does this
>condition trigger to begin with?
>
Many thanks for your reply.
I do this mainly by cod
David Ahern wrote:
>On 8/29/20 3:01 AM, Miaohe Lin wrote:
>> @@ -277,15 +277,13 @@ static struct sock *inet_lhash2_lookup(struct net *net,
>> const __be32 daddr, const unsigned short hnum,
>> const int dif, const int sdif)
>> {
>> -boo
friendly ping :)
>Miaohe Lin wrote:
>From: Miaohe Lin
>
>Use wrapper function wake_up_worker() to wake up first idle worker.
>
>Signed-off-by: Miaohe Lin
>---
> kernel/workqueue.c | 10 --
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
>diff --git a/kernel/workqueue.c b/kernel/workq
friendly ping :)
>Miaohe Lin wrote:
>From: Miaohe Lin
>
>The need for padding 64bit is implicitly checked by nla_align_64bit(), so
>remove this explicit one.
>
>Signed-off-by: Miaohe Lin
>---
> lib/nlattr.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
>diff --git a/lib/nlattr.c b
Friendly ping :)
>From: Miaohe Lin
>
>Convert the uses of fallthrough comments to fallthrough macro.
>
>Signed-off-by: Hongxiang Lou
>Signed-off-by: Miaohe Lin
>---
> fs/io_uring.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/fs/io_uring.c b/fs/io_uring.c index 2a3af95
Chuck Lever wrote:
>> On Aug 19, 2020, at 5:26 AM, Miaohe Lin wrote:
>>
>> Convert the uses of fallthrough comments to fallthrough macro.
>
>The patch description would be more helpful if it referenced the commit that
>added the fallthrough macro to the kernel, or a permanent mailing list link
Kees Cook wrote:
>On Mon, Aug 17, 2020 at 07:59:33AM -0400, Miaohe Lin wrote:
>> There is no need to check if this process has the right to modify the
>> specified process when they are same.
>>
>> Signed-off-by: Hongxiang Lou
>> Signed-off-by: Miaohe Lin
>
>NAK, please don't do this -- the pt
Ilya Dryomov wrote:
>On Wed, Aug 19, 2020 at 10:53 AM Miaohe Lin wrote:
>>
>> Convert the uses of fallthrough comments to fallthrough macro.
>>
>
>Hi Miaohe,
>
>I've already done that, folding into your previous patch:
>
>
> https://github.com/ceph/ceph-client/commit/3f19ae89547df1b8ccba359a2f7
David Miller wrote:
>From: Miaohe Lin
>Date: Tue, 18 Aug 2020 07:41:32 -0400
>
>> @@ -417,7 +417,7 @@ static void sock_warn_obsolete_bsdism(const char
>> *name) {
>> static int warned;
>> static char warncomm[TASK_COMM_LEN];
>> -if (strcmp(warncomm, current->comm) && warned < 5) {
Eric Dumazet wrote:
>On Tue, Aug 18, 2020 at 4:58 AM Miaohe Lin wrote:
>>
>> The npages test against MAX_SKB_FRAGS can be relaxed if we succeed to
>> allocate high order pages as the note in comment said.
>>
>
>
>We do not want this change.
>
>This interface is used by datagram providers, we do
Matthew Wilcox wrote:
>On Mon, Aug 17, 2020 at 07:59:33AM -0400, Miaohe Lin wrote:
>> There is no need to check if this process has the right to modify the
>> specified process when they are same.
>
>We should probably also skip the security hook call if a process is modifying
>its own pages.
>
David Miller wrote:
>> David Miller wrote:
+ /* split line is in frag list */
+ if (k == 0 && pskb_carve_frag_list(skb, shinfo, off - pos, gfp_mask)) {
+ /* skb_frag_unref() is not needed here as shinfo->nr_frags = 0.
*/
+ if (skb_has_frag_list(skb))
David Miller wrote:
>> +/* split line is in frag list */
>> +if (k == 0 && pskb_carve_frag_list(skb, shinfo, off - pos, gfp_mask)) {
>> +/* skb_frag_unref() is not needed here as shinfo->nr_frags = 0.
>> */
>> +if (skb_has_frag_list(skb))
>> +kf
Eric Dumazet wrote:
>On Fri, Aug 14, 2020 at 12:14 AM linmiaohe wrote:
>>
>> Willem de Bruijn wrote:
>>
>> Since we always call skb_orphan_frags in skb_clone, is it unnecessary to
>> call skb_orphan_frags in pskb_expand_head when skb is cloned ?
>
>Ple
Willem de Bruijn wrote:
>On Fri, Aug 14, 2020 at 9:20 AM linmiaohe wrote:
>>
>> Willem de Bruijn wrote:
>> >On Thu, Aug 13, 2020 at 2:16 PM Miaohe Lin wrote:
>> >>
>> >> If the skb is zcopied, we should increase the skb_uarg refcount
Willem de Bruijn wrote:
>On Fri, Aug 14, 2020 at 10:17 AM linmiaohe wrote:
>>
>
>I don't think that can happen.
>
>The question is when this branch is false
>
>next = (u32)atomic_read(&sk->sk_zckey);
>if ((u32)(uarg->i
Yonghong Song wrote:
>On 8/14/20 2:16 AM, Miaohe Lin wrote:
>> Convert the uses of fallthrough comments to fallthrough macro.
>>
>> Signed-off-by: Miaohe Lin
>
>This is not a bug fix but rather an enhancement so not sure whether this
>should push to bpf tree or wait until bpf-next.
>
>It may be
Andrii Nakryiko wrote:
On Fri, Aug 14, 2020 at 2:58 AM Miaohe Lin wrote:
>>
>> Convert the uses of fallthrough comments to fallthrough macro.
>> @@ -1794,7 +1794,7 @@ static bool cg_sockopt_is_valid_access(int off, int
>> size,
>> return prog->expected_attach_type ==
>>
Willem de Bruijn wrote:
>On Thu, Aug 13, 2020 at 1:59 PM Miaohe Lin wrote:
>>
>> The var extra_uref is introduced to pass the initial reference taken
>> in sock_zerocopy_alloc to the first generated skb. But now we may fail
>> to pass the initial reference with newly allocated UDP or RAW uarg
Willem de Bruijn wrote:
>On Thu, Aug 13, 2020 at 2:16 PM Miaohe Lin wrote:
>>
>> If the skb is zcopied, we should increase the skb_uarg refcount before
>> we involve skb_release_data(). See pskb_expand_head() as a reference.
>
>Did you manage to observe a bug through this datapath in practice?
>
Willem de Bruijn wrote:
>On Thu, Aug 6, 2020 at 1:48 PM linmiaohe wrote:
>>
>> From: Miaohe Lin
>>
>> We could be trapped in deadloop when we try to copy userspace skb
>> frags buffers to kernel with a cloned skb:
>> Reproduce code snippet:
>>
Hi all:
David Miller wrote:
>From: Cong Wang
>Date: Tue, 11 Aug 2020 16:02:51 -0700
>
>>> @@ -3406,6 +3406,16 @@ static void sock_inuse_add(struct net *net,
>>> int val) } #endif
>>>
>>> +static void tw_prot_cleanup(struct timewait_sock_ops *twsk_prot) {
>>> + if (!twsk_prot)
>>> +
Eric Dumazet wrote:
> On 8/10/20 5:28 AM, Miaohe Lin wrote:
>> The skb_shared_info part of the data is assigned in the following
>> loop. It is meaningless to do a memcpy here.
>>
>
>Reminder : net-next is CLOSED.
>
Thanks for your remind. I would wait for it open.
>This is not correct. We sti
Florian Westphal wrote:
>Miaohe Lin wrote:
>> The skb_shared_info part of the data is assigned in the following loop.
>
>Where?
>
It's at the below for (i = 0; i < nfrags; i++) loop. But I missed something as
Eric Dumazet pointed out.
Sorry about it.
Steve French wrote:
>
>merged into cifs-2.6.git for-next
>
Many thanks.
> (but note that most places in fs directory other than cifs and btrfs have not
> been updated), and I noticed another 8 places in fs/cifs that you didn't
> change in your patch (ie change from the older way of
>indicating
From: Miaohe Lin
Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by: Hongxiang Lou
Signed-off-by: Miaohe Lin
---
fs/erofs/zmap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/erofs/zmap.c b/fs/erofs/zmap.c
index 7d40d78ea864..ae32554188
From: Miaohe Lin
Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by: Hongxiang Lou
Signed-off-by: Miaohe Lin
---
block/badblocks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/badblocks.c b/block/badblocks.c
index 2e5f5697db35..d39056630d
From: Miaohe Lin
Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by: Hongxiang Lou
Signed-off-by: Miaohe Lin
---
fs/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 2a3af95be4ca..77e932c25312 100644
--
From: Miaohe Lin
Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by: Hongxiang Lou
Signed-off-by: Miaohe Lin
---
fs/cifs/smb2pdu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 24c2ac360591..667d70
From: Miaohe Lin
Convert the uses of fallthrough comments to fallthrough macro.
Signed-off-by: Miaohe Lin
---
net/socket.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/socket.c b/net/socket.c
index c61f036d24f5..f4d5998bdcba 100644
--- a/net/socket.c
+++ b/net/
Al Viro wrote:
>On Thu, Aug 06, 2020 at 12:59:16PM +0100, Al Viro wrote:
>> On Thu, Aug 06, 2020 at 07:53:16PM +0800, linmiaohe wrote:
>> > From: Miaohe Lin
>> >
>> > We should fput() file iff FDPUT_FPUT is set. So we should set
>> > fput_neede
Willem de Bruijn wrote:
>On Thu, Aug 6, 2020 at 1:48 PM linmiaohe wrote:
>>
>> From: Miaohe Lin
>>
>> We could be trapped in deadloop when we try to copy userspace skb
>> frags buffers to kernel with a cloned skb:
>
>> Catch this unexpected c
Eric Dumazet wrote:
>On Tue, Aug 4, 2020 at 4:46 AM linmiaohe wrote:
>>
>> From: Miaohe Lin
>>
>> The head_frag of skb would occupy one extra skb_frag_t. Take it into
>> account or out of bound write to skb frags may happen.
>>
>
>Please share a
From: Miaohe Lin
Use helper function ip_is_fragment() to check ip fragment.
Signed-off-by: Miaohe Lin
---
net/core/skbuff.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 8a0c39e4ab0a..fa823405829c 100644
--- a/net/core/skbuff.c
From: Miaohe Lin
We should fput() file iff FDPUT_FPUT is set. So we should set fput_needed
accordingly.
Fixes: 00e188ef6a7e ("sockfd_lookup_light(): switch to fdget^W^Waway from
fget_light")
Signed-off-by: Miaohe Lin
---
net/socket.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
From: Miaohe Lin
We could be trapped in deadloop when we try to copy userspace skb frags
buffers to kernel with a cloned skb:
[kbox] catch panic event, panic reason:kernel stack overflow
[kbox] catch panic event, start logging.
CPU: 3 PID: 4083 Comm: insmod Kdump: loaded Tainted: G OE 4.1
From: Miaohe Lin
The out_fs jump label has nothing to do but goto out.
Signed-off-by: Miaohe Lin
---
net/socket.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/socket.c b/net/socket.c
index ee9c9dac4728..e1a1195ce69e 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -
From: Miaohe Lin
Use helper function fdput() to fput() the file iff FDPUT_FPUT is set.
Signed-off-by: Miaohe Lin
---
net/socket.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/socket.c b/net/socket.c
index 976426d03f09..6aff5aeb6728 100644
--- a/net/socket.c
+++
From: Miaohe Lin
The head_frag of skb would occupy one extra skb_frag_t. Take it into
account or out of bound write to skb frags may happen.
Signed-off-by: Miaohe Lin
---
net/core/skbuff.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> David Miller wrote:
>>From: linmiaohe
>>Date: Sat, 1 Aug 2020 17:12:38 +0800
>>
>> From: Miaohe Lin
>>
>> Use eth_zero_addr() to clear mac address instead of memset().
>>
>> Signed-off-by: Miaohe Lin
>
>If you're going to mak
From: Miaohe Lin
The need for padding 64bit is implicitly checked by nla_align_64bit(), so
remove this explicit one.
Signed-off-by: Miaohe Lin
---
lib/nlattr.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/nlattr.c b/lib/nlattr.c
index bc5b5cf608c4..98f596bfbfd8 100
From: Miaohe Lin
When we don't care about vlan depth, we could pass NULL instead of the
address of a unused local variable to skb_network_protocol() as a param.
Signed-off-by: Miaohe Lin
---
net/core/skbuff.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/core/skbuff
From: Miaohe Lin
In fact, skb_pagelen() - skb_headlen() is equal to __skb_pagelen(), use it
directly to avoid unnecessary skb_headlen() call.
Also fix the CHECK note of checkpatch.pl:
Comparison to NULL could be written "!__pskb_pull_tail"
Signed-off-by: Miaohe Lin
---
net/core/skbuff.c |
From: Miaohe Lin
Use eth_zero_addr() to clear mac address instead of memset().
Signed-off-by: Miaohe Lin
---
net/wireless/nl80211.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 7fbca0854265..c88f9d09cb25 100644
---
From: Miaohe Lin
Use eth_zero_addr() to clear mac address instead of memset().
Signed-off-by: Miaohe Lin
---
drivers/net/ethernet/qlogic/qed/qed_sriov.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_sriov.c
b/drivers/net/etherne
From: Miaohe Lin
Use eth_zero_addr() to clear mac address instead of memset().
Signed-off-by: Miaohe Lin
---
drivers/net/ethernet/qlogic/qede/qede_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c
b/drivers/net/ethernet
From: Miaohe Lin
Use eth_zero_addr() to clear mac address instead of memset().
Signed-off-by: Miaohe Lin
---
net/mac80211/trace.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
index 1b4709694d2a..50ab5b9d8eab 100644
--- a/net/
From: Miaohe Lin
When we don't care about vlan depth, we could pass NULL instead of the
address of a unused local variable to skb_network_protocol() as a param.
Signed-off-by: Miaohe Lin
---
net/core/dev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/core/dev.c b/n
From: Miaohe Lin
The func tick_nohz_full_enabled() is also called by tick_nohz_full_cpu().
So this one is duplicated and should be removed.
Signed-off-by: Miaohe Lin
---
kernel/sched/sched.h | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/kernel/sched/sched.h b/kernel
From: Miaohe Lin
Use wrapper function wake_up_worker() to wake up first idle worker.
Signed-off-by: Miaohe Lin
---
kernel/workqueue.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index c41c3c17b86a..5302f227f38f 100644
-
From: Miaohe Lin
Use eth_zero_addr() to clear mac address insetad of memset().
Signed-off-by: Miaohe Lin
---
net/ncsi/ncsi-rsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ncsi/ncsi-rsp.c b/net/ncsi/ncsi-rsp.c
index a94bb59793f0..5b1f4ec66dd9 100644
--- a/net/ncsi/
From: Miaohe Lin
Use eth_zero_addr() to clear mac address insetad of memset().
Signed-off-by: Miaohe Lin
---
drivers/net/ethernet/chelsio/cxgb4/smt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/smt.c
b/drivers/net/ethernet/chelsio/cxg
From: Miaohe Lin
We can't use IS_UDPLITE to replace udp_sk->pcflag when UDPLITE_RECV_CC is
checked.
Fixes: b2bf1e2659b1 ("[UDP]: Clean up for IS_UDPLITE macro")
Signed-off-by: Miaohe Lin
---
net/ipv4/udp.c | 2 +-
net/ipv6/udp.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --
From: Miaohe Lin
Use eth_zero_addr() to clear mac address insetad of memset().
Signed-off-by: Miaohe Lin
---
drivers/scsi/fcoe/fcoe_ctlr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
index 1791a393795d..ef92c
From: Miaohe Lin
Use eth_zero_addr() to clear mac address insetad of memset().
Signed-off-by: Miaohe Lin
---
drivers/net/ethernet/intel/igb/igb_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c
b/drivers/net/ethernet/intel
1 - 100 of 127 matches
Mail list logo