Re: [PATCH v2] block: fix memory leak for elevator on add_disk failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2022/10/22 10:16, Yu Kuai wrote:
From: Yu Kuai<yukuai3@xxxxxxxxxx>

The default elevator is allocated in the beginning of device_add_disk(),
however, it's not freed in the following error path.

Fixes: 50e34d78815e ("block: disable the elevator int del_gendisk")
Signed-off-by: Yu Kuai<yukuai3@xxxxxxxxxx>
Reviewed-by: Christoph Hellwig<hch@xxxxxx>
---
Changes in v2:
  - fix wrong fix tag
  - add review tag

  block/genhd.c | 12 ++++++++----
  1 file changed, 8 insertions(+), 4 deletions(-)

Reviewed-by: Jason Yan <yanaijie@xxxxxxxxxx>




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux