From a84e424b73e7db196866ed595b8e1926762f5c4e Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 26 Apr 2013 13:04:20 +1000 Subject: [PATCH] Locking error in bflsc_send_work --- driver-bflsc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driver-bflsc.c b/driver-bflsc.c index 110ca78c..28f8658c 100644 --- a/driver-bflsc.c +++ b/driver-bflsc.c @@ -1350,8 +1350,9 @@ static bool bflsc_send_work(struct cgpu_info *bflsc, int dev, struct work *work) data.endOfBlock = BFLSC_EOB; try = 0; -re_send: + mutex_lock(&(bflsc->device_mutex)); +re_send: err = write_to_dev(bflsc, dev, BFLSC_QJOB, BFLSC_QJOB_LEN, &amount, C_REQUESTQUEJOB); if (err < 0 || amount != BFLSC_QJOB_LEN) { mutex_unlock(&(bflsc->device_mutex));