1. 25 8月, 2016 1 次提交
  2. 09 8月, 2016 4 次提交
    • V
      9p/trans_virtio: use kvfree() for iov_iter_get_pages_alloc() · 1b8553c0
      Vegard Nossum 提交于
      The memory allocated by iov_iter_get_pages_alloc() can be allocated with
      vmalloc() if kmalloc() failed -- see get_pages_array().
      
      In that case we need to free it with vfree(), so let's use kvfree().
      
      The bug manifests like this:
      
      BUG: unable to handle kernel paging request at ffffeb0400072da0
      IP: [<ffffffff8139c67b>] kfree+0x4b/0x140
      PGD 0
      Oops: 0000 [#1] PREEMPT SMP KASAN
      CPU: 2 PID: 675 Comm: trinity-c2 Not tainted 4.7.0-rc7+ #14
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014
      task: ffff8800badef2c0 ti: ffff880069208000 task.ti: ffff880069208000
      RIP: 0010:[<ffffffff8139c67b>]  [<ffffffff8139c67b>] kfree+0x4b/0x140
      RSP: 0000:ffff88006920f3f0  EFLAGS: 00010282
      RAX: ffffea0000000000 RBX: ffffc90001cb6000 RCX: 0000000000000000
      RDX: 0000000000000001 RSI: 0000000000000246 RDI: ffffc90001cb6000
      RBP: ffff88006920f410 R08: 0000000000000000 R09: dffffc0000000000
      R10: ffff8800badefa30 R11: 0000056a3d3b0d9f R12: ffff88006920f620
      R13: ffffeb0400072d80 R14: ffff8800baa94078 R15: 0000000000000000
      FS:  00007fbd2b437700(0000) GS:ffff88011af00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: ffffeb0400072da0 CR3: 000000006926d000 CR4: 00000000000006e0
      Stack:
       0000000000000001 ffff88006920f620 ffffed001755280f ffff8800baa94078
       ffff88006920f6a8 ffffffff8310442b dffffc0000000000 ffff8800badefa30
       ffff8800badefa28 ffff88011af1fba0 1ffff1000d241e98 ffff8800ba892150
      Call Trace:
       [<ffffffff8310442b>] p9_virtio_zc_request+0x72b/0xdb0
       [<ffffffff830f2116>] p9_client_zc_rpc.constprop.8+0x246/0xb10
       [<ffffffff830f5d79>] p9_client_read+0x4c9/0x750
       [<ffffffff8175ceac>] v9fs_fid_readpage+0x14c/0x320
       [<ffffffff8175d0b6>] v9fs_vfs_readpage+0x36/0x50
       [<ffffffff812c6f13>] filemap_fault+0x9a3/0xe60
       [<ffffffff81331878>] __do_fault+0x158/0x300
       [<ffffffff81339e01>] handle_mm_fault+0x1cf1/0x3c80
       [<ffffffff810c0aaa>] __do_page_fault+0x30a/0x8e0
       [<ffffffff810c10df>] do_page_fault+0x2f/0x80
       [<ffffffff810b5b07>] do_async_page_fault+0x27/0xa0
       [<ffffffff83296c48>] async_page_fault+0x28/0x30
      Code: 00 80 41 54 53 49 01 fd 48 0f 42 05 b0 39 67 02 48 89 fb 49 01 c5 48 b8 00 00 00 00 00 ea ff ff 49 c1 ed 0c 49 c1 e5 06 49 01 c5 <49> 8b 45 20 48 8d 50 ff a8 01 4c 0f 45 ea 49 8b 55 20 48 8d 42
      RIP  [<ffffffff8139c67b>] kfree+0x4b/0x140
       RSP <ffff88006920f3f0>
      CR2: ffffeb0400072da0
      ---[ end trace f3d59a04bafec038 ]---
      
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NVegard Nossum <vegard.nossum@oracle.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      1b8553c0
    • W
      libceph: using kfree_rcu() to simplify the code · 864364a2
      Wei Yongjun 提交于
      The callback function of call_rcu() just calls a kfree(), so we
      can use kfree_rcu() instead of call_rcu() + callback function.
      Signed-off-by: NWei Yongjun <weiyj.lk@gmail.com>
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      864364a2
    • W
      libceph: make cancel_generic_request() static · f52ec33c
      Wei Yongjun 提交于
      Fixes the following sparse warning:
      
      net/ceph/mon_client.c:577:6: warning:
       symbol 'cancel_generic_request' was not declared. Should it be static?
      Signed-off-by: NWei Yongjun <weiyj.lk@gmail.com>
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      f52ec33c
    • W
      libceph: fix return value check in alloc_msg_with_page_vector() · c22e853a
      Wei Yongjun 提交于
      In case of error, the function ceph_alloc_page_vector() returns
      ERR_PTR() and never returns NULL. The NULL test in the return value
      check should be replaced with IS_ERR().
      
      Fixes: 19079203 ('libceph: support for sending notifies')
      Signed-off-by: NWei Yongjun <weiyj.lk@gmail.com>
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      c22e853a
  3. 06 8月, 2016 3 次提交
  4. 05 8月, 2016 2 次提交
    • N
      SUNRPC: disable the use of IPv6 temporary addresses. · d88e4d82
      NeilBrown 提交于
      If the net.ipv6.conf.*.use_temp_addr sysctl is set to '2',
      then TCP connections over IPv6 will prefer a 'private' source
      address.
      These eventually expire and become invalid, typically after a week,
      but the time is configurable.
      
      When the local address becomes invalid the client will not be able to
      receive replies from the server.  Eventually the connection will timeout
      or break and a new connection will be established, but this can take
      half an hour (typically TCP connection break time).
      
      RFC 4941, which describes private IPv6 addresses, acknowledges that some
      applications might not work well with them and that the application may
      explicitly a request non-temporary (i.e. "public") address.
      
      I believe this is correct for SUNRPC clients.  Without this change, a
      client will occasionally experience a long delay if private addresses
      have been enabled.
      
      The privacy offered by private addresses is of little value for an NFS
      server which requires client authentication.
      
      For NFSv3 this will often not be a problem because idle connections are
      closed after 5 minutes.  For NFSv4 connections never go idle due to the
      period RENEW (or equivalent) request.
      Signed-off-by: NNeilBrown <neilb@suse.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      d88e4d82
    • O
      SUNRPC: allow for upcalls for same uid but different gss service · 9130b8db
      Olga Kornievskaia 提交于
      It's possible to have simultaneous upcalls for the same UIDs but
      different GSS service. In that case, we need to allow for the
      upcall to gssd to proceed so that not the same context is used
      by two different GSS services. Some servers lock the use of context
      to the GSS service.
      Signed-off-by: NOlga Kornievskaia <kolga@netapp.com>
      Cc: stable@vger.kernel.org # v3.9+
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      9130b8db
  5. 04 8月, 2016 1 次提交
    • M
      tree-wide: replace config_enabled() with IS_ENABLED() · 97f2645f
      Masahiro Yamada 提交于
      The use of config_enabled() against config options is ambiguous.  In
      practical terms, config_enabled() is equivalent to IS_BUILTIN(), but the
      author might have used it for the meaning of IS_ENABLED().  Using
      IS_ENABLED(), IS_BUILTIN(), IS_MODULE() etc.  makes the intention
      clearer.
      
      This commit replaces config_enabled() with IS_ENABLED() where possible.
      This commit is only touching bool config options.
      
      I noticed two cases where config_enabled() is used against a tristate
      option:
      
       - config_enabled(CONFIG_HWMON)
        [ drivers/net/wireless/ath/ath10k/thermal.c ]
      
       - config_enabled(CONFIG_BACKLIGHT_CLASS_DEVICE)
        [ drivers/gpu/drm/gma500/opregion.c ]
      
      I did not touch them because they should be converted to IS_BUILTIN()
      in order to keep the logic, but I was not sure it was the authors'
      intention.
      
      Link: http://lkml.kernel.org/r/1465215656-20569-1-git-send-email-yamada.masahiro@socionext.comSigned-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: NKees Cook <keescook@chromium.org>
      Cc: Stas Sergeev <stsp@list.ru>
      Cc: Matt Redfearn <matt.redfearn@imgtec.com>
      Cc: Joshua Kinard <kumba@gentoo.org>
      Cc: Jiri Slaby <jslaby@suse.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: "Dmitry V. Levin" <ldv@altlinux.org>
      Cc: yu-cheng yu <yu-cheng.yu@intel.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Will Drewry <wad@chromium.org>
      Cc: Nikolay Martynov <mar.kolya@gmail.com>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
      Cc: Rafal Milecki <zajec5@gmail.com>
      Cc: James Cowgill <James.Cowgill@imgtec.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Alex Smith <alex.smith@imgtec.com>
      Cc: Adam Buchbinder <adam.buchbinder@gmail.com>
      Cc: Qais Yousef <qais.yousef@imgtec.com>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Cc: Mikko Rapeli <mikko.rapeli@iki.fi>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Brian Norris <computersforpeace@gmail.com>
      Cc: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
      Cc: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Roland McGrath <roland@hack.frob.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Tony Wu <tung7970@gmail.com>
      Cc: Huaitong Han <huaitong.han@intel.com>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrea Gelmini <andrea.gelmini@gelma.net>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Rabin Vincent <rabin@rab.in>
      Cc: "Maciej W. Rozycki" <macro@imgtec.com>
      Cc: David Daney <david.daney@cavium.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      97f2645f
  6. 03 8月, 2016 1 次提交
  7. 02 8月, 2016 8 次提交
  8. 31 7月, 2016 6 次提交
  9. 28 7月, 2016 6 次提交
  10. 27 7月, 2016 8 次提交