]> git.dujemihanovic.xyz Git - u-boot.git/commit
sandbox: host bind must close file descriptor
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Tue, 2 Feb 2021 23:21:56 +0000 (00:21 +0100)
committerSimon Glass <sjg@chromium.org>
Thu, 4 Mar 2021 02:17:25 +0000 (19:17 -0700)
commit297b8b3ebfc2bdeb0b245b1dbe31ae8302d9b1b8
tree626847783fd0dd5a20aae0894055a45264ad21fd
parent67637d4b5ab70896c8a881022126f7c61f90a0f1
sandbox: host bind must close file descriptor

Each invocation of the 'host bind' command with a file name argument opens
a file descriptor. The next invocation of the 'host bind' command destroys
the block device but the file descriptor remains open. The same holds true
for the 'unbind blk' command.

Close the file descriptor when unbinding the host block device.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/block/sandbox.c