[PATCH] blk-mq: fix a hung issue when set device state to blocked and restore running

2019-03-20 Thread zhengbin
his situtation, we should delay run hw queue. This patch fixes that. Fixes: 86ff7c2a80cd ("blk-mq: introduce BLK_STS_DEV_RESOURCE") Signed-off-by: zhengbin --- block/blk-mq.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c

[PATCH] squashfs: fix mtime underflow on 64 bit system

2019-01-17 Thread zhengbin
timestamps will be 1901-2038(prev is 1970-2106) on 64 bit system. Signed-off-by: zhengbin --- fs/squashfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/squashfs/inode.c b/fs/squashfs/inode.c index e9793b1e49a5..03a6ef77a2d2 100644 --- a/fs/squashfs/inode.c +++ b/fs

[PATCH] lockdep: remove unnecessary unlikely()

2019-04-29 Thread zhengbin
DEBUG_LOCKS_WARN_ON() already contains an unlikely(), there is no need for another one. Signed-off-by: zhengbin --- kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index e221be7..1522034 100644

[PATCH] time: compat settimeofday: Validate the values of tv from user

2019-07-05 Thread zhengbin
Signed-off-by: zhengbin --- kernel/time/time.c | 4 1 file changed, 4 insertions(+) diff --git a/kernel/time/time.c b/kernel/time/time.c index 7f7d691..5c54ca6 100644 --- a/kernel/time/time.c +++ b/kernel/time/time.c @@ -251,6 +251,10 @@ COMPAT_SYSCALL_DEFINE2(settimeofday, struct old

[PATCH v2] time: compat settimeofday: Validate the values of tv from user

2019-07-06 Thread zhengbin
Similar to commit 6ada1fc0e1c4 ("time: settimeofday: Validate the values of tv from user"), for a wide range of negative tv_usec values the multiplication overflow turns them in positive numbers. So the 'validated later' is not catching the invalid input. Signed-off-by: zhengb

[PATCH] auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach

2019-07-08 Thread zhengbin
In panel_attach, if misc_register fails, we need to delete scan_timer, which was setup in keypad_init->init_scan_timer. Reported-by: Hulk Robot Signed-off-by: zhengbin --- drivers/auxdisplay/panel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/auxdisplay/panel.c b/driv

Re: [PATCH] squashfs: fix mtime underflow on 64 bit system

2019-01-23 Thread zhengbin (A)
Ping? On 2019/1/17 16:21, zhengbin wrote: > If we change the file mtime to 1969, mksquashfs and mount, > the atime/mtime of this file will be underflow. The reason is > treating timestamps with the high bit set as positive > times(before 1970), which should be set as negative times &g

Re: [PATCH] squashfs: fix mtime underflow on 64 bit system

2019-01-21 Thread zhengbin (A)
hi Phillip, when you have time, help to confirm it? Looking forward to your reply. On 2019/1/17 16:21, zhengbin wrote: > If we change the file mtime to 1969, mksquashfs and mount, > the atime/mtime of this file will be underflow. The reason is > treating timestamps with the high b

Re: [PATCH] time: compat settimeofday: Validate the values of tv from user

2019-07-05 Thread zhengbin (A)
On 2019/7/5 20:14, Thomas Gleixner wrote: > Zhengbin, > > On Fri, 5 Jul 2019, zhengbin wrote: > >> Similar to commit 6ada1fc0e1c4 >> ("time: settimeofday: Validate the values of tv from user"), >> an unvalidated user input is multiplied by a constant, which

Re: [PATCH 3/8] aio_poll(): sanitize the logics after vfs_poll(), get rid of leak on error

2019-03-06 Thread zhengbin (A)
+ if (async && !apt.error) --->may be this should be if (!async && !apt.error) ? On 2019/3/7 8:03, Al Viro wrote: > From: Al Viro > > We want iocb_put() happening on errors, to balance the extra reference > we'd taken. As it is, we end up with a leak. The rules should be > * erro

Re: [PATCH 2/8] aio_poll_wake(): don't set ->woken if we ignore the wakeup

2019-03-08 Thread zhengbin (A)
se we do not >> want to put iocb on the list of cancellables. However, ignored >> wakeups need to be treated as if wakeup has not happened at all. >> Trivially fixed by having aio_poll_wake() set ->woken only after >> it's committed to taking iocb out of the waitq

Re: [PATCH RESEND] 9p: Fix memory leak in v9fs_mount

2020-07-08 Thread Zhengbin (OSKernel)
Is this OK? I don't see it on linux-next On 2020/6/15 18:20, Dominique Martinet wrote: Zheng Bin wrote on Mon, Jun 15, 2020: v9fs_mount v9fs_session_init v9fs_cache_session_get_cookie v9fs_random_cachetag -->alloc cachetag v9ses->fscache = fscache_acqui

Re: [PATCH v2] nbd: Fix memory leak in nbd_add_socket

2020-06-21 Thread Zhengbin (OSKernel)
On 2020/6/20 20:05, Markus Elfring wrote: If we add first socket to nbd, config->socks is malloced but num_connections does not update(nsock's allocation fail), the memory is leaked. Cause in later nbd_config_put(), will only free config->socks when num_connections is not 0. Let nsock's alloca

[tip:locking/core] locking/lockdep: Remove unnecessary unlikely()

2019-04-29 Thread tip-bot for zhengbin
Commit-ID: d671002be6bdd7f77a771e23bf3e95d1f16775e6 Gitweb: https://git.kernel.org/tip/d671002be6bdd7f77a771e23bf3e95d1f16775e6 Author: zhengbin AuthorDate: Mon, 29 Apr 2019 20:26:31 +0800 Committer: Ingo Molnar CommitDate: Mon, 29 Apr 2019 16:11:01 +0200 locking/lockdep: Remove

[tip:timers/core] time: Validate user input in compat_settimeofday()

2019-07-07 Thread tip-bot for zhengbin
Commit-ID: 9176ab1b848059a0cd9caf39f0cebaa1b7ec5ec2 Gitweb: https://git.kernel.org/tip/9176ab1b848059a0cd9caf39f0cebaa1b7ec5ec2 Author: zhengbin AuthorDate: Sun, 7 Jul 2019 08:51:41 +0800 Committer: Thomas Gleixner CommitDate: Sun, 7 Jul 2019 12:05:40 +0200 time: Validate user input