<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/nfs/idmap.c, branch linux-3.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-09-14T16:59:25Z</updated>
<entry>
<title>NFS: return -ENOKEY when the upcall fails to map the name</title>
<updated>2012-09-14T16:59:25Z</updated>
<author>
<name>Bryan Schumaker</name>
</author>
<published>2012-08-09T18:05:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bdd78615ccef0cb43ab4214c9f315efdefedcd6e'/>
<id>urn:sha1:bdd78615ccef0cb43ab4214c9f315efdefedcd6e</id>
<content type='text'>
commit 12dfd080556124088ed61a292184947711b46cbe upstream.

This allows the normal error-paths to handle the error, rather than
making a special call to complete_request_key() just for this instance.

Signed-off-by: Bryan Schumaker &lt;bjschuma@netapp.com&gt;
Tested-by: William Dauchy &lt;wdauchy@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>NFS: Clear key construction data if the idmap upcall fails</title>
<updated>2012-09-14T16:59:25Z</updated>
<author>
<name>Bryan Schumaker</name>
</author>
<published>2012-08-09T18:05:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=28a59a3a607da7fccc376d378ed7d9937af6ae08'/>
<id>urn:sha1:28a59a3a607da7fccc376d378ed7d9937af6ae08</id>
<content type='text'>
commit c5066945b7ea346a11424dbeb7830b7d7d00c206 upstream.

