linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [01/21] IB/mlx4: pass SMP vendor-specific attribute MADs to firmware
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
@ 2012-02-10 22:47 ` Greg KH
  2012-02-10 22:47 ` [02/21] mm/filemap_xip.c: fix race condition in xip_file_fault() Greg KH
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:47 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Jack Morgenstein, Or Gerlitz, Ira Weiny,
	Roland Dreier

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Jack Morgenstein <jackm@mellanox.com>

commit a6f7feae6d19e84253918d88b04153af09d3a243 upstream.

In the current code, vendor-specific MADs (e.g with the FDR-10
attribute) are silently dropped by the driver, resulting in timeouts
at the sending side and inability to query/configure the relevant
feature.  However, the ConnectX firmware is able to handle such MADs.
For unsupported attributes, the firmware returns a GET_RESPONSE MAD
containing an error status.

For example, for a FDR-10 node with LID 11:

    # ibstat mlx4_0 1

    CA: 'mlx4_0'
    Port 1:
    State: Active
    Physical state: LinkUp
    Rate: 40 (FDR10)
    Base lid: 11
    LMC: 0
    SM lid: 24
    Capability mask: 0x02514868
    Port GUID: 0x0002c903002e65d1
    Link layer: InfiniBand

Extended Port Query (EPI) vendor mad timeouts before the patch:

    # smpquery MEPI 11 -d

    ibwarn: [4196] smp_query_via: attr 0xff90 mod 0x0 route Lid 11
    ibwarn: [4196] _do_madrpc: retry 1 (timeout 1000 ms)
    ibwarn: [4196] _do_madrpc: retry 2 (timeout 1000 ms)
    ibwarn: [4196] _do_madrpc: timeout after 3 retries, 3000 ms
    ibwarn: [4196] mad_rpc: _do_madrpc failed; dport (Lid 11)
    smpquery: iberror: [pid 4196] main: failed: operation EPI: ext port info query failed

EPI query works OK with the patch:

    # smpquery MEPI 11 -d

    ibwarn: [6548] smp_query_via: attr 0xff90 mod 0x0 route Lid 11
    ibwarn: [6548] mad_rpc: data offs 64 sz 64
    mad data
    0000 0000 0000 0001 0000 0001 0000 0001
    0000 0000 0000 0000 0000 0000 0000 0000
    0000 0000 0000 0000 0000 0000 0000 0000
    0000 0000 0000 0000 0000 0000 0000 0000
    # Ext Port info: Lid 11 port 0
    StateChangeEnable:...............0x00
    LinkSpeedSupported:..............0x01
    LinkSpeedEnabled:................0x01
    LinkSpeedActive:.................0x01

Signed-off-by: Jack Morgenstein <jackm@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Acked-by: Ira Weiny <weiny2@llnl.gov>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/infiniband/hw/mlx4/mad.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

--- a/drivers/infiniband/hw/mlx4/mad.c
+++ b/drivers/infiniband/hw/mlx4/mad.c
@@ -252,12 +252,9 @@ int mlx4_ib_process_mad(struct ib_device
 			return IB_MAD_RESULT_SUCCESS;
 
 		/*
-		 * Don't process SMInfo queries or vendor-specific
-		 * MADs -- the SMA can't handle them.
+		 * Don't process SMInfo queries -- the SMA can't handle them.
 		 */
-		if (in_mad->mad_hdr.attr_id == IB_SMP_ATTR_SM_INFO ||
-		    ((in_mad->mad_hdr.attr_id & IB_SMP_ATTR_VENDOR_MASK) ==
-		     IB_SMP_ATTR_VENDOR_MASK))
+		if (in_mad->mad_hdr.attr_id == IB_SMP_ATTR_SM_INFO)
 			return IB_MAD_RESULT_SUCCESS;
 	} else if (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_PERF_MGMT ||
 		   in_mad->mad_hdr.mgmt_class == MLX4_IB_VENDOR_CLASS1   ||



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [02/21] mm/filemap_xip.c: fix race condition in xip_file_fault()
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
  2012-02-10 22:47 ` [01/21] IB/mlx4: pass SMP vendor-specific attribute MADs to firmware Greg KH
@ 2012-02-10 22:47 ` Greg KH
  2012-02-10 22:47 ` [03/21] NFSv4: Fix up the callers of nfs4_state_end_reclaim_reboot Greg KH
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:47 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, David Sadler, Carsten Otte,
	Louis Alex Eisner, Hugh Dickins

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Carsten Otte <carsteno@de.ibm.com>

commit 99f02ef1f18631eb0a4e0ea0a3d56878dbcb4b90 upstream.

Fix a race condition that shows in conjunction with xip_file_fault() when
two threads of the same user process fault on the same memory page.

In this case, the race winner will install the page table entry and the
unlucky loser will cause an oops: xip_file_fault calls vm_insert_pfn (via
vm_insert_mixed) which drops out at this check:

	retval = -EBUSY;
	if (!pte_none(*pte))
		goto out_unlock;

The resulting -EBUSY return value will trigger a BUG_ON() in
xip_file_fault.

This fix simply considers the fault as fixed in this case, because the
race winner has successfully installed the pte.

[akpm@linux-foundation.org: use conventional (and consistent) comment layout]
Reported-by: David Sadler <dsadler@us.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Reported-by: Louis Alex Eisner <leisner@cs.ucsd.edu>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/filemap_xip.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- a/mm/filemap_xip.c
+++ b/mm/filemap_xip.c
@@ -262,7 +262,12 @@ found:
 							xip_pfn);
 		if (err == -ENOMEM)
 			return VM_FAULT_OOM;
-		BUG_ON(err);
+		/*
+		 * err == -EBUSY is fine, we've raced against another thread
+		 * that faulted-in the same page
+		 */
+		if (err != -EBUSY)
+			BUG_ON(err);
 		return VM_FAULT_NOPAGE;
 	} else {
 		int err, ret = VM_FAULT_OOM;



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [03/21] NFSv4: Fix up the callers of nfs4_state_end_reclaim_reboot
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
  2012-02-10 22:47 ` [01/21] IB/mlx4: pass SMP vendor-specific attribute MADs to firmware Greg KH
  2012-02-10 22:47 ` [02/21] mm/filemap_xip.c: fix race condition in xip_file_fault() Greg KH
@ 2012-02-10 22:47 ` Greg KH
  2012-02-10 22:47 ` [04/21] NFSv4: The state manager shouldnt exit on errors that were handled Greg KH
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:47 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Trond Myklebust, Chuck Lever

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Trond Myklebust <Trond.Myklebust@netapp.com>

commit e345e88a774875cec26e097ea3ff2dc40c4f9da2 upstream.

In practice, we need to ensure that we call nfs4_state_end_reclaim_reboot
in 2 cases:

 - If we lose the lease while we were reclaiming state
OR
 - After we're done with reboot recovery

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/nfs/nfs4state.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1060,6 +1060,7 @@ static void nfs4_recovery_handle_error(s
 		case -NFS4ERR_STALE_CLIENTID:
 		case -NFS4ERR_LEASE_MOVED:
 			set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state);
+			nfs4_state_end_reclaim_reboot(clp);
 			nfs4_state_start_reclaim_reboot(clp);
 			break;
 		case -NFS4ERR_EXPIRED:
@@ -1263,7 +1264,7 @@ static void nfs4_state_manager(struct nf
 			}
 		}
 		/* First recover reboot state... */
-		if (test_and_clear_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state)) {
+		if (test_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state)) {
 			status = nfs4_do_reclaim(clp,
 				nfs4_reboot_recovery_ops[clp->cl_minorversion]);
 			if (status == -NFS4ERR_STALE_CLIENTID)
@@ -1309,8 +1310,6 @@ static void nfs4_state_manager(struct nf
 out_error:
 	printk(KERN_WARNING "Error: state manager failed on NFSv4 server %s"
 			" with error %d\n", clp->cl_hostname, -status);
-	if (test_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state))
-		nfs4_state_end_reclaim_reboot(clp);
 	nfs4_clear_state_manager_bit(clp);
 }
 



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [04/21] NFSv4: The state manager shouldnt exit on errors that were handled
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
                   ` (2 preceding siblings ...)
  2012-02-10 22:47 ` [03/21] NFSv4: Fix up the callers of nfs4_state_end_reclaim_reboot Greg KH
@ 2012-02-10 22:47 ` Greg KH
  2012-02-10 22:47 ` [05/21] NFSv4: Ensure the state manager handles NFS4ERR_NO_GRACE correctly Greg KH
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:47 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Trond Myklebust, Chuck Lever

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Trond Myklebust <Trond.Myklebust@netapp.com>

commit 4f7cdf18e14f81860b856ef7694ef58eb1a751c0 upstream.

nfs4_recovery_handle_error() will correctly handle errors such as
NFS4ERR_CB_PATH_DOWN, however because they are still passed back to the
main loop in nfs4_state_manager(), they can cause the latter to exit
prematurely.

Fix this by letting nfs4_recovery_handle_error() change the error value in
cases where there is no action required by the caller.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/nfs/nfs4state.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1051,12 +1051,12 @@ static void nfs4_state_end_reclaim_nogra
 	clear_bit(NFS4CLNT_RECLAIM_NOGRACE, &clp->cl_state);
 }
 
-static void nfs4_recovery_handle_error(struct nfs_client *clp, int error)
+static int nfs4_recovery_handle_error(struct nfs_client *clp, int error)
 {
 	switch (error) {
 		case -NFS4ERR_CB_PATH_DOWN:
 			nfs_handle_cb_pathdown(clp);
-			break;
+			return 0;
 		case -NFS4ERR_STALE_CLIENTID:
 		case -NFS4ERR_LEASE_MOVED:
 			set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state);
@@ -1075,6 +1075,7 @@ static void nfs4_recovery_handle_error(s
 		case -NFS4ERR_SEQ_MISORDERED:
 			set_bit(NFS4CLNT_SESSION_SETUP, &clp->cl_state);
 	}
+	return error;
 }
 
 static int nfs4_do_reclaim(struct nfs_client *clp, const struct nfs4_state_recovery_ops *ops)
@@ -1094,8 +1095,7 @@ restart:
 		if (status < 0) {
 			set_bit(ops->owner_flag_bit, &sp->so_flags);
 			nfs4_put_state_owner(sp);
-			nfs4_recovery_handle_error(clp, status);
-			return status;
+			return nfs4_recovery_handle_error(clp, status);
 		}
 		nfs4_put_state_owner(sp);
 		goto restart;
@@ -1125,8 +1125,7 @@ static int nfs4_check_lease(struct nfs_c
 	status = ops->renew_lease(clp, cred);
 	put_rpccred(cred);
 out:
-	nfs4_recovery_handle_error(clp, status);
-	return status;
+	return nfs4_recovery_handle_error(clp, status);
 }
 
 static int nfs4_reclaim_lease(struct nfs_client *clp)



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [05/21] NFSv4: Ensure the state manager handles NFS4ERR_NO_GRACE correctly
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
                   ` (3 preceding siblings ...)
  2012-02-10 22:47 ` [04/21] NFSv4: The state manager shouldnt exit on errors that were handled Greg KH
@ 2012-02-10 22:47 ` Greg KH
  2012-02-10 22:47 ` [06/21] NFSv4: Handle NFS4ERR_GRACE when recovering an expired lease Greg KH
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:47 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Trond Myklebust, Chuck Lever

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Trond Myklebust <Trond.Myklebust@netapp.com>

commit c8b7ae3d3221536228260757444ee10c6d71793f upstream.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/nfs/nfs4state.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1057,6 +1057,9 @@ static int nfs4_recovery_handle_error(st
 		case -NFS4ERR_CB_PATH_DOWN:
 			nfs_handle_cb_pathdown(clp);
 			return 0;
+		case -NFS4ERR_NO_GRACE:
+			nfs4_state_end_reclaim_reboot(clp);
+			return 0;
 		case -NFS4ERR_STALE_CLIENTID:
 		case -NFS4ERR_LEASE_MOVED:
 			set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state);



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [06/21] NFSv4: Handle NFS4ERR_GRACE when recovering an expired lease.
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
                   ` (4 preceding siblings ...)
  2012-02-10 22:47 ` [05/21] NFSv4: Ensure the state manager handles NFS4ERR_NO_GRACE correctly Greg KH
@ 2012-02-10 22:47 ` Greg KH
  2012-02-10 22:47 ` [07/21] NFSv4: Fix open recovery Greg KH
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:47 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Trond Myklebust, Chuck Lever

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Trond Myklebust <Trond.Myklebust@netapp.com>

commit a9ed2e2583747fb3139a764c317fac58893b968f upstream.

If our lease expires, and the server reboots while we're recovering, we
need to be able to wait until the grace period is over.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/nfs/nfs4proc.c |   26 +++++++++++++++++++-------
 1 file changed, 19 insertions(+), 7 deletions(-)

--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -1490,7 +1490,7 @@ static int _nfs4_open_expired(struct nfs
 	return ret;
 }
 
-static inline int nfs4_do_open_expired(struct nfs_open_context *ctx, struct nfs4_state *state)
+static int nfs4_do_open_expired(struct nfs_open_context *ctx, struct nfs4_state *state)
 {
 	struct nfs_server *server = NFS_SERVER(state->inode);
 	struct nfs4_exception exception = { };
@@ -1498,10 +1498,16 @@ static inline int nfs4_do_open_expired(s
 
 	do {
 		err = _nfs4_open_expired(ctx, state);
-		if (err != -NFS4ERR_DELAY)
-			break;
-		nfs4_handle_exception(server, err, &exception);
+		switch (err) {
+		default:
+			goto out;
+		case -NFS4ERR_GRACE:
+		case -NFS4ERR_DELAY:
+			nfs4_handle_exception(server, err, &exception);
+			err = 0;
+		}
 	} while (exception.retry);
+out:
 	return err;
 }
 
@@ -4111,10 +4117,16 @@ static int nfs4_lock_expired(struct nfs4
 		if (test_bit(NFS_DELEGATED_STATE, &state->flags) != 0)
 			return 0;
 		err = _nfs4_do_setlk(state, F_SETLK, request, 0);
-		if (err != -NFS4ERR_DELAY)
-			break;
-		nfs4_handle_exception(server, err, &exception);
+		switch (err) {
+		default:
+			goto out;
+		case -NFS4ERR_GRACE:
+		case -NFS4ERR_DELAY:
+			nfs4_handle_exception(server, err, &exception);
+			err = 0;
+		}
 	} while (exception.retry);
+out:
 	return err;
 }
 



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [07/21] NFSv4: Fix open recovery
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
                   ` (5 preceding siblings ...)
  2012-02-10 22:47 ` [06/21] NFSv4: Handle NFS4ERR_GRACE when recovering an expired lease Greg KH
@ 2012-02-10 22:47 ` Greg KH
  2012-02-10 22:47 ` [08/21] rpc client can not deal with ENOSOCK, so translate it into ENOCONN Greg KH
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:47 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Sachin Prabhu, Trond Myklebust, Chuck Lever

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Trond Myklebust <Trond.Myklebust@netapp.com>

commit b0ed9dbc24f1fd912b2dd08b995153cafc1d5b1c upstream.

NFSv4 open recovery is currently broken: since we do not clear the
state->flags states before attempting recovery, we end up with the
'can_open_cached()' function triggering. This again leads to no OPEN call
being put on the wire.

Reported-by: Sachin Prabhu <sprabhu@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/nfs/nfs4proc.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -1067,6 +1067,7 @@ static int nfs4_open_recover(struct nfs4
 	clear_bit(NFS_DELEGATED_STATE, &state->flags);
 	smp_rmb();
 	if (state->n_rdwr != 0) {
+		clear_bit(NFS_O_RDWR_STATE, &state->flags);
 		ret = nfs4_open_recover_helper(opendata, FMODE_READ|FMODE_WRITE, &newstate);
 		if (ret != 0)
 			return ret;
@@ -1074,6 +1075,7 @@ static int nfs4_open_recover(struct nfs4
 			return -ESTALE;
 	}
 	if (state->n_wronly != 0) {
+		clear_bit(NFS_O_WRONLY_STATE, &state->flags);
 		ret = nfs4_open_recover_helper(opendata, FMODE_WRITE, &newstate);
 		if (ret != 0)
 			return ret;
@@ -1081,6 +1083,7 @@ static int nfs4_open_recover(struct nfs4
 			return -ESTALE;
 	}
 	if (state->n_rdonly != 0) {
+		clear_bit(NFS_O_RDONLY_STATE, &state->flags);
 		ret = nfs4_open_recover_helper(opendata, FMODE_READ, &newstate);
 		if (ret != 0)
 			return ret;



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [08/21] rpc client can not deal with ENOSOCK, so translate it into ENOCONN
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
                   ` (6 preceding siblings ...)
  2012-02-10 22:47 ` [07/21] NFSv4: Fix open recovery Greg KH
@ 2012-02-10 22:47 ` Greg KH
  2012-02-10 22:47 ` [09/21] udf: Mark LVID buffer as uptodate before marking it dirty Greg KH
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:47 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Bian Naimeng, Trond Myklebust, Chuck Lever

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Bian Naimeng <biannm@cn.fujitsu.com>

commit 5fe46e9d733f19a880ef7e516002bd4c2b833e14 upstream.

If NFSv4 client send a request before connect, or the old connection was broken
because a ETIMEOUT error catched by call_status, ->send_request will return
ENOSOCK, but rpc layer can not deal with it, so make sure ->send_request can
translate ENOSOCK into ENOCONN.

Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/sunrpc/xprtsock.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -563,8 +563,6 @@ static int xs_udp_send_request(struct rp
 		/* Still some bytes left; set up for a retry later. */
 		status = -EAGAIN;
 	}
-	if (!transport->sock)
-		goto out;
 
 	switch (status) {
 	case -ENOTSOCK:
@@ -584,7 +582,7 @@ static int xs_udp_send_request(struct rp
 		 * prompts ECONNREFUSED. */
 		clear_bit(SOCK_ASYNC_NOSPACE, &transport->sock->flags);
 	}
-out:
+
 	return status;
 }
 
@@ -666,8 +664,6 @@ static int xs_tcp_send_request(struct rp
 		status = -EAGAIN;
 		break;
 	}
-	if (!transport->sock)
-		goto out;
 
 	switch (status) {
 	case -ENOTSOCK:
@@ -687,7 +683,7 @@ static int xs_tcp_send_request(struct rp
 	case -ENOTCONN:
 		clear_bit(SOCK_ASYNC_NOSPACE, &transport->sock->flags);
 	}
-out:
+
 	return status;
 }
 



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [09/21] udf: Mark LVID buffer as uptodate before marking it dirty
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
                   ` (7 preceding siblings ...)
  2012-02-10 22:47 ` [08/21] rpc client can not deal with ENOSOCK, so translate it into ENOCONN Greg KH
@ 2012-02-10 22:47 ` Greg KH
  2012-02-10 22:47 ` [10/21] drm/i915: Fix TV Out refresh rate Greg KH
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:47 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Namjae Jeon, Jan Kara, Dave Jones

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Jan Kara <jack@suse.cz>

commit 853a0c25baf96b028de1654bea1e0c8857eadf3d upstream.

When we hit EIO while writing LVID, the buffer uptodate bit is cleared.
This then results in an anoying warning from mark_buffer_dirty() when we
write the buffer again. So just set uptodate flag unconditionally.

Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/udf/super.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -1791,6 +1791,12 @@ static void udf_open_lvid(struct super_b
 			le16_to_cpu(lvid->descTag.descCRCLength)));
 
 	lvid->descTag.tagChecksum = udf_tag_checksum(&lvid->descTag);
+	/*
+	 * We set buffer uptodate unconditionally here to avoid spurious
+	 * warnings from mark_buffer_dirty() when previous EIO has marked
+	 * the buffer as !uptodate
+	 */
+	set_buffer_uptodate(bh);
 	mark_buffer_dirty(bh);
 	sbi->s_lvid_dirty = 0;
 }



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [10/21] drm/i915: Fix TV Out refresh rate.
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
                   ` (8 preceding siblings ...)
  2012-02-10 22:47 ` [09/21] udf: Mark LVID buffer as uptodate before marking it dirty Greg KH
@ 2012-02-10 22:47 ` Greg KH
  2012-02-10 22:47 ` [11/21] eCryptfs: Infinite loop due to overflow in ecryptfs_write() Greg KH
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:47 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Rodrigo Vivi, Jesse Barnes, Keith Packard,
	Eugeni Dodonov

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Rodrigo Vivi <rodrigo.vivi@gmail.com>

commit 23bd15ec662344dc10e9918fdd0dbc58bc71526d upstream.

TV Out refresh rate was half of the specification for almost all modes.
Due to this reason pixel clock was so low for some modes causing flickering screen.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/i915/intel_tv.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

--- a/drivers/gpu/drm/i915/intel_tv.c
+++ b/drivers/gpu/drm/i915/intel_tv.c
@@ -415,7 +415,7 @@ static const struct tv_mode tv_modes[] =
 	{
 		.name		= "NTSC-M",
 		.clock		= 108000,
-		.refresh	= 29970,
+		.refresh	= 59940,
 		.oversample	= TV_OVERSAMPLE_8X,
 		.component_only = 0,
 		/* 525 Lines, 60 Fields, 15.734KHz line, Sub-Carrier 3.580MHz */
@@ -458,7 +458,7 @@ static const struct tv_mode tv_modes[] =
 	{
 		.name		= "NTSC-443",
 		.clock		= 108000,
-		.refresh	= 29970,
+		.refresh	= 59940,
 		.oversample	= TV_OVERSAMPLE_8X,
 		.component_only = 0,
 		/* 525 Lines, 60 Fields, 15.734KHz line, Sub-Carrier 4.43MHz */
@@ -500,7 +500,7 @@ static const struct tv_mode tv_modes[] =
 	{
 		.name		= "NTSC-J",
 		.clock		= 108000,
-		.refresh	= 29970,
+		.refresh	= 59940,
 		.oversample	= TV_OVERSAMPLE_8X,
 		.component_only = 0,
 
@@ -543,7 +543,7 @@ static const struct tv_mode tv_modes[] =
 	{
 		.name		= "PAL-M",
 		.clock		= 108000,
-		.refresh	= 29970,
+		.refresh	= 59940,
 		.oversample	= TV_OVERSAMPLE_8X,
 		.component_only = 0,
 
@@ -587,7 +587,7 @@ static const struct tv_mode tv_modes[] =
 		/* 625 Lines, 50 Fields, 15.625KHz line, Sub-Carrier 4.434MHz */
 		.name	    = "PAL-N",
 		.clock		= 108000,
-		.refresh	= 25000,
+		.refresh	= 50000,
 		.oversample	= TV_OVERSAMPLE_8X,
 		.component_only = 0,
 
@@ -632,7 +632,7 @@ static const struct tv_mode tv_modes[] =
 		/* 625 Lines, 50 Fields, 15.625KHz line, Sub-Carrier 4.434MHz */
 		.name	    = "PAL",
 		.clock		= 108000,
-		.refresh	= 25000,
+		.refresh	= 50000,
 		.oversample	= TV_OVERSAMPLE_8X,
 		.component_only = 0,
 
@@ -819,7 +819,7 @@ static const struct tv_mode tv_modes[] =
 	{
 		.name       = "1080i@50Hz",
 		.clock		= 148800,
-		.refresh	= 25000,
+		.refresh	= 50000,
 		.oversample     = TV_OVERSAMPLE_2X,
 		.component_only = 1,
 
@@ -845,7 +845,7 @@ static const struct tv_mode tv_modes[] =
 	{
 		.name       = "1080i@60Hz",
 		.clock		= 148800,
-		.refresh	= 30000,
+		.refresh	= 60000,
 		.oversample     = TV_OVERSAMPLE_2X,
 		.component_only = 1,
 



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [11/21] eCryptfs: Infinite loop due to overflow in ecryptfs_write()
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
                   ` (9 preceding siblings ...)
  2012-02-10 22:47 ` [10/21] drm/i915: Fix TV Out refresh rate Greg KH
@ 2012-02-10 22:47 ` Greg KH
  2012-02-10 22:47 ` [12/21] atmel_lcdfb: fix usage of CONTRAST_CTR in suspend/resume Greg KH
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:47 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Li Wang, Yunchuan Wen, Cong Wang, Tyler Hicks

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Li Wang <liwang@nudt.edu.cn>

commit 684a3ff7e69acc7c678d1a1394fe9e757993fd34 upstream.

ecryptfs_write() can enter an infinite loop when truncating a file to a
size larger than 4G. This only happens on architectures where size_t is
represented by 32 bits.

This was caused by a size_t overflow due to it incorrectly being used to
store the result of a calculation which uses potentially large values of
type loff_t.

[tyhicks@canonical.com: rewrite subject and commit message]
Signed-off-by: Li Wang <liwang@nudt.edu.cn>
Signed-off-by: Yunchuan Wen <wenyunchuan@kylinos.com.cn>
Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/ecryptfs/read_write.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/fs/ecryptfs/read_write.c
+++ b/fs/ecryptfs/read_write.c
@@ -134,7 +134,7 @@ int ecryptfs_write(struct file *ecryptfs
 		pgoff_t ecryptfs_page_idx = (pos >> PAGE_CACHE_SHIFT);
 		size_t start_offset_in_page = (pos & ~PAGE_CACHE_MASK);
 		size_t num_bytes = (PAGE_CACHE_SIZE - start_offset_in_page);
-		size_t total_remaining_bytes = ((offset + size) - pos);
+		loff_t total_remaining_bytes = ((offset + size) - pos);
 
 		if (fatal_signal_pending(current)) {
 			rc = -EINTR;
@@ -145,7 +145,7 @@ int ecryptfs_write(struct file *ecryptfs
 			num_bytes = total_remaining_bytes;
 		if (pos < offset) {
 			/* remaining zeros to write, up to destination offset */
-			size_t total_remaining_zeros = (offset - pos);
+			loff_t total_remaining_zeros = (offset - pos);
 
 			if (num_bytes > total_remaining_zeros)
 				num_bytes = total_remaining_zeros;



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [12/21] atmel_lcdfb: fix usage of CONTRAST_CTR in suspend/resume
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
                   ` (10 preceding siblings ...)
  2012-02-10 22:47 ` [11/21] eCryptfs: Infinite loop due to overflow in ecryptfs_write() Greg KH
@ 2012-02-10 22:47 ` Greg KH
  2012-02-10 22:47 ` [13/21] Staging: asus_oled: fix image processing Greg KH
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:47 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Hubert Feurstein, Nicolas Ferre,
	Jean-Christophe PLAGNIOL-VILLARD, Florian Tobias Schandinat

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Hubert Feurstein <h.feurstein@gmail.com>

commit 9f1065032ceb7e86c7c9f16bb86518857e88a172 upstream.

An error was existing in the saving of CONTRAST_CTR register
across suspend/resume.

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/video/atmel_lcdfb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -1052,7 +1052,7 @@ static int atmel_lcdfb_suspend(struct pl
 	 */
 	lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0UL);
 
-	sinfo->saved_lcdcon = lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_VAL);
+	sinfo->saved_lcdcon = lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_CTR);
 	lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, 0);
 	if (sinfo->atmel_lcdfb_power_control)
 		sinfo->atmel_lcdfb_power_control(0);



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [13/21] Staging: asus_oled: fix image processing
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
                   ` (11 preceding siblings ...)
  2012-02-10 22:47 ` [12/21] atmel_lcdfb: fix usage of CONTRAST_CTR in suspend/resume Greg KH
@ 2012-02-10 22:47 ` Greg KH
  2012-02-10 22:47 ` [14/21] Staging: android: binder: Dont call dump_stack in binder_vma_open Greg KH
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:47 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Jakub Schmidtke, Kevin A. Granade, Pekka Paalanen

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Pekka Paalanen <pq@iki.fi>

commit 635032cb397b396241372fa0ff36ae758e658b23 upstream.

Programming an image was broken, because odev->buf_offs was not advanced
for val == 0 in append_values(). This regression was introduced in:

 commit 1ff12a4aa354bed093a0240d5e6347b1e27601bc
 Author: Kevin A. Granade <kevin.granade@gmail.com>
 Date:   Sat Sep 5 01:03:39 2009 -0500

     Staging: asus_oled: Cleaned up checkpatch issues.

Fix the image processing by special-casing val == 0.

I have tested this change on an Asus G50V laptop only.

Cc: Jakub Schmidtke <sjakub@gmail.com>
Cc: Kevin A. Granade <kevin.granade@gmail.com>
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/staging/asus_oled/asus_oled.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

--- a/drivers/staging/asus_oled/asus_oled.c
+++ b/drivers/staging/asus_oled/asus_oled.c
@@ -349,7 +349,14 @@ static void send_data(struct asus_oled_d
 
 static int append_values(struct asus_oled_dev *odev, uint8_t val, size_t count)
 {
-	while (count-- > 0 && val) {
+	odev->last_val = val;
+
+	if (val == 0) {
+		odev->buf_offs += count;
+		return 0;
+	}
+
+	while (count-- > 0) {
 		size_t x = odev->buf_offs % odev->width;
 		size_t y = odev->buf_offs / odev->width;
 		size_t i;
@@ -400,7 +407,6 @@ static int append_values(struct asus_ole
 			;
 		}
 
-		odev->last_val = val;
 		odev->buf_offs++;
 	}
 



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [14/21] Staging: android: binder: Dont call dump_stack in binder_vma_open
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
                   ` (12 preceding siblings ...)
  2012-02-10 22:47 ` [13/21] Staging: asus_oled: fix image processing Greg KH
@ 2012-02-10 22:47 ` Greg KH
  2012-02-10 22:47 ` [15/21] Staging: android: binder: Fix crashes when sharing a binder file between processes Greg KH
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:47 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Arve Hjønnevåg

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 995 bytes --]

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Arve Hjønnevåg <arve@android.com>

commit 3c1b86f17068cf6476fb2d022b9c8b44dedea2e5 upstream.

If user-space partially unmaps the driver, binder_vma_open
would dump the kernel stack. This is not a kernel bug however
and will be treated as if the whole area was unmapped once
binder_vma_close gets called.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/staging/android/binder.c |    1 -
 1 file changed, 1 deletion(-)

--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -2741,7 +2741,6 @@ static void binder_vma_open(struct vm_ar
 		     proc->pid, vma->vm_start, vma->vm_end,
 		     (vma->vm_end - vma->vm_start) / SZ_1K, vma->vm_flags,
 		     (unsigned long)pgprot_val(vma->vm_page_prot));
-	dump_stack();
 }
 
 static void binder_vma_close(struct vm_area_struct *vma)



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [15/21] Staging: android: binder: Fix crashes when sharing a binder file between processes
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
                   ` (13 preceding siblings ...)
  2012-02-10 22:47 ` [14/21] Staging: android: binder: Dont call dump_stack in binder_vma_open Greg KH
@ 2012-02-10 22:47 ` Greg KH
  2012-02-10 22:47 ` [16/21] usb: gadget: zero: fix bug in loopback autoresume handling Greg KH
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:47 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Arve Hjønnevåg

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2735 bytes --]

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Arve Hjønnevåg <arve@android.com>

commit bd1eff9741af27378b241b347041c724bb28e857 upstream.

Opening the binder driver and sharing the file returned with
other processes (e.g. by calling fork) can crash the kernel.
Prevent these crashes with the following changes:
- Add a mutex to protect against two processes mmapping the
  same binder_proc.
- After locking mmap_sem, check that the vma we want to access
  (still) points to the same mm_struct.
- Use proc->tsk instead of current to get the files struct since
  this is where we get the rlimit from.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/staging/android/binder.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -36,6 +36,7 @@
 
 static DEFINE_MUTEX(binder_lock);
 static DEFINE_MUTEX(binder_deferred_lock);
+static DEFINE_MUTEX(binder_mmap_lock);
 
 static HLIST_HEAD(binder_procs);
 static HLIST_HEAD(binder_deferred_list);
@@ -614,6 +615,11 @@ static int binder_update_page_range(stru
 	if (mm) {
 		down_write(&mm->mmap_sem);
 		vma = proc->vma;
+		if (vma && mm != vma->vm_mm) {
+			pr_err("binder: %d: vma mm and task mm mismatch\n",
+				proc->pid);
+			vma = NULL;
+		}
 	}
 
 	if (allocate == 0)
@@ -2784,6 +2790,7 @@ static int binder_mmap(struct file *filp
 	}
 	vma->vm_flags = (vma->vm_flags | VM_DONTCOPY) & ~VM_MAYWRITE;
 
+	mutex_lock(&binder_mmap_lock);
 	if (proc->buffer) {
 		ret = -EBUSY;
 		failure_string = "already mapped";
@@ -2798,6 +2805,7 @@ static int binder_mmap(struct file *filp
 	}
 	proc->buffer = area->addr;
 	proc->user_buffer_offset = vma->vm_start - (uintptr_t)proc->buffer;
+	mutex_unlock(&binder_mmap_lock);
 
 #ifdef CONFIG_CPU_CACHE_VIPT
 	if (cache_is_vipt_aliasing()) {
@@ -2830,7 +2838,7 @@ static int binder_mmap(struct file *filp
 	binder_insert_free_buffer(proc, buffer);
 	proc->free_async_space = proc->buffer_size / 2;
 	barrier();
-	proc->files = get_files_struct(current);
+	proc->files = get_files_struct(proc->tsk);
 	proc->vma = vma;
 
 	/*printk(KERN_INFO "binder_mmap: %d %lx-%lx maps %p\n",
@@ -2841,10 +2849,12 @@ err_alloc_small_buf_failed:
 	kfree(proc->pages);
 	proc->pages = NULL;
 err_alloc_pages_failed:
+	mutex_lock(&binder_mmap_lock);
 	vfree(proc->buffer);
 	proc->buffer = NULL;
 err_get_vm_area_failed:
 err_already_mapped:
+	mutex_unlock(&binder_mmap_lock);
 err_bad_arg:
 	printk(KERN_ERR "binder_mmap: %d %lx-%lx %s failed %d\n",
 	       proc->pid, vma->vm_start, vma->vm_end, failure_string, ret);



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [16/21] usb: gadget: zero: fix bug in loopback autoresume handling
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
                   ` (14 preceding siblings ...)
  2012-02-10 22:47 ` [15/21] Staging: android: binder: Fix crashes when sharing a binder file between processes Greg KH
@ 2012-02-10 22:47 ` Greg KH
  2012-02-10 22:47 ` [17/21] usb: Skip PCI USB quirk handling for Netlogic XLP Greg KH
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:47 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Timo Juhani Lindfors, Felipe Balbi

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Timo Juhani Lindfors <timo.lindfors@iki.fi>

commit 683da59d7b8ae04891636d4b59893cd4e9b0b7e5 upstream.

ab943a2e125b (USB: gadget: gadget zero uses new suspend/resume hooks)
introduced a copy-paste error where f_loopback.c writes to a variable
declared in f_sourcesink.c. This prevents one from creating gadgets
that only have a loopback function.

Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/gadget/f_loopback.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/gadget/f_loopback.c
+++ b/drivers/usb/gadget/f_loopback.c
@@ -373,7 +373,7 @@ int __init loopback_add(struct usb_compo
 
 	/* support autoresume for remote wakeup testing */
 	if (autoresume)
-		sourcesink_driver.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
+		loopback_driver.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
 
 	/* support OTG systems */
 	if (gadget_is_otg(cdev->gadget)) {



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [17/21] usb: Skip PCI USB quirk handling for Netlogic XLP
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
                   ` (15 preceding siblings ...)
  2012-02-10 22:47 ` [16/21] usb: gadget: zero: fix bug in loopback autoresume handling Greg KH
@ 2012-02-10 22:47 ` Greg KH
  2012-02-10 22:47 ` [18/21] USB: usbserial: add new PID number (0xa951) to the ftdi driver Greg KH
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:47 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Jayachandran C, Alan Stern

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Jayachandran C <jayachandranc@netlogicmicro.com>

commit e4436a7c17ac2b5e138f93f83a541cba9b311685 upstream.

The Netlogic XLP SoC's on-chip USB controller appears as a PCI
USB device, but does not need the EHCI/OHCI handoff done in
usb/host/pci-quirks.c.

The pci-quirks.c is enabled for all vendors and devices, and is
enabled if USB and PCI are configured.

If we do not skip the qurik handling on XLP, the readb() call in
ehci_bios_handoff() will cause a crash since byte access is not
supported for EHCI registers in XLP.

Signed-off-by: Jayachandran C <jayachandranc@netlogicmicro.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/host/pci-quirks.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -498,6 +498,12 @@ hc_init:
 
 static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev)
 {
+	/* Skip Netlogic mips SoC's internal PCI USB controller.
+	 * This device does not need/support EHCI/OHCI handoff
+	 */
+	if (pdev->vendor == 0x184e)	/* vendor Netlogic */
+		return;
+
 	if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI)
 		quirk_usb_handoff_uhci(pdev);
 	else if (pdev->class == PCI_CLASS_SERIAL_USB_OHCI)



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [18/21] USB: usbserial: add new PID number (0xa951) to the ftdi driver
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
                   ` (16 preceding siblings ...)
  2012-02-10 22:47 ` [17/21] usb: Skip PCI USB quirk handling for Netlogic XLP Greg KH
@ 2012-02-10 22:47 ` Greg KH
  2012-02-10 22:47 ` [19/21] mmc: cb710 core: Add missing spin_lock_init for irq_lock of struct cb710_chip Greg KH
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:47 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Milan Kocian

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Milan Kocian <milon@wq.cz>

commit 90451e6973a5da155c6f315a409ca0a8d3ce6b76 upstream.

Signed-off-by: Milan Kocian <milon@wq.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/ftdi_sio.c     |    1 +
 drivers/usb/serial/ftdi_sio_ids.h |    7 +++++++
 2 files changed, 8 insertions(+)

--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -840,6 +840,7 @@ static struct usb_device_id id_table_com
 	{ USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LOGBOOKML_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LS_LOGBOOK_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_HS_LOGBOOK_PID) },
+	{ USB_DEVICE(FTDI_VID, FTDI_CINTERION_MC55I_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_DOTEC_PID) },
 	{ USB_DEVICE(QIHARDWARE_VID, MILKYMISTONE_JTAGSERIAL_PID),
 		.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -1192,3 +1192,10 @@
  */
 /* ZigBee controller */
 #define FTDI_RF_R106		0x8A28
+
+/*
+ * Product: HCP HIT GPRS modem
+ * Manufacturer: HCP d.o.o.
+ * ATI command output: Cinterion MC55i
+ */
+#define FTDI_CINTERION_MC55I_PID	0xA951



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [19/21] mmc: cb710 core: Add missing spin_lock_init for irq_lock of struct cb710_chip
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
                   ` (17 preceding siblings ...)
  2012-02-10 22:47 ` [18/21] USB: usbserial: add new PID number (0xa951) to the ftdi driver Greg KH
@ 2012-02-10 22:47 ` Greg KH
  2012-02-10 22:47 ` [20/21] net: fix sk_forward_alloc corruptions Greg KH
  2012-02-10 22:48 ` [21/21] net: sock_queue_err_skb() dont mess with sk_forward_alloc Greg KH
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:47 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Axel Lin, Michał Mirosław

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 690 bytes --]

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Axel Lin <axel.lin@gmail.com>

