Message ID | 20190911190622.7629-6-dgilbert@redhat.com |
---|---|
State | New |
Headers | show |
Series | Automatic RCU read unlock | expand |
On Wed, Sep 11, 2019 at 08:06:22PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com> > > Error path missing an unlock. > > Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> > --- > migration/ram.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Regards, Daniel
On 11/09/19 21:06, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com> > > Error path missing an unlock. > > Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> > --- > migration/ram.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/migration/ram.c b/migration/ram.c > index 1bb82acfe0..977172ea7e 100644 > --- a/migration/ram.c > +++ b/migration/ram.c > @@ -3445,6 +3445,7 @@ static int ram_save_setup(QEMUFile *f, void *opaque) > RAMBLOCK_FOREACH_MIGRATABLE(block) { > if (!block->idstr[0]) { > error_report("%s: RAMBlock with empty name", __func__); > + rcu_read_unlock(); > return -1; > } > qemu_put_byte(f, strlen(block->idstr)); > (The scoped version would be useful here). Paolo
diff --git a/migration/ram.c b/migration/ram.c index 1bb82acfe0..977172ea7e 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -3445,6 +3445,7 @@ static int ram_save_setup(QEMUFile *f, void *opaque) RAMBLOCK_FOREACH_MIGRATABLE(block) { if (!block->idstr[0]) { error_report("%s: RAMBlock with empty name", __func__); + rcu_read_unlock(); return -1; } qemu_put_byte(f, strlen(block->idstr));