* [PATCH net-next] ceph: Delete useless kfree code
@ 2020-12-16 13:02 Zheng Yongjun
2020-12-17 1:20 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: Zheng Yongjun @ 2020-12-16 13:02 UTC (permalink / raw)
To: jlayton, davem, kuba, ceph-devel, netdev; +Cc: Zheng Yongjun
The parameter of kfree function is NULL, so kfree code is useless, delete it.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
net/ceph/osdmap.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c
index fa08c15be0c0..6e6387c6b7bf 100644
--- a/net/ceph/osdmap.c
+++ b/net/ceph/osdmap.c
@@ -285,7 +285,6 @@ static u32 *decode_array_32_alloc(void **p, void *end, u32 *plen)
e_inval:
ret = -EINVAL;
fail:
- kfree(a);
return ERR_PTR(ret);
}
--
2.22.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] ceph: Delete useless kfree code
2020-12-16 13:02 [PATCH net-next] ceph: Delete useless kfree code Zheng Yongjun
@ 2020-12-17 1:20 ` Jakub Kicinski
2020-12-18 13:58 ` Ilya Dryomov
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2020-12-17 1:20 UTC (permalink / raw)
To: Zheng Yongjun; +Cc: jlayton, davem, ceph-devel, netdev
On Wed, 16 Dec 2020 21:02:39 +0800 Zheng Yongjun wrote:
> The parameter of kfree function is NULL, so kfree code is useless, delete it.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
To be clear the subject tags is misleading we're not taking this
into the networking tree, ceph folk please go ahead :)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] ceph: Delete useless kfree code
2020-12-17 1:20 ` Jakub Kicinski
@ 2020-12-18 13:58 ` Ilya Dryomov
0 siblings, 0 replies; 3+ messages in thread
From: Ilya Dryomov @ 2020-12-18 13:58 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Zheng Yongjun, Jeff Layton, David S. Miller, Ceph Development, netdev
On Thu, Dec 17, 2020 at 2:25 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Wed, 16 Dec 2020 21:02:39 +0800 Zheng Yongjun wrote:
> > The parameter of kfree function is NULL, so kfree code is useless, delete it.
> >
> > Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
>
> To be clear the subject tags is misleading we're not taking this
> into the networking tree, ceph folk please go ahead :)
I still didn't get the original patch for some reason, but looking at
https://lists.openwall.net/netdev/2020/12/16/163
the kfree is not useless. If ceph_decode_need() fails, the array needs
to be freed, so we are not taking this into the ceph tree either ;)
Thanks,
Ilya
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-18 13:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 13:02 [PATCH net-next] ceph: Delete useless kfree code Zheng Yongjun
2020-12-17 1:20 ` Jakub Kicinski
2020-12-18 13:58 ` Ilya Dryomov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).