lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 8 Aug 2014 10:20:50 +0200 From: Julia Lawall <Julia.Lawall@...6.fr> To: Joshua Morris <josh.h.morris@...ibm.com>, Jeff Moyer <jmoyer@...hat.com> Cc: kernel-janitors@...r.kernel.org, Philip Kelleher <pjk1939@...ux.vnet.ibm.com>, linux-kernel@...r.kernel.org Subject: [PATCH] block: add abort on failure From: Julia Lawall <Julia.Lawall@...6.fr> Initializing card seems to be critical to the rest of the probe process, so abort the probe function if the calls to rsxx_load_config and rsxx_get_num_targets do not succeed. Suggested by Jeff Moyer. Signed-off-by: Julia Lawall <Julia.Lawall@...6.fr> --- drivers/block/rsxx/core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/block/rsxx/core.c b/drivers/block/rsxx/core.c index a8de2ee..ae2805b 100644 --- a/drivers/block/rsxx/core.c +++ b/drivers/block/rsxx/core.c @@ -915,15 +915,19 @@ static int rsxx_pci_probe(struct pci_dev *dev, /************* Load Card Config *************/ st = rsxx_load_config(card); - if (st) + if (st) { dev_err(CARD_TO_DEV(card), "Failed loading card config\n"); + goto failed_dma_setup; + } /************* Setup DMA Engine *************/ st = rsxx_get_num_targets(card, &card->n_targets); - if (st) + if (st) { dev_info(CARD_TO_DEV(card), "Failed reading the number of DMA targets\n"); + goto failed_dma_setup; + } card->ctrl = kzalloc(card->n_targets * sizeof(*card->ctrl), GFP_KERNEL); if (!card->ctrl) { -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists