Merge tag 'for-linus-3.12-merge' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Sep 2013 19:34:13 +0000 (12:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Sep 2013 19:34:13 +0000 (12:34 -0700)
Pull 9p updates from Eric Van Hensbergen:
 "Minor 9p fixes and tweaks for 3.12 merge window

  The first fixes namespace issues which causes a kernel NULL pointer
  dereference, the second fixes uevent handling to work better with
  udev, and the third switches some code to use srlcpy instead of
  strncpy in order to be safer.

  All changes have been baking in for-next for at least 2 weeks"

* tag 'for-linus-3.12-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
  fs/9p: avoid accessing utsname after namespace has been torn down
  9p: send uevent after adding/removing mount_tag attribute
  fs: 9p: use strlcpy instead of strncpy

1  2 
net/9p/client.c

diff --combined net/9p/client.c
@@@ -658,12 -658,17 +658,12 @@@ static int p9_client_flush(struct p9_cl
  
        /*
         * if we haven't received a response for oldreq,
 -       * remove it from the list, and notify the transport
 -       * layer that the reply will never arrive.
 +       * remove it from the list
         */
 -      spin_lock(&c->lock);
        if (oldreq->status == REQ_STATUS_FLSH) {
 +              spin_lock(&c->lock);
                list_del(&oldreq->req_list);
                spin_unlock(&c->lock);
 -              if (c->trans_mod->cancelled)
 -                      c->trans_mod->cancelled(c, req);
 -      } else {
 -              spin_unlock(&c->lock);
        }
  
        p9_free_req(c, req);
@@@ -987,6 -992,7 +987,7 @@@ struct p9_client *p9_client_create(cons
  {
        int err;
        struct p9_client *clnt;
+       char *client_id;
  
        err = 0;
        clnt = kmalloc(sizeof(struct p9_client), GFP_KERNEL);
  
        clnt->trans_mod = NULL;
        clnt->trans = NULL;
+       client_id = utsname()->nodename;
+       memcpy(clnt->name, client_id, strlen(client_id) + 1);
        spin_lock_init(&clnt->lock);
        INIT_LIST_HEAD(&clnt->fidlist);