1. 03 6月, 2020 6 次提交
  2. 01 6月, 2020 4 次提交
  3. 31 5月, 2020 21 次提交
  4. 29 5月, 2020 2 次提交
  5. 28 5月, 2020 1 次提交
    • A
      fanotify: turn off support for FAN_DIR_MODIFY · f1793699
      Amir Goldstein 提交于
      FAN_DIR_MODIFY has been enabled by commit 44d705b0 ("fanotify:
      report name info for FAN_DIR_MODIFY event") in 5.7-rc1. Now we are
      planning further extensions to the fanotify API and during that we
      realized that FAN_DIR_MODIFY may behave slightly differently to be more
      consistent with extensions we plan. So until we finalize these
      extensions, let's not bind our hands with exposing FAN_DIR_MODIFY to
      userland.
      Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      f1793699
  6. 27 5月, 2020 1 次提交
  7. 23 5月, 2020 1 次提交
    • D
      rxrpc: Fix a warning · 8a1d24e1
      David Howells 提交于
      Fix a warning due to an uninitialised variable.
      
      le included from ../fs/afs/fs_probe.c:11:
      ../fs/afs/fs_probe.c: In function 'afs_fileserver_probe_result':
      ../fs/afs/internal.h:1453:2: warning: 'rtt_us' may be used uninitialized in this function [-Wmaybe-uninitialized]
       1453 |  printk("[%-6.6s] "FMT"\n", current->comm ,##__VA_ARGS__)
            |  ^~~~~~
      ../fs/afs/fs_probe.c:35:15: note: 'rtt_us' was declared here
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      8a1d24e1
  8. 22 5月, 2020 1 次提交
  9. 21 5月, 2020 1 次提交
    • T
      pipe: Fix pipe_full() test in opipe_prep(). · 566d1362
      Tetsuo Handa 提交于
      syzbot is reporting that splice()ing from non-empty read side to
      already-full write side causes unkillable task, for opipe_prep() is by
      error not inverting pipe_full() test.
      
        CPU: 0 PID: 9460 Comm: syz-executor.5 Not tainted 5.6.0-rc3-next-20200228-syzkaller #0
        Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
        RIP: 0010:rol32 include/linux/bitops.h:105 [inline]
        RIP: 0010:iterate_chain_key kernel/locking/lockdep.c:369 [inline]
        RIP: 0010:__lock_acquire+0x6a3/0x5270 kernel/locking/lockdep.c:4178
        Call Trace:
           lock_acquire+0x197/0x420 kernel/locking/lockdep.c:4720
           __mutex_lock_common kernel/locking/mutex.c:956 [inline]
           __mutex_lock+0x156/0x13c0 kernel/locking/mutex.c:1103
           pipe_lock_nested fs/pipe.c:66 [inline]
           pipe_double_lock+0x1a0/0x1e0 fs/pipe.c:104
           splice_pipe_to_pipe fs/splice.c:1562 [inline]
           do_splice+0x35f/0x1520 fs/splice.c:1141
           __do_sys_splice fs/splice.c:1447 [inline]
           __se_sys_splice fs/splice.c:1427 [inline]
           __x64_sys_splice+0x2b5/0x320 fs/splice.c:1427
           do_syscall_64+0xf6/0x790 arch/x86/entry/common.c:295
           entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Reported-by: syzbot+b48daca8639150bc5e73@syzkaller.appspotmail.com
      Link: https://syzkaller.appspot.com/bug?id=9386d051e11e09973d5a4cf79af5e8cedf79386d
      Fixes: 8cefc107 ("pipe: Use head and tail pointers for the ring, not cursor and length")
      Cc: stable@vger.kernel.org # 5.5+
      Signed-off-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      566d1362
  10. 20 5月, 2020 2 次提交
    • X
      io_uring: reset -EBUSY error when io sq thread is waken up · d4ae271d
      Xiaoguang Wang 提交于
      In io_sq_thread(), currently if we get an -EBUSY error and go to sleep,
      we will won't clear it again, which will result in io_sq_thread() will
      never have a chance to submit sqes again. Below test program test.c
      can reveal this bug:
      
      int main(int argc, char *argv[])
      {
              struct io_uring ring;
              int i, fd, ret;
              struct io_uring_sqe *sqe;
              struct io_uring_cqe *cqe;
              struct iovec *iovecs;
              void *buf;
              struct io_uring_params p;
      
              if (argc < 2) {
                      printf("%s: file\n", argv[0]);
                      return 1;
              }
      
              memset(&p, 0, sizeof(p));
              p.flags = IORING_SETUP_SQPOLL;
              ret = io_uring_queue_init_params(4, &ring, &p);
              if (ret < 0) {
                      fprintf(stderr, "queue_init: %s\n", strerror(-ret));
                      return 1;
              }
      
              fd = open(argv[1], O_RDONLY | O_DIRECT);
              if (fd < 0) {
                      perror("open");
                      return 1;
              }
      
              iovecs = calloc(10, sizeof(struct iovec));
              for (i = 0; i < 10; i++) {
                      if (posix_memalign(&buf, 4096, 4096))
                              return 1;
                      iovecs[i].iov_base = buf;
                      iovecs[i].iov_len = 4096;
              }
      
              ret = io_uring_register_files(&ring, &fd, 1);
              if (ret < 0) {
                      fprintf(stderr, "%s: register %d\n", __FUNCTION__, ret);
                      return ret;
              }
      
              for (i = 0; i < 10; i++) {
                      sqe = io_uring_get_sqe(&ring);
                      if (!sqe)
                              break;
      
                      io_uring_prep_readv(sqe, 0, &iovecs[i], 1, 0);
                      sqe->flags |= IOSQE_FIXED_FILE;
      
                      ret = io_uring_submit(&ring);
                      sleep(1);
                      printf("submit %d\n", i);
              }
      
              for (i = 0; i < 10; i++) {
                      io_uring_wait_cqe(&ring, &cqe);
                      printf("receive: %d\n", i);
                      if (cqe->res != 4096) {
                              fprintf(stderr, "ret=%d, wanted 4096\n", cqe->res);
                              ret = 1;
                      }
                      io_uring_cqe_seen(&ring, cqe);
              }
      
              close(fd);
              io_uring_queue_exit(&ring);
              return 0;
      }
      sudo ./test testfile
      above command will hang on the tenth request, to fix this bug, when io
      sq_thread is waken up, we reset the variable 'ret' to be zero.
      Suggested-by: NJens Axboe <axboe@kernel.dk>
      Signed-off-by: NXiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      d4ae271d
    • J
      io_uring: don't add non-IO requests to iopoll pending list · b532576e
      Jens Axboe 提交于
      We normally disable any commands that aren't specifically poll commands
      for a ring that is setup for polling, but we do allow buffer provide and
      remove commands to support buffer selection for polled IO. Once a
      request is issued, we add it to the poll list to poll for completion. But
      we should not do that for non-IO commands, as those request complete
      inline immediately and aren't pollable. If we do, we can leave requests
      on the iopoll list after they are freed.
      
      Fixes: ddf0322d ("io_uring: add IORING_OP_PROVIDE_BUFFERS")
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      b532576e