Skip to content

lkl-upstream: use uname to detect host OS#437

Merged
thehajime merged 1 commit intolkl:masterfrom
libos-nuse:fix-osname-uname
Jun 11, 2018
Merged

lkl-upstream: use uname to detect host OS#437
thehajime merged 1 commit intolkl:masterfrom
libos-nuse:fix-osname-uname

Conversation

@thehajime
Copy link
Member

@thehajime thehajime commented Jun 11, 2018

Fixes: 636a654 ("lkl: fix FreeBSD compilation errors")

Signed-off-by: Hajime Tazaki thehajime@gmail.com


This change is Reviewable

Fixes: 636a654 ("lkl: fix FreeBSD compilation errors")

Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
@thehajime thehajime merged commit 3feb0a7 into lkl:master Jun 11, 2018
@thehajime thehajime deleted the fix-osname-uname branch June 11, 2018 22:47
@Rondom
Copy link

Rondom commented Jun 13, 2018

What is the rationale for using uname? This will break cross-compilation, won't it?

Nevermind. I see this is about detecting the number of CPUs. Sorry for the noise, I was not really paying attention. Indeed uname is the way to go in this case.

Rondom pushed a commit to Rondom/linux-lkl that referenced this pull request Nov 17, 2019
Calling ceph_buffer_put() in __ceph_setxattr() may end up freeing the
i_xattrs.prealloc_blob buffer while holding the i_ceph_lock.  This can be
fixed by postponing the call until later, when the lock is released.

The following backtrace was triggered by fstests generic/117.

  BUG: sleeping function called from invalid context at mm/vmalloc.c:2283
  in_atomic(): 1, irqs_disabled(): 0, pid: 650, name: fsstress
  3 locks held by fsstress/650:
   #0: 00000000870a0fe8 (sb_writers#8){.+.+}, at: mnt_want_write+0x20/0x50
   #1: 00000000ba0c4c74 (&type->i_mutex_dir_key#6){++++}, at: vfs_setxattr+0x55/0xa0
   lkl#2: 000000008dfbb3f2 (&(&ci->i_ceph_lock)->rlock){+.+.}, at: __ceph_setxattr+0x297/0x810
  CPU: 1 PID: 650 Comm: fsstress Not tainted 5.2.0+ lkl#437
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58-prebuilt.qemu.org 04/01/2014
  Call Trace:
   dump_stack+0x67/0x90
   ___might_sleep.cold+0x9f/0xb1
   vfree+0x4b/0x60
   ceph_buffer_release+0x1b/0x60
   __ceph_setxattr+0x2b4/0x810
   __vfs_setxattr+0x66/0x80
   __vfs_setxattr_noperm+0x59/0xf0
   vfs_setxattr+0x81/0xa0
   setxattr+0x115/0x230
   ? filename_lookup+0xc9/0x140
   ? rcu_read_lock_sched_held+0x74/0x80
   ? rcu_sync_lockdep_assert+0x2e/0x60
   ? __sb_start_write+0x142/0x1a0
   ? mnt_want_write+0x20/0x50
   path_setxattr+0xba/0xd0
   __x64_sys_lsetxattr+0x24/0x30
   do_syscall_64+0x50/0x1c0
   entry_SYSCALL_64_after_hwframe+0x49/0xbe
  RIP: 0033:0x7ff23514359a

Signed-off-by: Luis Henriques <lhenriques@suse.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants