[LU-6516] double spin unlock in ofd_inconsistency_verification_main Created: 27/Apr/15 Updated: 29/Dec/15 Resolved: 18/Aug/15 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.8.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Oleg Drokin | Assignee: | Jian Yu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | patch | ||
| Issue Links: |
|
||||
| Severity: | 3 | ||||
| Rank (Obsolete): | 9223372036854775807 | ||||
| Description |
|
found by smatch, in ofd_inconsistency_verification_main: spin_unlock(&ofd->ofd_inconsistency_lock);
if (rc != 0)
RETURN(rc);
OBD_ALLOC_PTR(lr);
if (unlikely(lr == NULL))
GOTO(out, rc = -ENOMEM);
...
thread_set_flags(thread, SVC_STOPPED);
wake_up_all(&thread->t_ctl_waitq);
spin_unlock(&ofd->ofd_inconsistency_lock);
|
| Comments |
| Comment by Ulka Vaze (Inactive) [ 18/May/15 ] |
|
Hi, Yes this seems to be issue. Earlier we are taking lock and waking up threads. spin_lock(&ofd->ofd_inconsistency_lock);
thread_set_flags(thread, rc != 0 ? SVC_STOPPED : SVC_RUNNING);
wake_up_all(&thread->t_ctl_waitq);
spin_unlock(&ofd->ofd_inconsistency_lock);
However in out we did not lock again. thread_set_flags(thread, SVC_STOPPED);
wake_up_all(&thread->t_ctl_waitq);
spin_unlock(&ofd->ofd_inconsistency_lock);
lu_env_fini(&env);
return rc;
This is because in normal case we have spinlock already taken. out1: return rc; Please advice. |
| Comment by Gerrit Updater [ 20/May/15 ] |
|
Ulka Vaze (ulka.vaze@yahoo.in) uploaded a new patch: http://review.whamcloud.com/14875 |
| Comment by Gerrit Updater [ 18/Aug/15 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/14875/ |
| Comment by Peter Jones [ 18/Aug/15 ] |
|
Landed for 2.8 |