]> git.baikalelectronics.ru Git - uboot.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)
commitf1fe582578f0b667206c68077cf594f91c5d66a9
tree626847783fd0dd5a20aae0894055a45264ad21fd
parent55d3370b8578316c3fa91e8c8ae843561533db79
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