commit b5266ea675c5a041e2852c7ccec4cf2d4f5e0cf4 upstream.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/misc/cb710/core.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/misc/cb710/core.c
+++ b/drivers/misc/cb710/core.c
@@ -244,6 +244,7 @@ static int __devinit cb710_probe(struct
 	if (err)
 		return err;
 
+	spin_lock_init(&chip->irq_lock);
 	chip->pdev = pdev;
 	chip->iobase = pcim_iomap_table(pdev)[0];
 



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [20/21] net: fix sk_forward_alloc corruptions
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
                   ` (18 preceding siblings ...)
  2012-02-10 22:47 ` [19/21] mmc: cb710 core: Add missing spin_lock_init for irq_lock of struct cb710_chip Greg KH
@ 2012-02-10 22:47 ` Greg KH
  2012-02-10 22:48 ` [21/21] net: sock_queue_err_skb() dont mess with sk_forward_alloc Greg KH
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:47 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Anton Blanchard, Eric Dumazet,
	David S. Miller, 单卫

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2077 bytes --]

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Eric Dumazet <eric.dumazet@gmail.com>

commit 2903037400a26e7c0cc93ab75a7d62abfacdf485 upstream.

As David found out, sock_queue_err_skb() should be called with socket
lock hold, or we risk sk_forward_alloc corruption, since we use non
atomic operations to update this field.

This patch adds bh_lock_sock()/bh_unlock_sock() pair to three spots.
(BH already disabled)

1) skb_tstamp_tx()
2) Before calling ip_icmp_error(), in __udp4_lib_err()
3) Before calling ipv6_icmp_error(), in __udp6_lib_err()

Reported-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: 单卫 <shanwei88@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/core/skbuff.c |    4 ++++
 net/ipv4/udp.c    |    2 ++
 net/ipv6/udp.c    |    6 ++++--
 3 files changed, 10 insertions(+), 2 deletions(-)

--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -3008,7 +3008,11 @@ void skb_tstamp_tx(struct sk_buff *orig_
 	memset(serr, 0, sizeof(*serr));
 	serr->ee.ee_errno = ENOMSG;
 	serr->ee.ee_origin = SO_EE_ORIGIN_TIMESTAMPING;
+
+	bh_lock_sock(sk);
 	err = sock_queue_err_skb(sk, skb);
+	bh_unlock_sock(sk);
+
 	if (err)
 		kfree_skb(skb);
 }
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -441,7 +441,9 @@ void __udp4_lib_err(struct sk_buff *skb,
 		if (!harderr || sk->sk_state != TCP_ESTABLISHED)
 			goto out;
 	} else {
+		bh_lock_sock(sk);
 		ip_icmp_error(sk, skb, err, uh->dest, info, (u8 *)(uh+1));
+		bh_unlock_sock(sk);
 	}
 	sk->sk_err = err;
 	sk->sk_error_report(sk);
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -337,9 +337,11 @@ void __udp6_lib_err(struct sk_buff *skb,
 	if (sk->sk_state != TCP_ESTABLISHED && !np->recverr)
 		goto out;
 
-	if (np->recverr)
+	if (np->recverr) {
+		bh_lock_sock(sk);
 		ipv6_icmp_error(sk, skb, err, uh->dest, ntohl(info), (u8 *)(uh+1));
-
+		bh_unlock_sock(sk);
+	}
 	sk->sk_err = err;
 	sk->sk_error_report(sk);
 out:



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [21/21] net: sock_queue_err_skb() dont mess with sk_forward_alloc
  2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
                   ` (19 preceding siblings ...)
  2012-02-10 22:47 ` [20/21] net: fix sk_forward_alloc corruptions Greg KH
@ 2012-02-10 22:48 ` Greg KH
  20 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Eric Dumazet, David S. Miller, 单卫

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3833 bytes --]

2.6.32-longterm review patch.  If anyone has any objections, please let me know.

------------------

From: Eric Dumazet <eric.dumazet@gmail.com>

commit b1faf5666438090a4dc4fceac8502edc7788b7e3 upstream.

Correct sk_forward_alloc handling for error_queue would need to use a
backlog of frames that softirq handler could not deliver because socket
is owned by user thread. Or extend backlog processing to be able to
process normal and error packets.

Another possibility is to not use mem charge for error queue, this is
what I implemented in this patch.

Note: this reverts commit 29030374
(net: fix sk_forward_alloc corruptions), since we dont need to lock
socket anymore.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: 单卫 <shanwei88@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 include/net/sock.h |   15 +--------------
 net/core/skbuff.c  |   30 ++++++++++++++++++++++++++++--
 net/ipv4/udp.c     |    6 ++----
 net/ipv6/udp.c     |    6 ++----
 4 files changed, 33 insertions(+), 24 deletions(-)

--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1354,20 +1354,7 @@ extern void sk_stop_timer(struct sock *s
 
 extern int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
 
-static inline int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb)
-{
-	/* Cast skb->rcvbuf to unsigned... It's pointless, but reduces
-	   number of warnings when compiling with -W --ANK
-	 */
-	if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >=
-	    (unsigned)sk->sk_rcvbuf)
-		return -ENOMEM;
-	skb_set_owner_r(skb, sk);
-	skb_queue_tail(&sk->sk_error_queue, skb);
-	if (!sock_flag(sk, SOCK_DEAD))
-		sk->sk_data_ready(sk, skb->len);
-	return 0;
-}
+extern int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb);
 
 /*
  *	Recover an error report and clear atomically
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -2977,6 +2977,34 @@ int skb_cow_data(struct sk_buff *skb, in
 }
 EXPORT_SYMBOL_GPL(skb_cow_data);
 
+static void sock_rmem_free(struct sk_buff *skb)
+{
+	struct sock *sk = skb->sk;
+
+	atomic_sub(skb->truesize, &sk->sk_rmem_alloc);
+}
+
+/*
+ * Note: We dont mem charge error packets (no sk_forward_alloc changes)
+ */
+int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb)
+{
+	if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >=
+	    (unsigned)sk->sk_rcvbuf)
+		return -ENOMEM;
+
+	skb_orphan(skb);
+	skb->sk = sk;
+	skb->destructor = sock_rmem_free;
+	atomic_add(skb->truesize, &sk->sk_rmem_alloc);
+
+	skb_queue_tail(&sk->sk_error_queue, skb);
+	if (!sock_flag(sk, SOCK_DEAD))
+		sk->sk_data_ready(sk, skb->len);
+	return 0;
+}
+EXPORT_SYMBOL(sock_queue_err_skb);
+
 void skb_tstamp_tx(struct sk_buff *orig_skb,
 		struct skb_shared_hwtstamps *hwtstamps)
 {
@@ -3009,9 +3037,7 @@ void skb_tstamp_tx(struct sk_buff *orig_
 	serr->ee.ee_errno = ENOMSG;
 	serr->ee.ee_origin = SO_EE_ORIGIN_TIMESTAMPING;
 
-	bh_lock_sock(sk);
 	err = sock_queue_err_skb(sk, skb);
-	bh_unlock_sock(sk);
 
 	if (err)
 		kfree_skb(skb);
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -440,11 +440,9 @@ void __udp4_lib_err(struct sk_buff *skb,
 	if (!inet->recverr) {
 		if (!harderr || sk->sk_state != TCP_ESTABLISHED)
 			goto out;
-	} else {
-		bh_lock_sock(sk);
+	} else
 		ip_icmp_error(sk, skb, err, uh->dest, info, (u8 *)(uh+1));
-		bh_unlock_sock(sk);
-	}
+
 	sk->sk_err = err;
 	sk->sk_error_report(sk);
 out:
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -337,11 +337,9 @@ void __udp6_lib_err(struct sk_buff *skb,
 	if (sk->sk_state != TCP_ESTABLISHED && !np->recverr)
 		goto out;
 
-	if (np->recverr) {
-		bh_lock_sock(sk);
+	if (np->recverr)
 		ipv6_icmp_error(sk, skb, err, uh->dest, ntohl(info), (u8 *)(uh+1));
-		bh_unlock_sock(sk);
-	}
+
 	sk->sk_err = err;
 	sk->sk_error_report(sk);
 out:



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [00/21] 2.6.32.57-longterm review
@ 2012-02-10 22:48 Greg KH
  2012-02-10 22:47 ` [01/21] IB/mlx4: pass SMP vendor-specific attribute MADs to firmware Greg KH
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: Greg KH @ 2012-02-10 22:48 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan

This is the start of the longterm review cycle for the 2.6.32.57 release.
There are 21 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let us know.  If anyone is a maintainer of the proper subsystem, and
wants to add a Signed-off-by: line to the patch, please respond with it.

Responses should be made by Mon Feb 13 22:00:00 UTC 2012
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	kernel.org/pub/linux/kernel/v2.6/longterm-review/patch-2.6.32.57-rc1.gz
and the diffstat can be found below.

thanks,

greg k-h


 Makefile                              |    2 +-
 drivers/gpu/drm/i915/intel_tv.c       |   16 ++++++++--------
 drivers/infiniband/hw/mlx4/mad.c      |    7 ++-----
 drivers/misc/cb710/core.c             |    1 +
 drivers/staging/android/binder.c      |   13 +++++++++++--
 drivers/staging/asus_oled/asus_oled.c |   10 ++++++++--
 drivers/usb/gadget/f_loopback.c       |    2 +-
 drivers/usb/host/pci-quirks.c         |    6 ++++++
 drivers/usb/serial/ftdi_sio.c         |    1 +
 drivers/usb/serial/ftdi_sio_ids.h     |    7 +++++++
 drivers/video/atmel_lcdfb.c           |    2 +-
 fs/ecryptfs/read_write.c              |    4 ++--
 fs/nfs/nfs4proc.c                     |   29 ++++++++++++++++++++++-------
 fs/nfs/nfs4state.c                    |   19 ++++++++++---------
 fs/udf/super.c                        |    6 ++++++
 include/net/sock.h                    |   15 +--------------
 mm/filemap_xip.c                      |    7 ++++++-
 net/core/skbuff.c                     |   30 ++++++++++++++++++++++++++++++
 net/ipv4/udp.c                        |    4 ++--
 net/sunrpc/xprtsock.c                 |    8 ++------
 20 files changed, 128 insertions(+), 61 deletions(-)

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2012-02-10 22:55 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-10 22:48 [00/21] 2.6.32.57-longterm review Greg KH
2012-02-10 22:47 ` [01/21] IB/mlx4: pass SMP vendor-specific attribute MADs to firmware Greg KH
2012-02-10 22:47 ` [02/21] mm/filemap_xip.c: fix race condition in xip_file_fault() Greg KH
2012-02-10 22:47 ` [03/21] NFSv4: Fix up the callers of nfs4_state_end_reclaim_reboot Greg KH
2012-02-10 22:47 ` [04/21] NFSv4: The state manager shouldnt exit on errors that were handled Greg KH
2012-02-10 22:47 ` [05/21] NFSv4: Ensure the state manager handles NFS4ERR_NO_GRACE correctly Greg KH
2012-02-10 22:47 ` [06/21] NFSv4: Handle NFS4ERR_GRACE when recovering an expired lease Greg KH
2012-02-10 22:47 ` [07/21] NFSv4: Fix open recovery Greg KH
2012-02-10 22:47 ` [08/21] rpc client can not deal with ENOSOCK, so translate it into ENOCONN Greg KH
2012-02-10 22:47 ` [09/21] udf: Mark LVID buffer as uptodate before marking it dirty Greg KH
2012-02-10 22:47 ` [10/21] drm/i915: Fix TV Out refresh rate Greg KH
2012-02-10 22:47 ` [11/21] eCryptfs: Infinite loop due to overflow in ecryptfs_write() Greg KH
2012-02-10 22:47 ` [12/21] atmel_lcdfb: fix usage of CONTRAST_CTR in suspend/resume Greg KH
2012-02-10 22:47 ` [13/21] Staging: asus_oled: fix image processing Greg KH
2012-02-10 22:47 ` [14/21] Staging: android: binder: Dont call dump_stack in binder_vma_open Greg KH
2012-02-10 22:47 ` [15/21] Staging: android: binder: Fix crashes when sharing a binder file between processes Greg KH
2012-02-10 22:47 ` [16/21] usb: gadget: zero: fix bug in loopback autoresume handling Greg KH
2012-02-10 22:47 ` [17/21] usb: Skip PCI USB quirk handling for Netlogic XLP Greg KH
2012-02-10 22:47 ` [18/21] USB: usbserial: add new PID number (0xa951) to the ftdi driver Greg KH
2012-02-10 22:47 ` [19/21] mmc: cb710 core: Add missing spin_lock_init for irq_lock of struct cb710_chip Greg KH
2012-02-10 22:47 ` [20/21] net: fix sk_forward_alloc corruptions Greg KH
2012-02-10 22:48 ` [21/21] net: sock_queue_err_skb() dont mess with sk_forward_alloc Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).