lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YDY+ObNNiBMMuSEt@stefanha-x1.localdomain>
Date:   Wed, 24 Feb 2021 11:53:29 +0000
From:   Stefan Hajnoczi <stefanha@...hat.com>
To:     Chaitanya Kulkarni <chaitanya.kulkarni@....com>
Cc:     linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
        virtualization@...ts.linux-foundation.org,
        linux-ide@...r.kernel.org, linux-mmc@...r.kernel.org,
        target-devel@...r.kernel.org, linux-nfs@...r.kernel.org,
        linux-block@...r.kernel.org, dm-devel@...hat.com, axboe@...nel.dk,
        fujita.tomonori@....ntt.co.jp, tim@...erelk.net, mst@...hat.com,
        jasowang@...hat.com, pbonzini@...hat.com, davem@...emloft.net,
        bp@...en8.de, agk@...hat.com, snitzer@...hat.com,
        ulf.hansson@...aro.org, jejb@...ux.ibm.com,
        martin.petersen@...cle.com, dgilbert@...erlog.com,
        Kai.Makisara@...umbus.fi, alim.akhtar@...sung.com,
        avri.altman@....com, bfields@...ldses.org, chuck.lever@...cle.com,
        baolin.wang@...aro.org, vbadigan@...eaurora.org, zliua@...ron.com,
        richard.peng@...o.com, guoqing.jiang@...ud.ionos.com,
        stanley.chu@...iatek.com, cang@...eaurora.org,
        asutoshd@...eaurora.org, beanhuo@...ron.com, jaegeuk@...nel.org
Subject: Re: [RFC PATCH] blk-core: remove blk_put_request()

On Mon, Feb 22, 2021 at 01:11:15PM -0800, Chaitanya Kulkarni wrote:
> The function blk_put_request() is just a wrapper to
> blk_mq_free_request(), remove the unnecessary wrapper.
> 
> Any feedback is welcome on this RFC.
> 
> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@....com>
> ---
>  block/blk-core.c                   |  6 ------
>  block/blk-merge.c                  |  2 +-
>  block/bsg-lib.c                    |  4 ++--
>  block/bsg.c                        |  4 ++--
>  block/scsi_ioctl.c                 |  6 +++---
>  drivers/block/paride/pd.c          |  2 +-
>  drivers/block/pktcdvd.c            |  2 +-
>  drivers/block/virtio_blk.c         |  2 +-
>  drivers/cdrom/cdrom.c              |  4 ++--
>  drivers/ide/ide-atapi.c            |  2 +-
>  drivers/ide/ide-cd.c               |  4 ++--
>  drivers/ide/ide-cd_ioctl.c         |  2 +-
>  drivers/ide/ide-devsets.c          |  2 +-
>  drivers/ide/ide-disk.c             |  2 +-
>  drivers/ide/ide-ioctls.c           |  4 ++--
>  drivers/ide/ide-park.c             |  2 +-
>  drivers/ide/ide-pm.c               |  4 ++--
>  drivers/ide/ide-tape.c             |  2 +-
>  drivers/ide/ide-taskfile.c         |  2 +-
>  drivers/md/dm-mpath.c              |  2 +-
>  drivers/mmc/core/block.c           | 10 +++++-----
>  drivers/scsi/scsi_error.c          |  2 +-
>  drivers/scsi/scsi_lib.c            |  2 +-
>  drivers/scsi/sg.c                  |  6 +++---
>  drivers/scsi/st.c                  |  4 ++--
>  drivers/scsi/ufs/ufshcd.c          |  6 +++---
>  drivers/target/target_core_pscsi.c |  4 ++--
>  fs/nfsd/blocklayout.c              |  4 ++--
>  include/linux/blkdev.h             |  1 -
>  29 files changed, 46 insertions(+), 53 deletions(-)
> 
> diff --git a/block/blk-core.c b/block/blk-core.c
> index fc60ff208497..1754f5e7cc80 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -642,12 +642,6 @@ struct request *blk_get_request(struct request_queue *q, unsigned int op,
>  }
>  EXPORT_SYMBOL(blk_get_request);
>  
> -void blk_put_request(struct request *req)
> -{
> -	blk_mq_free_request(req);
> -}
> -EXPORT_SYMBOL(blk_put_request);

blk_get_request() still exists after this patch. A "get" API usually has
a corresponding "put" API. I'm not sure this patch helps the consistency
and clarity of the code.

If you do go ahead, please update the blk_get_request() doc comment
explicitly mentioning that blk_mq_free_request() needs to be called.

Stefan

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