Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6cdb5930 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: consolidate reconnect logic in smb_init routines
  cifs: Replace wrtPending with a real reference count
  cifs: protect GlobalOplock_Q with its own spinlock
  cifs: use tcon pointer in cifs_show_options
  cifs: send IPv6 addr in upcall with colon delimiters
  [CIFS] Fix checkpatch warnings
  PATCH] cifs: fix broken mounts when a SSH tunnel is used (try #4)
  [CIFS] Memory leak in ntlmv2 hash calculation
  [CIFS] potential NULL dereference in parse_DFS_referrals()
parents 99bc4706 9162ab20
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -3,7 +3,10 @@ Version 1.60
Fix memory leak in reconnect.  Fix oops in DFS mount error path.
Set s_maxbytes to smaller (the max that vfs can handle) so that
sendfile will now work over cifs mounts again.  Add noforcegid
and noforceuid mount parameters.
and noforceuid mount parameters. Fix small mem leak when using
ntlmv2. Fix 2nd mount to same server but with different port to
be allowed (rather than reusing the 1st port) - only when the
user explicitly overrides the port on the 2nd mount.

Version 1.59
------------
+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo)
	if (server->addr.sockAddr.sin_family == AF_INET)
		sprintf(dp, "ip4=%pI4", &server->addr.sockAddr.sin_addr);
	else if (server->addr.sockAddr.sin_family == AF_INET6)
		sprintf(dp, "ip6=%pi6", &server->addr.sockAddr6.sin6_addr);
		sprintf(dp, "ip6=%pI6", &server->addr.sockAddr6.sin6_addr);
	else
		goto out;

+2 −2
Original line number Diff line number Diff line
@@ -607,7 +607,7 @@ static struct cifs_ntsd *get_cifs_acl(struct cifs_sb_info *cifs_sb,
		return get_cifs_acl_by_path(cifs_sb, path, pacllen);

	pntsd = get_cifs_acl_by_fid(cifs_sb, open_file->netfid, pacllen);
	atomic_dec(&open_file->wrtPending);
	cifsFileInfo_put(open_file);
	return pntsd;
}

@@ -665,7 +665,7 @@ static int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,
		return set_cifs_acl_by_path(cifs_sb, path, pnntsd, acllen);

	rc = set_cifs_acl_by_fid(cifs_sb, open_file->netfid, pnntsd, acllen);
	atomic_dec(&open_file->wrtPending);
	cifsFileInfo_put(open_file);
	return rc;
}

+1 −0
Original line number Diff line number Diff line
@@ -373,6 +373,7 @@ calc_exit_2:
	   compare with the NTLM example */
	hmac_md5_final(ses->server->ntlmv2_hash, pctxt);

	kfree(pctxt);
	return rc;
}

+10 −12
Original line number Diff line number Diff line
@@ -361,13 +361,10 @@ cifs_show_address(struct seq_file *s, struct TCP_Server_Info *server)
static int
cifs_show_options(struct seq_file *s, struct vfsmount *m)
{
	struct cifs_sb_info *cifs_sb;
	struct cifsTconInfo *tcon;

	cifs_sb = CIFS_SB(m->mnt_sb);
	tcon = cifs_sb->tcon;
	struct cifs_sb_info *cifs_sb = CIFS_SB(m->mnt_sb);
	struct cifsTconInfo *tcon = cifs_sb->tcon;

	seq_printf(s, ",unc=%s", cifs_sb->tcon->treeName);
	seq_printf(s, ",unc=%s", tcon->treeName);
	if (tcon->ses->userName)
		seq_printf(s, ",username=%s", tcon->ses->userName);
	if (tcon->ses->domainName)
@@ -989,19 +986,19 @@ static int cifs_oplock_thread(void *dummyarg)
		if (try_to_freeze())
			continue;

		spin_lock(&GlobalMid_Lock);
		if (list_empty(&GlobalOplock_Q)) {
			spin_unlock(&GlobalMid_Lock);
		spin_lock(&cifs_oplock_lock);
		if (list_empty(&cifs_oplock_list)) {
			spin_unlock(&cifs_oplock_lock);
			set_current_state(TASK_INTERRUPTIBLE);
			schedule_timeout(39*HZ);
		} else {
			oplock_item = list_entry(GlobalOplock_Q.next,
			oplock_item = list_entry(cifs_oplock_list.next,
						struct oplock_q_entry, qhead);
			cFYI(1, ("found oplock item to write out"));
			pTcon = oplock_item->tcon;
			inode = oplock_item->pinode;
			netfid = oplock_item->netfid;
			spin_unlock(&GlobalMid_Lock);
			spin_unlock(&cifs_oplock_lock);
			DeleteOplockQEntry(oplock_item);
			/* can not grab inode sem here since it would
				deadlock when oplock received on delete
@@ -1058,7 +1055,7 @@ init_cifs(void)
	int rc = 0;
	cifs_proc_init();
	INIT_LIST_HEAD(&cifs_tcp_ses_list);
	INIT_LIST_HEAD(&GlobalOplock_Q);
	INIT_LIST_HEAD(&cifs_oplock_list);
#ifdef CONFIG_CIFS_EXPERIMENTAL
	INIT_LIST_HEAD(&GlobalDnotifyReqList);
	INIT_LIST_HEAD(&GlobalDnotifyRsp_Q);
@@ -1087,6 +1084,7 @@ init_cifs(void)
	rwlock_init(&GlobalSMBSeslock);
	rwlock_init(&cifs_tcp_ses_lock);
	spin_lock_init(&GlobalMid_Lock);
	spin_lock_init(&cifs_oplock_lock);

	if (cifs_max_pending < 2) {
		cifs_max_pending = 2;
Loading