Hi Hannes, [auto build test WARNING on scsi/for-next] [also build test WARNING on next-20160112] [cannot apply to v4.4] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Hannes-Reinecke/ALUA-device-handler-update-part-II/20160112-234244 base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next config: s390-allyesconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=s390 All warnings (new ones prefixed by >>): drivers/scsi/device_handler/scsi_dh_alua.c: In function 'alua_rtpg': drivers/scsi/device_handler/scsi_dh_alua.c:630:1: warning: 'alua_rtpg' uses dynamic stack allocation } ^ drivers/scsi/device_handler/scsi_dh_alua.c: In function 'alua_rtpg_work': >> drivers/scsi/device_handler/scsi_dh_alua.c:759:1: warning: 'alua_rtpg_work' uses dynamic stack allocation } ^ vim +/alua_rtpg_work +759 drivers/scsi/device_handler/scsi_dh_alua.c 624 err = SCSI_DH_OK; 625 pg->expiry = 0; 626 break; 627 } 628 kfree(buff); 629 return err; > 630 } 631 632 /* 633 * alua_stpg - Issue a SET TARGET GROUP STATES command 634 * 635 * Issue a SET TARGET GROUP STATES command and evaluate the 636 * response. Returns SCSI_DH_RETRY per default to trigger 637 * a re-evaluation of the target group state or SCSI_DH_OK 638 * if no further action needs to be taken. 639 */ 640 static unsigned alua_stpg(struct scsi_device *sdev, struct alua_port_group *pg) 641 { 642 int retval; 643 struct scsi_sense_hdr sense_hdr; 644 645 if (!(pg->tpgs & TPGS_MODE_EXPLICIT)) { 646 /* Only implicit ALUA supported, retry */ 647 return SCSI_DH_RETRY; 648 } 649 switch (pg->state) { 650 case TPGS_STATE_OPTIMIZED: 651 return SCSI_DH_OK; 652 case TPGS_STATE_NONOPTIMIZED: 653 if ((pg->flags & ALUA_OPTIMIZE_STPG) && 654 !pg->pref && 655 (pg->tpgs & TPGS_MODE_IMPLICIT)) 656 return SCSI_DH_OK; 657 break; 658 case TPGS_STATE_STANDBY: 659 case TPGS_STATE_UNAVAILABLE: 660 break; 661 case TPGS_STATE_OFFLINE: 662 return SCSI_DH_IO; 663 break; 664 case TPGS_STATE_TRANSITIONING: 665 break; 666 default: 667 sdev_printk(KERN_INFO, sdev, 668 "%s: stpg failed, unhandled TPGS state %d", 669 ALUA_DH_NAME, pg->state); 670 return SCSI_DH_NOSYS; 671 break; 672 } 673 /* Set state to transitioning */ 674 pg->state = TPGS_STATE_TRANSITIONING; 675 retval = submit_stpg(sdev, pg->group_id, &sense_hdr); 676 677 if (retval) { 678 if (!scsi_sense_valid(&sense_hdr)) { 679 sdev_printk(KERN_INFO, sdev, 680 "%s: stpg failed, result %d", 681 ALUA_DH_NAME, retval); 682 if (driver_byte(retval) == DRIVER_ERROR) 683 return SCSI_DH_DEV_TEMP_BUSY; 684 } else { 685 sdev_printk(KERN_INFO, sdev, "%s: stpg failed\n", 686 ALUA_DH_NAME); 687 scsi_print_sense_hdr(sdev, ALUA_DH_NAME, &sense_hdr); 688 } 689 } 690 /* Retry RTPG */ 691 return SCSI_DH_RETRY; 692 } 693 694 static void alua_rtpg_work(struct work_struct *work) 695 { 696 struct alua_port_group *pg = 697 container_of(work, struct alua_port_group, rtpg_work.work); 698 struct scsi_device *sdev; 699 LIST_HEAD(qdata_list); 700 int err = SCSI_DH_OK; 701 struct alua_queue_data *qdata, *tmp; 702 unsigned long flags; 703 704 spin_lock_irqsave(&pg->lock, flags); 705 sdev = pg->rtpg_sdev; 706 if (!sdev) { 707 WARN_ON(pg->flags & ALUA_PG_RUN_RTPG || 708 pg->flags & ALUA_PG_RUN_STPG); 709 spin_unlock_irqrestore(&pg->lock, flags); 710 return; 711 } 712 pg->flags |= ALUA_PG_RUNNING; 713 if (pg->flags & ALUA_PG_RUN_RTPG) { 714 spin_unlock_irqrestore(&pg->lock, flags); 715 err = alua_rtpg(sdev, pg); 716 spin_lock_irqsave(&pg->lock, flags); 717 if (err == SCSI_DH_RETRY) { 718 pg->flags &= ~ALUA_PG_RUNNING; 719 spin_unlock_irqrestore(&pg->lock, flags); 720 queue_delayed_work(kaluad_wq, &pg->rtpg_work, 721 pg->interval * HZ); 722 return; 723 } 724 pg->flags &= ~ALUA_PG_RUN_RTPG; 725 if (err != SCSI_DH_OK) 726 pg->flags &= ~ALUA_PG_RUN_STPG; 727 } 728 if (pg->flags & ALUA_PG_RUN_STPG) { 729 spin_unlock_irqrestore(&pg->lock, flags); 730 err = alua_stpg(sdev, pg); 731 spin_lock_irqsave(&pg->lock, flags); 732 pg->flags &= ~ALUA_PG_RUN_STPG; 733 if (err == SCSI_DH_RETRY) { 734 pg->flags |= ALUA_PG_RUN_RTPG; 735 pg->interval = 0; 736 pg->flags &= ~ALUA_PG_RUNNING; 737 spin_unlock_irqrestore(&pg->lock, flags); 738 queue_delayed_work(kaluad_wq, &pg->rtpg_work, 739 pg->interval * HZ); 740 return; 741 } 742 } 743 744 list_splice_init(&pg->rtpg_list, &qdata_list); 745 pg->rtpg_sdev = NULL; 746 spin_unlock_irqrestore(&pg->lock, flags); 747 748 list_for_each_entry_safe(qdata, tmp, &qdata_list, entry) { 749 list_del(&qdata->entry); 750 if (qdata->callback_fn) 751 qdata->callback_fn(qdata->callback_data, err); 752 kfree(qdata); 753 } 754 spin_lock_irqsave(&pg->lock, flags); 755 pg->flags &= ~ALUA_PG_RUNNING; 756 spin_unlock_irqrestore(&pg->lock, flags); 757 scsi_device_put(sdev); 758 kref_put(&pg->kref, release_port_group); > 759 } 760 761 static void alua_rtpg_queue(struct alua_port_group *pg, 762 struct scsi_device *sdev, --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: Binary data