idmap_pipe_downcall already clears this field if the upcall succeeds,
but if it fails (rpc.idmapd isn't running) the field will still be set
on the next call triggering a BUG_ON().  This patch tries to handle all
possible ways that the upcall could fail and clear the idmap key data
for each one.

Signed-off-by: Bryan Schumaker &lt;bjschuma@netapp.com&gt;
Tested-by: William Dauchy &lt;wdauchy@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>NFS: Fix a number of bugs in the idmapper</title>
<updated>2012-08-09T15:23:12Z</updated>
<author>
<name>David Howells</name>
</author>
<published>2012-07-25T15:53:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=df4c3fd716e3565c6ab83ec4b6617cc180f062a1'/>
<id>urn:sha1:df4c3fd716e3565c6ab83ec4b6617cc180f062a1</id>
<content type='text'>
commit a427b9ec4eda8cd6e641ea24541d30b641fc3140 upstream.

Fix a number of bugs in the NFS idmapper code:

 (1) Only registered key types can be passed to the core keys code, so
     register the legacy idmapper key type.

     This is a requirement because the unregister function cleans up keys
     belonging to that key type so that there aren't dangling pointers to the
     module left behind - including the key-&gt;type pointer.

 (2) Rename the legacy key type.  You can't have two key types with the same
     name, and (1) would otherwise require that.

 (3) complete_request_key() must be called in the error path of
     nfs_idmap_legacy_upcall().

 (4) There is one idmap struct for each nfs_client struct.  This means that
     idmap-&gt;idmap_key_cons is shared without the use of a lock.  This is a
     problem because key_instantiate_and_link() - as called indirectly by
     idmap_pipe_downcall() - releases anyone waiting for the key to be
     instantiated.

     What happens is that idmap_pipe_downcall() running in the rpc.idmapd
     thread, releases the NFS filesystem in whatever thread that is running in
     to continue.  This may then make another idmapper call, overwriting
     idmap_key_cons before idmap_pipe_downcall() gets the chance to call
     complete_request_key().

     I *think* that reading idmap_key_cons only once, before
     key_instantiate_and_link() is called, and then caching the result in a
     variable is sufficient.

Bug (4) is the cause of:

BUG: unable to handle kernel NULL pointer dereference at           (null)
IP: [&lt;          (null)&gt;]           (null)
PGD 0
Oops: 0010 [#1] SMP
CPU 1
Modules linked in: ppdev parport_pc lp parport ip6table_filter ip6_tables ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack nfs fscache xt_CHECKSUM auth_rpcgss iptable_mangle nfs_acl bridge stp llc lockd be2iscsi iscsi_boot_sysfs bnx2i cnic uio cxgb4i cxgb4 cxgb3i libcxgbi cxgb3 mdio ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi snd_hda_codec_realtek snd_usb_audio snd_hda_intel snd_hda_codec snd_seq snd_pcm snd_hwdep snd_usbmidi_lib snd_rawmidi snd_timer uvcvideo videobuf2_core videodev media videobuf2_vmalloc snd_seq_device videobuf2_memops e1000e vhost_net iTCO_wdt joydev coretemp snd soundcore macvtap macvlan i2c_i801 snd_page_alloc tun iTCO_vendor_support microcode kvm_intel kvm sunrpc hid_logitech_dj usb_storage i915 drm_kms_helper drm i2c_algo_bit i2c_core video [last unloaded: scsi_wait_scan]
Pid: 1229, comm: rpc.idmapd Not tainted 3.4.2-1.fc16.x86_64 #1 Gateway DX4710-UB801A/G33M05G1
RIP: 0010:[&lt;0000000000000000&gt;]  [&lt;          (null)&gt;]           (null)
RSP: 0018:ffff8801a3645d40  EFLAGS: 00010246
RAX: ffff880077707e30 RBX: ffff880077707f50 RCX: ffff8801a18ccd80
RDX: 0000000000000006 RSI: ffff8801a3645e75 RDI: ffff880077707f50
RBP: ffff8801a3645d88 R08: ffff8801a430f9c0 R09: ffff8801a3645db0
R10: 000000000000000a R11: 0000000000000246 R12: ffff8801a18ccd80
R13: ffff8801a3645e75 R14: ffff8801a430f9c0 R15: 0000000000000006
FS:  00007fb6fb51a700(0000) GS:ffff8801afc80000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 00000001a49b0000 CR4: 00000000000027e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process rpc.idmapd (pid: 1229, threadinfo ffff8801a3644000, task ffff8801a3bf9710)
Stack:
 ffffffff81260878 ffff8801a3645db0 ffff8801a3645db0 ffff880077707a90
 ffff880077707f50 ffff8801a18ccd80 0000000000000006 ffff8801a3645e75
 ffff8801a430f9c0 ffff8801a3645dd8 ffffffff81260983 ffff8801a3645de8
Call Trace:
 [&lt;ffffffff81260878&gt;] ? __key_instantiate_and_link+0x58/0x100
 [&lt;ffffffff81260983&gt;] key_instantiate_and_link+0x63/0xa0
 [&lt;ffffffffa057062b&gt;] idmap_pipe_downcall+0x1cb/0x1e0 [nfs]
 [&lt;ffffffffa0107f57&gt;] rpc_pipe_write+0x67/0x90 [sunrpc]
 [&lt;ffffffff8117f833&gt;] vfs_write+0xb3/0x180
 [&lt;ffffffff8117fb5a&gt;] sys_write+0x4a/0x90
 [&lt;ffffffff81600329&gt;] system_call_fastpath+0x16/0x1b
Code:  Bad RIP value.
RIP  [&lt;          (null)&gt;]           (null)
 RSP &lt;ffff8801a3645d40&gt;
CR2: 0000000000000000

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: Steve Dickson &lt;steved@redhat.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>NFS: Force the legacy idmapper to be single threaded</title>
<updated>2012-06-20T18:38:11Z</updated>
<author>
<name>Bryan Schumaker</name>
</author>
<published>2012-06-20T18:35:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b1027439dff844675f6c0df97a1b1d190791a699'/>
<id>urn:sha1:b1027439dff844675f6c0df97a1b1d190791a699</id>
<content type='text'>
It was initially coded under the assumption that there would only be one
request at a time, so use a lock to enforce this requirement..

Signed-off-by: Bryan Schumaker &lt;bjschuma@netapp.com&gt;
CC: stable@vger.kernel.org [3.4+]
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS: Add memory barriers to the nfs_client-&gt;cl_cons_state initialisation</title>
<updated>2012-05-23T19:24:59Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2012-05-23T17:26:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=54ac471c83aff6b1e068eb8029c797dc68a76e89'/>
<id>urn:sha1:54ac471c83aff6b1e068eb8029c797dc68a76e89</id>
<content type='text'>
Ensure that a process that uses the nfs_client-&gt;cl_cons_state test
for whether the initialisation process is finished does not read
stale data.

Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFSv4: Fix a race in the net namespace mount notification</title>
<updated>2012-05-23T19:21:13Z</updated>
<author>
<name>Trond Myklebust</name>
</author>
<published>2012-05-23T17:24:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4697bd5e9419348ef9fa9b55cefe4355ad9d3d01'/>
<id>urn:sha1:4697bd5e9419348ef9fa9b55cefe4355ad9d3d01</id>
<content type='text'>
Since the struct nfs_client gets added to the global nfs_client_list
before it is initialised, it is possible that rpc_pipefs_event can
end up trying to create idmapper entries on such a thing.

The solution is to have the mount notification wait for the
initialisation of each nfs_client to complete, and then to
skip any entries for which the it failed.

Reported-by: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Acked-by: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
</content>
</entry>
<entry>
<title>NFS: Use proper naming conventions for the nfs_client.net field</title>
<updated>2012-05-22T20:45:44Z</updated>
<author>
<name>Chuck Lever</name>
</author>
<published>2012-05-22T02:44:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=73ea666c2bb536f2862cefdb3e014ed62b262ba5'/>
<id>urn:sha1:73ea666c2bb536f2862cefdb3e014ed62b262ba5</id>
<content type='text'>
Clean up:  When naming fields and data types, follow established
conventions to facilitate accurate grep/cscope searches.

Introduced by commit e50a7a1a "NFS: make NFS client allocated per
network namespace context," Tue Jan 10, 2012.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS: kmalloc() doesn't return an ERR_PTR()</title>
<updated>2012-05-15T00:44:01Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2012-05-14T19:45:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5abc03cd919535c61b813f2319cb38326a41e810'/>
<id>urn:sha1:5abc03cd919535c61b813f2319cb38326a41e810</id>
<content type='text'>
Obviously we should check for NULL here instead of IS_ERR().

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: stable@vger.kernel.org [3.4]
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS: get module in idmap PipeFS notifier callback</title>
<updated>2012-04-28T17:22:19Z</updated>
<author>
<name>Stanislav Kinsbursky</name>
</author>
<published>2012-04-28T15:32:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=71dfc5fa5160bb73752f0731539404569a77faca'/>
<id>urn:sha1:71dfc5fa5160bb73752f0731539404569a77faca</id>
<content type='text'>
This is bug fix.
Notifier callback is called from SUNRPC module. So before dereferencing NFS
module we have to make sure, that it's alive.

Signed-off-by: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'nfs-for-3.4-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs</title>
<updated>2012-03-23T15:53:47Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2012-03-23T15:53:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f63d395d47f37a4fe771e6d4b1db9d2cdae5ffc5'/>
<id>urn:sha1:f63d395d47f37a4fe771e6d4b1db9d2cdae5ffc5</id>
<content type='text'>
Pull NFS client updates for Linux 3.4 from Trond Myklebust:
 "New features include:
   - Add NFS client support for containers.

     This should enable most of the necessary functionality, including
     lockd support, and support for rpc.statd, NFSv4 idmapper and
     RPCSEC_GSS upcalls into the correct network namespace from which
     the mount system call was issued.

   - NFSv4 idmapper scalability improvements

     Base the idmapper cache on the keyring interface to allow
     concurrent access to idmapper entries.  Start the process of
     migrating users from the single-threaded daemon-based approach to
     the multi-threaded request-key based approach.

   - NFSv4.1 implementation id.

     Allows the NFSv4.1 client and server to mutually identify each
     other for logging and debugging purposes.

   - Support the 'vers=4.1' mount option for mounting NFSv4.1 instead of
     having to use the more counterintuitive 'vers=4,minorversion=1'.

   - SUNRPC tracepoints.

     Start the process of adding tracepoints in order to improve
     debugging of the RPC layer.

   - pNFS object layout support for autologin.

  Important bugfixes include:

   - Fix a bug in rpc_wake_up/rpc_wake_up_status that caused them to
     fail to wake up all tasks when applied to priority waitqueues.

   - Ensure that we handle read delegations correctly, when we try to
     truncate a file.

   - A number of fixes for NFSv4 state manager loops (mostly to do with
     delegation recovery)."

* tag 'nfs-for-3.4-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (224 commits)
  NFS: fix sb-&gt;s_id in nfs debug prints
  xprtrdma: Remove assumption that each segment is &lt;= PAGE_SIZE
  xprtrdma: The transport should not bug-check when a dup reply is received
  pnfs-obj: autologin: Add support for protocol autologin
  NFS: Remove nfs4_setup_sequence from generic rename code
  NFS: Remove nfs4_setup_sequence from generic unlink code
  NFS: Remove nfs4_setup_sequence from generic read code
  NFS: Remove nfs4_setup_sequence from generic write code
  NFS: Fix more NFS debug related build warnings
  SUNRPC/LOCKD: Fix build warnings when CONFIG_SUNRPC_DEBUG is undefined
  nfs: non void functions must return a value
  SUNRPC: Kill compiler warning when RPC_DEBUG is unset
  SUNRPC/NFS: Add Kbuild dependencies for NFS_DEBUG/RPC_DEBUG
  NFS: Use cond_resched_lock() to reduce latencies in the commit scans
  NFSv4: It is not safe to dereference lsp-&gt;ls_state in release_lockowner
  NFS: ncommit count is being double decremented
  SUNRPC: We must not use list_for_each_entry_safe() in rpc_wake_up()
  Try using machine credentials for RENEW calls
  NFSv4.1: Fix a few issues in filelayout_commit_pagelist
  NFSv4.1: Clean ups and bugfixes for the pNFS read/writeback/commit code
  ...
</content>
</entry>
</feed>
