Skip to content

Commit 6c83d0d

Browse files
committed
Merge branch 'for-linus-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
Pull UML updates from Richard Weinberger: "Bugfix for the UML block device driver" * 'for-linus-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: Fix for a possible OOPS in ubd initialization um: Remove duplicated include from vector_user.c
2 parents 636deed + aea05eb commit 6c83d0d

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

arch/um/drivers/ubd_kern.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ static int ubd_add(int n, char **error_out)
938938
ubd_dev->queue = blk_mq_init_queue(&ubd_dev->tag_set);
939939
if (IS_ERR(ubd_dev->queue)) {
940940
err = PTR_ERR(ubd_dev->queue);
941-
goto out_cleanup;
941+
goto out_cleanup_tags;
942942
}
943943

944944
ubd_dev->queue->queuedata = ubd_dev;
@@ -968,8 +968,8 @@ static int ubd_add(int n, char **error_out)
968968

969969
out_cleanup_tags:
970970
blk_mq_free_tag_set(&ubd_dev->tag_set);
971-
out_cleanup:
972-
blk_cleanup_queue(ubd_dev->queue);
971+
if (!(IS_ERR(ubd_dev->queue)))
972+
blk_cleanup_queue(ubd_dev->queue);
973973
goto out;
974974
}
975975

arch/um/drivers/vector_user.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,19 @@
1616
#include <sys/types.h>
1717
#include <sys/stat.h>
1818
#include <fcntl.h>
19-
#include <sys/types.h>
2019
#include <sys/socket.h>
2120
#include <net/ethernet.h>
2221
#include <netinet/ip.h>
2322
#include <netinet/ether.h>
2423
#include <linux/if_ether.h>
2524
#include <linux/if_packet.h>
26-
#include <sys/socket.h>
2725
#include <sys/wait.h>
2826
#include <sys/uio.h>
2927
#include <linux/virtio_net.h>
3028
#include <netdb.h>
3129
#include <stdlib.h>
3230
#include <os.h>
3331
#include <um_malloc.h>
34-
#include <sys/uio.h>
3532
#include "vector_user.h"
3633

3734
#define ID_GRE 0

0 commit comments

Comments
 (0)