Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 3 files changed
  • 0 comments
  • 2 contributors
Sep 18, 2012
pinchartl pinchartl sh: pfc: Release spinlock in sh_pfc_gpio_request_enable() error path
The sh_pfc_gpio_request_enable() function acquires a spinlock but fails
to release it before returning if the requested mux type is not
supported. Fix this.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
077664a
Al Viro sh: Fix up TIF_NOTIFY_RESUME sans TIF_SIGPENDING handling.
As Al notes, we missed a TIF_NOTIFY_RESUME check which caused any
handlers without TIF_SIGPENDING also set to skip the notification:

	Looks like while it is in the relevant masks *and* checked in
	do_notify_resume() both on 32bit and 64bit variants since commit
	ab99c73 ("sh: Make syscall tracer
	use tracehook notifiers, add TIF_NOTIFY_RESUME.") they are
	actually *not* reached without simulataneous SIGPENDING, since
	the actual glue in the callers had not been updated back then and
	still checks for _TIF_SIGPENDING alone when deciding whether to
	hit do_notify_resume() or not.

Reported-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Tested-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
5e071e2
2  arch/sh/kernel/cpu/sh5/entry.S
@@ -933,7 +933,7 @@ ret_with_reschedule:
933 933
934 934 pta restore_all, tr1
935 935
936   - movi _TIF_SIGPENDING, r8
  936 + movi (_TIF_SIGPENDING|_TIF_NOTIFY_RESUME), r8
937 937 and r8, r7, r8
938 938 pta work_notifysig, tr0
939 939 bne r8, ZERO, tr0
2  arch/sh/kernel/entry-common.S
@@ -139,7 +139,7 @@ work_pending:
139 139 ! r8: current_thread_info
140 140 ! t: result of "tst #_TIF_NEED_RESCHED, r0"
141 141 bf/s work_resched
142   - tst #_TIF_SIGPENDING, r0
  142 + tst #(_TIF_SIGPENDING | _TIF_NOTIFY_RESUME), r0
143 143 work_notifysig:
144 144 bt/s __restore_all
145 145 mov r15, r4
3  drivers/sh/pfc/pinctrl.c
@@ -211,7 +211,8 @@ static int sh_pfc_gpio_request_enable(struct pinctrl_dev *pctldev,
211 211 break;
212 212 default:
213 213 pr_err("Unsupported mux type (%d), bailing...\n", pinmux_type);
214   - return -ENOTSUPP;
  214 + ret = -ENOTSUPP;
  215 + goto err;
215 216 }
216 217
217 218 ret = 0;

No commit comments for this range

Something went wrong with that request. Please try again.