Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Martin Schwidefsky:
 "A couple of bug fixes:

   - correct some CPU-MF counter names for z13 and z14

   - correct locking in the vfio-ccw fsm_io_helper function

   - provide arch_uretprobe_is_alive to avoid sigsegv with uretprobes

   - fix a corner case with CPU-MF sampling in regard to execve

   - fix expoline code revert for loadable modules

   - update chpid descriptor for resource accessibility events

   - fix dasd I/O errors due to outdated device alias infomation"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390: correct module section names for expoline code revert
  vfio: ccw: process ssch with interrupts disabled
  s390: update sampling tag after task pid change
  s390/cpum_cf: rename IBM z13/z14 counter names
  s390/dasd: fix IO error for newly defined devices
  s390/uprobes: implement arch_uretprobe_is_alive()
  s390/cio: update chpid descriptor after resource accessibility event
This commit is contained in:
Linus Torvalds 2018-04-26 10:29:46 -07:00
commit 1334ac11d9
8 changed files with 62 additions and 18 deletions

View file

@ -592,13 +592,22 @@ static int _schedule_lcu_update(struct alias_lcu *lcu,
int dasd_alias_add_device(struct dasd_device *device)
{
struct dasd_eckd_private *private = device->private;
struct alias_lcu *lcu;
__u8 uaddr = private->uid.real_unit_addr;
struct alias_lcu *lcu = private->lcu;
unsigned long flags;
int rc;
lcu = private->lcu;
rc = 0;
spin_lock_irqsave(&lcu->lock, flags);
/*
* Check if device and lcu type differ. If so, the uac data may be
* outdated and needs to be updated.
*/
if (private->uid.type != lcu->uac->unit[uaddr].ua_type) {
lcu->flags |= UPDATE_PENDING;
DBF_DEV_EVENT(DBF_WARNING, device, "%s",
"uid type mismatch - trigger rescan");
}
if (!(lcu->flags & UPDATE_PENDING)) {
rc = _add_device_to_lcu(lcu, device, device);
if (rc)

View file

@ -452,6 +452,7 @@ static void chsc_process_sei_link_incident(struct chsc_sei_nt0_area *sei_area)
static void chsc_process_sei_res_acc(struct chsc_sei_nt0_area *sei_area)
{
struct channel_path *chp;
struct chp_link link;
struct chp_id chpid;
int status;
@ -464,10 +465,17 @@ static void chsc_process_sei_res_acc(struct chsc_sei_nt0_area *sei_area)
chpid.id = sei_area->rsid;
/* allocate a new channel path structure, if needed */
status = chp_get_status(chpid);
if (status < 0)
chp_new(chpid);
else if (!status)
if (!status)
return;
if (status < 0) {
chp_new(chpid);
} else {
chp = chpid_to_chp(chpid);
mutex_lock(&chp->lock);
chp_update_desc(chp);
mutex_unlock(&chp->lock);
}
memset(&link, 0, sizeof(struct chp_link));
link.chpid = chpid;
if ((sei_area->vf & 0xc0) != 0) {

View file

@ -20,12 +20,12 @@ static int fsm_io_helper(struct vfio_ccw_private *private)
int ccode;
__u8 lpm;
unsigned long flags;
int ret;
sch = private->sch;
spin_lock_irqsave(sch->lock, flags);
private->state = VFIO_CCW_STATE_BUSY;
spin_unlock_irqrestore(sch->lock, flags);
orb = cp_get_orb(&private->cp, (u32)(addr_t)sch, sch->lpm);
@ -38,10 +38,12 @@ static int fsm_io_helper(struct vfio_ccw_private *private)
* Initialize device status information
*/
sch->schib.scsw.cmd.actl |= SCSW_ACTL_START_PEND;
return 0;
ret = 0;
break;
case 1: /* Status pending */
case 2: /* Busy */
return -EBUSY;
ret = -EBUSY;
break;
case 3: /* Device/path not operational */
{
lpm = orb->cmd.lpm;
@ -51,13 +53,16 @@ static int fsm_io_helper(struct vfio_ccw_private *private)
sch->lpm = 0;
if (cio_update_schib(sch))
return -ENODEV;
return sch->lpm ? -EACCES : -ENODEV;
ret = -ENODEV;
else
ret = sch->lpm ? -EACCES : -ENODEV;
break;
}
default:
return ccode;
ret = ccode;
}
spin_unlock_irqrestore(sch->lock, flags);
return ret;
}
static void fsm_notoper(struct vfio_ccw_private *private,