search for: ida_destory

Displaying 5 results from an estimated 5 matches for "ida_destory".

2015 Sep 17
7
[PATCH 0/2] Fix memory leaks in virtio & remoteproc cores
Hi, The following patches fix couple of memory leaks in the virtio and remoteproc cores when using these as modules, and going through a cycle of insmod and rmmod with at least a device registered with the corresponding cores in between. I ran into this on our downstream product kernels on both 3.14 and 4.1 based kernels, and should apply to the latest kernel as well. Patches can be picked up
2015 Sep 17
7
[PATCH 0/2] Fix memory leaks in virtio & remoteproc cores
Hi, The following patches fix couple of memory leaks in the virtio and remoteproc cores when using these as modules, and going through a cycle of insmod and rmmod with at least a device registered with the corresponding cores in between. I ran into this on our downstream product kernels on both 3.14 and 4.1 based kernels, and should apply to the latest kernel as well. Patches can be picked up
2015 Sep 17
0
DEFINE_IDA causing memory leaks? (was Re: [PATCH 1/2] virtio: fix memory leak of virtio ida cache layers)
...s pre-initialise a usually static ida structure. The initialised > structure will have a NULL bitmap cache that's allocated in the first > ida_pre_get() ... that all seems to work as expected and no different > from a dynamically allocated struct ida. Or are you thinking because > ida_destory() doesn't set bitmap to NULL, it damages the reuse? In > which case I'm not sure there's much benefit to making it reusable, but > I suppose we could by adding a memset into ida_destroy(). I don't know. Data structures which do lazy anything would likely need explicit destr...
2015 Sep 17
0
DEFINE_IDA causing memory leaks? (was Re: [PATCH 1/2] virtio: fix memory leak of virtio ida cache layers)
Hello, James. On Thu, Sep 17, 2015 at 10:58:29AM -0700, James Bottomley wrote: > The argument is that we shouldn't have to explicitly destroy a > statically initialized object, so > > DEFINE_IDA(someida); > > Should just work without having to explicitly do > > ida_destory(someida); > > somewhere in the exit code. It's about usage patterns. Michael's > argument is that if we can't follow the no destructor pattern for > DEFINE_IDA() then we shouldn't have it at all, because it's confusing > kernel design patterns. The pattern we...
2015 Sep 17
0
DEFINE_IDA causing memory leaks? (was Re: [PATCH 1/2] virtio: fix memory leak of virtio ida cache layers)
...s pre-initialise a usually static ida structure. The initialised > structure will have a NULL bitmap cache that's allocated in the first > ida_pre_get() ... that all seems to work as expected and no different > from a dynamically allocated struct ida. Or are you thinking because > ida_destory() doesn't set bitmap to NULL, it damages the reuse? In > which case I'm not sure there's much benefit to making it reusable, but > I suppose we could by adding a memset into ida_destroy(). > > James It's just unusual to have a descructor without a constructor. I bet...