syzbot
unread,Jul 12, 2022, 9:45:42 PM7/12/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chuck Silvers, ch...@chuq.com, syzkaller-...@googlegroups.com
> #syz test
"Index:" does not look like a valid git repo address.
>
> Index: src/sys/uvm/uvm_swap.c
> ===================================================================
> RCS file: /home/chs/netbsd/cvs/src/sys/uvm/uvm_swap.c,v
> retrieving revision 1.206
> diff -u -p -r1.206 uvm_swap.c
> --- src/sys/uvm/uvm_swap.c 23 Aug 2021 13:08:18 -0000 1.206
> +++ src/sys/uvm/uvm_swap.c 11 Jul 2022 17:05:56 -0000
> @@ -1190,6 +1190,22 @@ again:
> */
>
> /*
> + * swopen: allow the initial open from uvm_swap_init() and reject all others.
> + */
> +
> +static int
> +swopen(dev_t dev, int flag, int mode, struct lwp *l)
> +{
> + static bool inited = false;
> +
> + if (!inited) {
> + inited = true;
> + return 0;
> + }
> + return ENODEV;
> +}
> +
> +/*
> * swstrategy: perform I/O on the drum
> *
> * => we must map the i/o request from the drum to the correct swapdev.
> @@ -1308,8 +1324,8 @@ swwrite(dev_t dev, struct uio *uio, int
> }
>
> const struct bdevsw swap_bdevsw = {
> - .d_open = nullopen,
> - .d_close = nullclose,
> + .d_open = swopen,
> + .d_close = noclose,
> .d_strategy = swstrategy,
> .d_ioctl = noioctl,
> .d_dump = nodump,