Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319815
b: refs/heads/master
c: cc8744e
h: refs/heads/master
i:
  319813: 5244c00
  319811: 9f7c3c2
  319807: 27655db
v: v3
  • Loading branch information
Amit Shah authored and Rusty Russell committed Jul 30, 2012
1 parent d6ff2f0 commit dfd4ec7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ddcc286900732953ac2e950b6ad0f9a4933767fb
refs/heads/master: cc8744e12936680478ce82b0f21dbaa272df1447
5 changes: 4 additions & 1 deletion trunk/drivers/char/hw_random/virtio-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ static void register_buffer(u8 *buf, size_t size)

static int virtio_read(struct hwrng *rng, void *buf, size_t size, bool wait)
{
int ret;

if (!busy) {
busy = true;
Expand All @@ -65,7 +66,9 @@ static int virtio_read(struct hwrng *rng, void *buf, size_t size, bool wait)
if (!wait)
return 0;

wait_for_completion(&have_data);
ret = wait_for_completion_killable(&have_data);
if (ret < 0)
return ret;

busy = false;

Expand Down

0 comments on commit dfd4ec7

Please sign in to comment.