From: Leon Romanovsky <leon@kernel.org>
To: Jack Wang <jinpu.wang@cloud.ionos.com>
Cc: linux-rdma@vger.kernel.org, bvanassche@acm.org,
dledford@redhat.com, jgg@ziepe.ca, danil.kipnis@cloud.ionos.com,
Gioh Kim <gi-oh.kim@cloud.ionos.com>
Subject: Re: [PATCH for-next 4/4] RDMA/rtrs-srv-sysfs: fix missing put_device
Date: Thu, 11 Feb 2021 10:48:49 +0200 [thread overview]
Message-ID: <20210211084849.GC1275163@unreal> (raw)
In-Reply-To: <20210211065526.7510-5-jinpu.wang@cloud.ionos.com>
On Thu, Feb 11, 2021 at 07:55:26AM +0100, Jack Wang wrote:
> From: Gioh Kim <gi-oh.kim@cloud.ionos.com>
>
> put_device() decreases the ref-count and then the device will
> be cleaned-up, while at is also add missing put_device in
> rtrs_srv_create_once_sysfs_root_folders
>
> This patch solves a kmemleak error as below:
>
> unreferenced object 0xffff88809a7a0710 (size 8):
> comm "kworker/4:1H", pid 113, jiffies 4295833049 (age 6212.380s)
> hex dump (first 8 bytes):
> 62 6c 61 00 6b 6b 6b a5 bla.kkk.
> backtrace:
> [<0000000054413611>] kstrdup+0x2e/0x60
> [<0000000078e3120a>] kobject_set_name_vargs+0x2f/0xb0
> [<00000000f1a17a6b>] dev_set_name+0xab/0xe0
> [<00000000d5502e32>] rtrs_srv_create_sess_files+0x2fb/0x314 [rtrs_server]
> [<00000000ed11a1ef>] rtrs_srv_info_req_done+0x631/0x800 [rtrs_server]
> [<000000008fc5aa8f>] __ib_process_cq+0x94/0x100 [ib_core]
> [<00000000a9599cb4>] ib_cq_poll_work+0x32/0xc0 [ib_core]
> [<00000000cfc376be>] process_one_work+0x4bc/0x980
> [<0000000016e5c96a>] worker_thread+0x78/0x5c0
> [<00000000c20b8be0>] kthread+0x191/0x1e0
> [<000000006c9c0003>] ret_from_fork+0x3a/0x50
>
> Fixes: baa5b28b7a47 ("RDMA/rtrs-srv: Replace device_register with device_initialize and device_add")
> Signed-off-by: Gioh Kim <gi-oh.kim@cloud.ionos.com>
> Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com>
> ---
> drivers/infiniband/ulp/rtrs/rtrs-srv-sysfs.c | 2 ++
> 1 file changed, 2 insertions(+)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
prev parent reply other threads:[~2021-02-11 8:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-11 6:55 [PATCH for-next 0/4] A few bugfix for RTRS Jack Wang
2021-02-11 6:55 ` [PATCH for-next 1/4] RDMA/rtrs-srv: Fix BUG: KASAN: stack-out-of-bounds Jack Wang
2021-02-11 8:33 ` Leon Romanovsky
2021-02-11 6:55 ` [PATCH for-next 2/4] RDMA/rtrs: Only allow addition of path to an already established session Jack Wang
2021-02-11 8:43 ` Leon Romanovsky
2021-02-11 9:23 ` Jinpu Wang
2021-02-11 9:36 ` Leon Romanovsky
2021-02-11 9:48 ` Jinpu Wang
2021-02-11 9:51 ` Leon Romanovsky
2021-02-11 6:55 ` [PATCH for-next 3/4] RDMA/rtrs-srv: fix memory leak by missing kobject free Jack Wang
2021-02-11 6:55 ` [PATCH for-next 4/4] RDMA/rtrs-srv-sysfs: fix missing put_device Jack Wang
2021-02-11 8:48 ` Leon Romanovsky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210211084849.GC1275163@unreal \
--to=leon@kernel.org \
--cc=bvanassche@acm.org \
--cc=danil.kipnis@cloud.ionos.com \
--cc=dledford@redhat.com \
--cc=gi-oh.kim@cloud.ionos.com \
--cc=jgg@ziepe.ca \
--cc=jinpu.wang@cloud.ionos.com \
--cc=linux-rdma@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox