Skip to content

Commit

Permalink
[S390] cio: memory leak in cio processing
Browse files Browse the repository at this point in the history
Allocated kernel memory for locks is not freed in case of subchannel found
to be invalid.

Signed-off-by: Michael Ernst <mernst@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Michael Ernst authored and Martin Schwidefsky committed Jan 26, 2008
1 parent 1a908c7 commit 808e488
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/s390/cio/cio.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,11 @@ cio_validate_subchannel (struct subchannel *sch, struct subchannel_id schid)
}

/* Initialization for io subchannels. */
if (!css_sch_is_valid(&sch->schib))
return -ENODEV;
if (!css_sch_is_valid(&sch->schib)) {
err = -ENODEV;
goto out;
}

/* Devno is valid. */
if (is_blacklisted (sch->schid.ssid, sch->schib.pmcw.dev)) {
/*
Expand Down

0 comments on commit 808e488

Please sign in to comment.