Re: [PATCH] sunrpc: need delete xprt->timer in xs_destroy

2020-06-04 Thread Zhengbin (OSKernel)
The complete process is like this: xprt_destroy   wait_on_bit_lock(&xprt->state, XPRT_LOCKED, TASK_UNINTERRUPTIBLE)  -->getlock   del_timer_sync(&xprt->timer)   -->del xprt->timer   INIT_WORK(&xprt->task_cleanup, xprt_destroy_cb) xprt_destroy_cb   xs_destroy(xprt->ops->destroy)     cancel_dela

[PATCH] net: dsa: sja1105: Make function sja1105_xfer_long_buf static

2019-10-04 Thread zhengbin
Fix sparse warnings: drivers/net/dsa/sja1105/sja1105_spi.c:159:5: warning: symbol 'sja1105_xfer_long_buf' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: zhengbin --- drivers/net/dsa/sja1105/sja1105_spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH] sctp: fix memleak in sctp_send_reset_streams

2019-08-13 Thread zhengbin
If the stream outq is not empty, need to kfree nstr_list. Fixes: d570a59c5b5f ("sctp: only allow the out stream reset when the stream outq is empty") Reported-by: Hulk Robot Signed-off-by: zhengbin --- net/sctp/stream.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/sctp/

[PATCH] 9p/net: fix memory leak in p9_client_create

2019-03-13 Thread zhengbin
If msize is less than 4096, we should close and put trans, destroy tagpool, not just free client. This patch fixes that. Fixes: 574d356b7a02 ("9p/net: put a lower bound on msize") Reported-by: Hulk Robot Signed-off-by: zhengbin --- net/9p/client.c | 2 +- 1 file changed, 1 inser

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 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

[PATCH] SUNRPC: fix comment style

2018-12-14 Thread zhengbin
If there is only one line comment, we should use /* ... */ Signed-off-by: zhengbin --- net/sunrpc/xprt.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index ce92700..68a80eb 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc