From: Dan Carpenter <dan.carpenter@oracle.com> To: Juergen Gross <jgross@suse.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>, Boris Ostrovsky <boris.ostrovsky@oracle.com>, David Vrabel <david.vrabel@citrix.com>, "James E.J. Bottomley" <JBottomley@parallels.com>, xen-devel@lists.xenproject.org, linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] xen-scsifront: use GFP_ATOMIC under spin_lock Date: Mon, 08 Sep 2014 11:15:42 +0000 [thread overview] Message-ID: <20140908111542.GA6947@mwanda> (raw) This function is only called with a spin_lock held and IRQs disabled. The allocation is not allowed to sleep and NOIO is not sufficient, it has to be ATOMIC. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c index 0aceb70..7e88659 100644 --- a/drivers/scsi/xen-scsifront.c +++ b/drivers/scsi/xen-scsifront.c @@ -359,7 +359,7 @@ static int map_data_for_request(struct vscsifrnt_info *info, } seg_grants = vscsiif_grants_sg(data_grants); shadow->sg = kcalloc(data_grants, - sizeof(struct scsiif_request_segment), GFP_NOIO); + sizeof(struct scsiif_request_segment), GFP_ATOMIC); if (!shadow->sg) return -ENOMEM; }
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com> To: Juergen Gross <jgross@suse.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>, Boris Ostrovsky <boris.ostrovsky@oracle.com>, David Vrabel <david.vrabel@citrix.com>, "James E.J. Bottomley" <JBottomley@parallels.com>, xen-devel@lists.xenproject.org, linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] xen-scsifront: use GFP_ATOMIC under spin_lock Date: Mon, 8 Sep 2014 14:15:42 +0300 [thread overview] Message-ID: <20140908111542.GA6947@mwanda> (raw) This function is only called with a spin_lock held and IRQs disabled. The allocation is not allowed to sleep and NOIO is not sufficient, it has to be ATOMIC. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c index 0aceb70..7e88659 100644 --- a/drivers/scsi/xen-scsifront.c +++ b/drivers/scsi/xen-scsifront.c @@ -359,7 +359,7 @@ static int map_data_for_request(struct vscsifrnt_info *info, } seg_grants = vscsiif_grants_sg(data_grants); shadow->sg = kcalloc(data_grants, - sizeof(struct scsiif_request_segment), GFP_NOIO); + sizeof(struct scsiif_request_segment), GFP_ATOMIC); if (!shadow->sg) return -ENOMEM; }
next reply other threads:[~2014-09-08 11:15 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-09-08 11:15 Dan Carpenter [this message] 2014-09-08 11:15 ` [patch] xen-scsifront: use GFP_ATOMIC under spin_lock Dan Carpenter 2014-09-08 11:30 ` Juergen Gross 2014-09-08 11:30 ` [Xen-devel] " Juergen Gross 2014-09-08 11:30 ` Juergen Gross 2014-09-08 17:34 ` David Vrabel 2014-09-08 17:34 ` [Xen-devel] " David Vrabel 2014-09-08 17:34 ` David Vrabel -- strict thread matches above, loose matches on Subject: below -- 2014-09-08 11:15 Dan Carpenter
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20140908111542.GA6947@mwanda \ --to=dan.carpenter@oracle.com \ --cc=JBottomley@parallels.com \ --cc=boris.ostrovsky@oracle.com \ --cc=david.vrabel@citrix.com \ --cc=jgross@suse.com \ --cc=kernel-janitors@vger.kernel.org \ --cc=konrad.wilk@oracle.com \ --cc=linux-scsi@vger.kernel.org \ --cc=xen-devel@lists.xenproject.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.